1 /* Copyright (C) 2014 Free Software Foundation, Inc.
2 Contributed by Richard Henderson <rth@redhat.com>.
4 This file is part of the GNU Transactional Memory Library (libitm).
6 Libitm is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 Libitm is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 Under Section 7 of GPL version 3, you are granted additional
17 permissions described in the GCC Runtime Library Exception, version
18 3.1, as published by the Free Software Foundation.
20 You should have received a copy of the GNU General Public License and
21 a copy of the GCC Runtime Library Exception along with this program;
22 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23 <http://www.gnu.org/licenses/>. */
29 .global _ITM_beginTransaction
30 .type _ITM_beginTransaction, %function
32 _ITM_beginTransaction:
35 stp x29, x30, [sp, -11*16]!
36 cfi_adjust_cfa_offset(11*16)
37 cfi_rel_offset(x29, 0)
38 cfi_rel_offset(x30, 8)
40 stp x19, x20, [sp, 1*16]
41 stp x21, x22, [sp, 2*16]
42 stp x23, x24, [sp, 3*16]
43 stp x25, x26, [sp, 4*16]
44 stp x27, x28, [sp, 5*16]
45 stp d8, d9, [sp, 6*16]
46 stp d10, d11, [sp, 7*16]
47 stp d12, d13, [sp, 8*16]
48 stp d14, d15, [sp, 9*16]
51 /* Invoke GTM_begin_transaction with the struct we just built. */
53 bl GTM_begin_transaction
55 /* Return; we don't need to restore any of the call-saved regs. */
58 cfi_adjust_cfa_offset(-11*16)
63 .size _ITM_beginTransaction, . - _ITM_beginTransaction
68 .type GTM_longjmp, %function
71 /* The first parameter becomes the return value (x0).
72 The third parameter is ignored for now. */
74 ldp x19, x20, [x1, 1*16]
75 ldp x21, x22, [x1, 2*16]
76 ldp x23, x24, [x1, 3*16]
77 ldp x25, x26, [x1, 4*16]
78 ldp x27, x28, [x1, 5*16]
79 ldp d8, d9, [x1, 6*16]
80 ldp d10, d11, [x1, 7*16]
81 ldp d12, d13, [x1, 8*16]
82 ldp d14, d15, [x1, 9*16]
89 .size GTM_longjmp, . - GTM_longjmp
92 .section .note.GNU-stack, "", %progbits