{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/18293","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/18293/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/18293/comments","events_url":"https://api.github.com/repos/golang/go/issues/18293/events","html_url":"https://github.com/golang/go/issues/18293","id":195115175,"number":18293,"title":"obj: armv7 (and arm64) should not use constant pools","user":{"login":"philhofer","id":2940902,"avatar_url":"https://avatars.githubusercontent.com/u/2940902?v=3","gravatar_id":"","url":"https://api.github.com/users/philhofer","html_url":"https://github.com/philhofer","followers_url":"https://api.github.com/users/philhofer/followers","following_url":"https://api.github.com/users/philhofer/following{/other_user}","gists_url":"https://api.github.com/users/philhofer/gists{/gist_id}","starred_url":"https://api.github.com/users/philhofer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philhofer/subscriptions","organizations_url":"https://api.github.com/users/philhofer/orgs","repos_url":"https://api.github.com/users/philhofer/repos","events_url":"https://api.github.com/users/philhofer/events{/privacy}","received_events_url":"https://api.github.com/users/philhofer/received_events","type":"User","site_admin":false},"labels":[{"id":150880191,"url":"https://api.github.com/repos/golang/go/labels/Performance","name":"Performance","color":"ededed","default":false}],"state":"open","locked":false,"assignee":{"login":"randall77","id":6889504,"avatar_url":"https://avatars.githubusercontent.com/u/6889504?v=3","gravatar_id":"","url":"https://api.github.com/users/randall77","html_url":"https://github.com/randall77","followers_url":"https://api.github.com/users/randall77/followers","following_url":"https://api.github.com/users/randall77/following{/other_user}","gists_url":"https://api.github.com/users/randall77/gists{/gist_id}","starred_url":"https://api.github.com/users/randall77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randall77/subscriptions","organizations_url":"https://api.github.com/users/randall77/orgs","repos_url":"https://api.github.com/users/randall77/repos","events_url":"https://api.github.com/users/randall77/events{/privacy}","received_events_url":"https://api.github.com/users/randall77/received_events","type":"User","site_admin":false},"assignees":[{"login":"randall77","id":6889504,"avatar_url":"https://avatars.githubusercontent.com/u/6889504?v=3","gravatar_id":"","url":"https://api.github.com/users/randall77","html_url":"https://github.com/randall77","followers_url":"https://api.github.com/users/randall77/followers","following_url":"https://api.github.com/users/randall77/following{/other_user}","gists_url":"https://api.github.com/users/randall77/gists{/gist_id}","starred_url":"https://api.github.com/users/randall77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randall77/subscriptions","organizations_url":"https://api.github.com/users/randall77/orgs","repos_url":"https://api.github.com/users/randall77/repos","events_url":"https://api.github.com/users/randall77/events{/privacy}","received_events_url":"https://api.github.com/users/randall77/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/50","html_url":"https://github.com/golang/go/milestone/50","labels_url":"https://api.github.com/repos/golang/go/milestones/50/labels","id":2073599,"number":50,"title":"Go1.9Maybe","description":"","creator":{"login":"bradfitz","id":2621,"avatar_url":"https://avatars.githubusercontent.com/u/2621?v=3","gravatar_id":"","url":"https://api.github.com/users/bradfitz","html_url":"https://github.com/bradfitz","followers_url":"https://api.github.com/users/bradfitz/followers","following_url":"https://api.github.com/users/bradfitz/following{/other_user}","gists_url":"https://api.github.com/users/bradfitz/gists{/gist_id}","starred_url":"https://api.github.com/users/bradfitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradfitz/subscriptions","organizations_url":"https://api.github.com/users/bradfitz/orgs","repos_url":"https://api.github.com/users/bradfitz/repos","events_url":"https://api.github.com/users/bradfitz/events{/privacy}","received_events_url":"https://api.github.com/users/bradfitz/received_events","type":"User","site_admin":false},"open_issues":42,"closed_issues":4,"state":"open","created_at":"2016-10-17T07:59:14Z","updated_at":"2016-12-12T23:26:33Z","due_on":"2017-08-01T00:00:00Z","closed_at":null},"comments":1,"created_at":"2016-12-12T23:19:30Z","updated_at":"2016-12-12T23:48:42Z","closed_at":null,"body":"The `movw` and `movt` instructions were introduced in ARMv7 to improve the performance of immediate generation.\r\n\r\nAn instruction sequence like\r\n```\r\nmovw r0, #abcd\r\nmovt r0, #efff\r\n```\r\ncan be retired in a single cycle by some of the more modern Cortex-A chips (in both the 32- and 64-bit variety.)\r\n\r\nThe ARMv8 equivalent (for `0xb01dfacedebac1e0`) would be\r\n```\r\nmovz x0, #0xc1e0\r\nmovk x0, #0xdeba, lsl #16\r\nmovk x0, #0xface, lsl #32\r\nmovk x0, #0xb01d, lsl #48\r\n```\r\nand can be retired in as little as one or two cycles as well (but this time at a small code size penalty.) Keep in mind that arm loads, particularly in ARMv8, have more than single-cycle result latencies, so this sequence of `mov`s is likely faster even without the hardware optimization if the immediate is used... immediately.\r\n\r\nI'd also expect there to be a small but significant improvement in L1 dcache misses, since this would get the dcache out of the equation entirely.\r\n\r\nI'm not familiar enough with the toolchain to know whether or not `obj` would get grumpy if `MOVW` compiled to a different number of instructions depending on the immediate."},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/266590895","html_url":"https://github.com/golang/go/issues/18293#issuecomment-266590895","issue_url":"https://api.github.com/repos/golang/go/issues/18293","id":266590895,"user":{"login":"randall77","id":6889504,"avatar_url":"https://avatars.githubusercontent.com/u/6889504?v=3","gravatar_id":"","url":"https://api.github.com/users/randall77","html_url":"https://github.com/randall77","followers_url":"https://api.github.com/users/randall77/followers","following_url":"https://api.github.com/users/randall77/following{/other_user}","gists_url":"https://api.github.com/users/randall77/gists{/gist_id}","starred_url":"https://api.github.com/users/randall77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randall77/subscriptions","organizations_url":"https://api.github.com/users/randall77/orgs","repos_url":"https://api.github.com/users/randall77/repos","events_url":"https://api.github.com/users/randall77/events{/privacy}","received_events_url":"https://api.github.com/users/randall77/received_events","type":"User","site_admin":false},"created_at":"2016-12-12T23:48:42Z","updated_at":"2016-12-12T23:48:42Z","body":"@cherrymui "}}
{"actor":{"display_login":"randall77"}}