Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame^] | 1 | .text |
| 2 | foo: |
| 3 | # leaq of OPENSSL_ia32cap_P is supported. |
| 4 | leaq OPENSSL_ia32cap_P(%rip), %r11 |
| 5 | |
| 6 | # As is the equivalent GOTPCREL movq. |
| 7 | movq OPENSSL_ia32cap_P@GOTPCREL(%rip), %r12 |
| 8 | |
| 9 | # Test that GOTPCREL accesses get translated. They are handled |
| 10 | # differently for local and external symbols. |
| 11 | |
| 12 | pushq stderr@GOTPCREL(%rip) |
| 13 | pushq foo@GOTPCREL(%rip) |
| 14 | |
| 15 | movq stderr@GOTPCREL(%rip), %r11 |
| 16 | movq foo@GOTPCREL(%rip), %r11 |
| 17 | |
| 18 | vmovq stderr@GOTPCREL(%rip), %xmm0 |
| 19 | vmovq foo@GOTPCREL(%rip), %xmm0 |
| 20 | |
| 21 | cmoveq stderr@GOTPCREL(%rip), %r11 |
| 22 | cmoveq foo@GOTPCREL(%rip), %r11 |
| 23 | cmovneq stderr@GOTPCREL(%rip), %r11 |
| 24 | cmovneq foo@GOTPCREL(%rip), %r11 |
| 25 | |
| 26 | # Synthesized symbols do not use the GOT. |
| 27 | movq BORINGSSL_bcm_text_start@GOTPCREL(%rip), %r11 |
| 28 | movq foobar_bss_get@GOTPCREL(%rip), %r11 |
| 29 | movq OPENSSL_ia32cap_get@GOTPCREL(%rip), %r11 |
| 30 | |
| 31 | .comm foobar,64,32 |