pr25416-5c.s 935 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. .text
  2. .p2align 4
  3. .globl test1
  4. .type test1, @function
  5. test1:
  6. .cfi_startproc
  7. subq $8, %rsp
  8. .cfi_def_cfa_offset 16
  9. lea foo@TLSDESC(%rip), %rax
  10. call *foo@TLSCALL(%rax)
  11. addl %fs:0, %eax
  12. cmpl %edi, (%eax)
  13. jne .L5
  14. movl %eax, %r8d
  15. addq $8, %rsp
  16. .cfi_remember_state
  17. .cfi_def_cfa_offset 8
  18. movq %r8, %rax
  19. ret
  20. .L5:
  21. .cfi_restore_state
  22. call abort@PLT
  23. .cfi_endproc
  24. .size test1, .-test1
  25. .p2align 4
  26. .globl test2
  27. .type test2, @function
  28. test2:
  29. .cfi_startproc
  30. subq $8, %rsp
  31. .cfi_def_cfa_offset 16
  32. lea bar@TLSDESC(%rip), %rax
  33. call *bar@TLSCALL(%rax)
  34. addl %fs:0, %eax
  35. cmpl %edi, (%eax)
  36. jne .L9
  37. movl %eax, %r8d
  38. addq $8, %rsp
  39. .cfi_remember_state
  40. .cfi_def_cfa_offset 8
  41. movq %r8, %rax
  42. ret
  43. .L9:
  44. .cfi_restore_state
  45. call abort@PLT
  46. .cfi_endproc
  47. .size test2, .-test2
  48. .section .tdata,"awT",@progbits
  49. .align 4
  50. .hidden foo
  51. .globl foo
  52. .type foo, @object
  53. .size foo, 4
  54. foo:
  55. .long 30
  56. .section .note.GNU-stack,"",@progbits