tlssunnopic32.s 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. .data
  2. .align 4096
  3. .section ".tbss"
  4. .align 4
  5. bl1: .word 0
  6. bl2: .word 0
  7. bl3: .word 0
  8. bl4: .word 0
  9. bl5: .word 0
  10. .text
  11. .align 4096
  12. .globl fn3
  13. .type fn3,#function
  14. .proc 04
  15. fn3:
  16. save %sp, -104, %sp
  17. .hidden _GLOBAL_OFFSET_TABLE_
  18. sethi %hi(_GLOBAL_OFFSET_TABLE_), %l1
  19. or %l1, %lo(_GLOBAL_OFFSET_TABLE_), %l1
  20. nop;nop;nop;nop
  21. /* IE against global var */
  22. sethi %tie_hi22(sg1), %o3
  23. add %o3, %tie_lo10(sg1), %o3
  24. ld [%l1 + %o3], %o2, %tie_ld(sg1)
  25. add %g7, %o2, %o4, %tie_add(sg1)
  26. nop;nop;nop;nop
  27. /* direct %g7 access IE against global var */
  28. sethi %tie_hi22(sg2), %o0
  29. add %o0, %tie_lo10(sg2), %o0
  30. ld [%l1 + %o0], %o0, %tie_ld(sg2)
  31. ld [%g7 + %o0], %o0, %tie_add(sg2)
  32. nop;nop;nop;nop
  33. /* IE against hidden var */
  34. sethi %tie_hi22(sh1), %o0
  35. add %o0, %tie_lo10(sh1), %o0
  36. ld [%l1 + %o0], %o0, %tie_ld(sh1)
  37. add %g7, %o0, %o0, %tie_add(sh1)
  38. nop;nop;nop;nop
  39. /* direct %g7 access IE against hidden var */
  40. sethi %tie_hi22(sh2), %o5
  41. add %o5, %tie_lo10(sh2), %o1
  42. ld [%l1 + %o1], %o2, %tie_ld(sh2)
  43. stb %o3, [%g7 + %o2], %tie_add(sh2)
  44. nop;nop;nop;nop
  45. /* IE against local var */
  46. sethi %tie_hi22(bl1), %o0
  47. add %o0, %tie_lo10(bl1), %o0
  48. ld [%l1 + %o0], %o0, %tie_ld(bl1)
  49. add %g7, %o0, %o0, %tie_add(bl1)
  50. nop;nop;nop;nop
  51. /* direct %g7 access IE against local var */
  52. sethi %tie_hi22(bl2), %o5
  53. add %o5, %tie_lo10(bl2), %o1
  54. ld [%l1 + %o1], %o2, %tie_ld(bl2)
  55. stb %o3, [%g7 + %o2], %tie_add(bl2)
  56. nop;nop;nop;nop
  57. /* LE, local var */
  58. sethi %tle_hix22(bl3+1), %o2
  59. xor %o2, %tle_lox10(bl3+1), %o4
  60. add %g7, %o4, %o0
  61. nop;nop;nop;nop
  62. /* LE, hidden var, direct %g7 access */
  63. sethi %tle_hix22(sh3), %o2
  64. xor %o2, %tle_lox10(sh3), %o2
  65. ld [%g7 + %o2], %o2
  66. nop;nop;nop;nop
  67. ret
  68. restore