Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: Possible to synthesize base registers for PPC64 addressing? #17347

Closed
dr2chase opened this issue Oct 5, 2016 · 2 comments
Closed

Comments

@dr2chase
Copy link
Contributor

dr2chase commented Oct 5, 2016

Saw this while studying disassembly of math.test for #17109:

   111b0:       1e 00 e0 3f     lis     r31,30
   111b4:       b0 2d 9f e8     ld      r4,11696(r31)
   111b8:       1e 00 e0 3f     lis     r31,30
   111bc:       b8 2d bf e8     ld      r5,11704(r31)
   111c0:       1e 00 e0 3f     lis     r31,30
   111c4:       c0 2d df e8     ld      r6,11712(r31)
   111c8:       1e 00 e0 3f     lis     r31,30
   111cc:       70 2d ff e8     ld      r7,11632(r31)
   111d0:       1e 00 e0 3f     lis     r31,30
   111d4:       78 2d 1f e9     ld      r8,11640(r31)
   111d8:       1e 00 e0 3f     lis     r31,30
   111dc:       80 2d 3f e9     ld      r9,11648(r31)
   111e0:       1e 00 e0 3f     lis     r31,30
   111e4:       90 2d 5f e9     ld      r10,11664(r31)
   111e8:       1e 00 e0 3f     lis     r31,30
   111ec:       98 2d 7f e9     ld      r11,11672(r31)
   111f0:       1e 00 e0 3f     lis     r31,30
   111f4:       a0 2d 9f e9     ld      r12,11680(r31)

"lis" is load-immediate-shifted.

This comes from this ASM:

v44 00095 (/.../math/_test/_testmain.go:300) MOVD "".tests(SB), R4
v45 00096 (/.../math/_test/_testmain.go:300) MOVD "".tests+8(SB), R5
v47 00097 (/.../math/_test/_testmain.go:300) MOVD "".tests+16(SB), R6
v49 00098 (/.../math/_test/_testmain.go:300) MOVD "".benchmarks(SB), R7
v50 00099 (/.../math/_test/_testmain.go:300) MOVD "".benchmarks+8(SB), R8
v52 00100 (/.../math/_test/_testmain.go:300) MOVD "".benchmarks+16(SB), R9
v54 00101 (/.../math/_test/_testmain.go:300) MOVD "".examples(SB), R10
v55 00102 (/.../math/_test/_testmain.go:300) MOVD "".examples+8(SB), R11
v57 00103 (/.../math/_test/_testmain.go:300) MOVD "".examples+16(SB), R12

Doing better is an option -- we may not know the addressing relation between tests and benchmarks, but benchmarks and benchmarks+K is pretty obvious.

@laboger
Copy link
Contributor

laboger commented Oct 5, 2016

This is a duplicate of #17110.

@dr2chase dr2chase closed this as completed Oct 5, 2016
@dr2chase
Copy link
Contributor Author

dr2chase commented Oct 5, 2016

thanks for catching that

@golang golang locked and limited conversation to collaborators Oct 5, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants