sjlj.S 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /* Copyright (C) 2009-2015 Free Software Foundation, Inc.
  2. Contributed by Richard Henderson <rth@redhat.com>.
  3. This file is part of the GNU Transactional Memory Library (libitm).
  4. Libitm is free software; you can redistribute it and/or modify it
  5. under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3 of the License, or
  7. (at your option) any later version.
  8. Libitm is distributed in the hope that it will be useful, but WITHOUT ANY
  9. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  10. FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  11. more details.
  12. Under Section 7 of GPL version 3, you are granted additional
  13. permissions described in the GCC Runtime Library Exception, version
  14. 3.1, as published by the Free Software Foundation.
  15. You should have received a copy of the GNU General Public License and
  16. a copy of the GCC Runtime Library Exception along with this program;
  17. see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  18. <http://www.gnu.org/licenses/>. */
  19. .text
  20. .align 4
  21. .globl _ITM_beginTransaction
  22. .ent _ITM_beginTransaction
  23. #define FRAME 144
  24. _ITM_beginTransaction:
  25. ldgp $29, 0($27)
  26. subq $30, FRAME, $30
  27. .frame $30, FRAME, $26, 0
  28. .mask 0x04000000, 0
  29. stq $26, 0($30)
  30. .prologue 1
  31. stq $9, 8($30)
  32. stq $10, 16($30)
  33. addq $30, FRAME, $0
  34. stq $11, 24($30)
  35. stq $12, 32($30)
  36. stq $13, 40($30)
  37. stq $14, 48($30)
  38. stq $15, 56($30)
  39. stq $0, 64($30)
  40. stt $f2, 72($30)
  41. stt $f3, 80($30)
  42. stt $f4, 88($30)
  43. stt $f5, 96($30)
  44. stt $f6, 104($30)
  45. stt $f7, 112($30)
  46. stt $f8, 120($30)
  47. stt $f9, 128($30)
  48. mov $30, $17
  49. #ifdef __PIC__
  50. unop
  51. bsr $26, GTM_begin_transaction !samegp
  52. #else
  53. jsr $26, GTM_begin_transaction
  54. ldgp $29, 0($26)
  55. #endif
  56. ldq $26, 0($30)
  57. addq $30, FRAME, $30
  58. ret
  59. .end _ITM_beginTransaction
  60. .align 4
  61. .globl GTM_longjmp
  62. #ifdef __ELF__
  63. .hidden GTM_longjmp
  64. #endif
  65. .ent GTM_longjmp
  66. GTM_longjmp:
  67. .prologue 0
  68. ldq $26, 0($17)
  69. ldq $9, 8($17)
  70. ldq $10, 16($17)
  71. ldq $11, 24($17)
  72. ldq $12, 32($17)
  73. ldq $13, 40($17)
  74. ldq $14, 48($17)
  75. ldq $15, 56($17)
  76. ldq $1, 64($17)
  77. ldt $f2, 72($17)
  78. ldt $f3, 80($17)
  79. ldt $f4, 88($17)
  80. ldt $f5, 96($17)
  81. ldt $f6, 104($17)
  82. ldt $f7, 112($17)
  83. ldt $f8, 120($17)
  84. ldt $f9, 128($17)
  85. mov $16, $0
  86. mov $1, $30
  87. ret
  88. .end GTM_longjmp
  89. #ifdef __linux__
  90. .section .note.GNU-stack, "", @progbits
  91. #endif