1 .text 2foo: 3bar: 4 # leaq of OPENSSL_ia32cap_P is supported. 5 leaq OPENSSL_ia32cap_P(%rip), %r11 6 7 # As is the equivalent GOTPCREL movq. 8 movq OPENSSL_ia32cap_P@GOTPCREL(%rip), %r12 9 10 # And a non-movq instruction via the GOT. 11 orq OPENSSL_ia32cap_P@GOTPCREL(%rip), %r12 12 13 # ... which targets the default temp register 14 orq OPENSSL_ia32cap_P@GOTPCREL(%rip), %rax 15 16 # Test that GOTPCREL accesses get translated. They are handled 17 # differently for local and external symbols. 18 19 pushq stderr@GOTPCREL(%rip) 20 pushq foo@GOTPCREL(%rip) 21 22 movq stderr@GOTPCREL(%rip), %r11 23 movq foo@GOTPCREL(%rip), %r11 24 25 vmovq stderr@GOTPCREL(%rip), %xmm0 26 vmovq foo@GOTPCREL(%rip), %xmm0 27 28 cmoveq stderr@GOTPCREL(%rip), %r11 29 cmoveq foo@GOTPCREL(%rip), %r11 30 cmovneq stderr@GOTPCREL(%rip), %r11 31 cmovneq foo@GOTPCREL(%rip), %r11 32 33 movsd foo@GOTPCREL(%rip), %xmm0 34 vmovsd foo@GOTPCREL(%rip), %xmm0 35 36 # movsd without arguments should be left as-is. 37 movsd 38 39 # Synthesized symbols do not use the GOT. 40 movq BORINGSSL_bcm_text_start@GOTPCREL(%rip), %r11 41 movq foobar_bss_get@GOTPCREL(%rip), %r11 42 movq OPENSSL_ia32cap_get@GOTPCREL(%rip), %r11 43 44 # Transforming moves run the transform in-place after the load. 45 vpbroadcastq stderr@GOTPCREL(%rip), %xmm0 46 vpbroadcastq foo@GOTPCREL(%rip), %xmm0 47 48 # GCC sometimes loads a pair of pointers into an XMM register and 49 # writes them together. 50 movq gcm_gmult_clmul@GOTPCREL(%rip), %xmm0 51 movhps gcm_ghash_clmul@GOTPCREL(%rip), %xmm0 52 movaps %xmm0, (%rsp) 53 54 # We've yet to observe this, but the above could also have been written 55 # with movlps. 56 movhps gcm_ghash_clmul@GOTPCREL(%rip), %xmm0 57 movlps gcm_gmult_clmul@GOTPCREL(%rip), %xmm0 58 movaps %xmm0, (%rsp) 59 60 # Same as above, but with a local symbol. 61 movhps foo@GOTPCREL(%rip), %xmm0 62 movlps bar@GOTPCREL(%rip), %xmm0 63 movaps %xmm0, (%rsp) 64 65 cmpq foo@GOTPCREL(%rip), %rax 66 cmpq %rax, foo@GOTPCREL(%rip) 67 68.comm foobar,64,32 69