1 /* Copyright (C) 2013-2014 Free Software Foundation, Inc.
2 Contributed by Andreas Krebbel <krebbel@linux.vnet.ibm.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/>. */
30 .globl _ITM_beginTransaction
31 .type _ITM_beginTransaction, @function
33 /* _ITM_beginTransaction (int props); props -> r2 */
34 _ITM_beginTransaction:
37 lgr %r3,%r15 /* backup stack pointer */
38 aghi %r15,-304 /* jump buffer (144) + reg save area (160) */
39 cfi_adjust_cfa_offset(304)
40 stmg %r6,%r14,160(%r15)
41 stg %r3,72+160(%r15) /* store the old stack pointer */
45 std %f11,104+160(%r15)
46 std %f12,112+160(%r15)
47 std %f13,120+160(%r15)
48 std %f14,128+160(%r15)
49 std %f15,136+160(%r15)
50 la %r3,160(%r15) /* second argument to GTM_begin_transaction */
51 brasl %r14,GTM_begin_transaction
54 cfi_adjust_cfa_offset(-304)
57 lr %r3,%r15 /* backup stack pointer */
58 ahi %r15,-152 /* jump buffer (56) + reg save area (96) */
59 cfi_adjust_cfa_offset(152)
61 st %r3,36+96(%r15) /* store the old stack pointer */
64 la %r3,96(%r15) /* second argument to GTM_begin_transaction */
65 /* begin_transaction (uint32_t prop, const gtm_jmpbuf *jb) */
66 brasl %r14,GTM_begin_transaction /* requires mzarch */
69 cfi_adjust_cfa_offset(-152)
74 .size _ITM_beginTransaction, .-_ITM_beginTransaction
78 .type GTM_longjmp, @function
81 /* uint32_t GTM_longjmp (uint32_t, const gtm_jmpbuf *, uint32_t) */
83 /* First parameter becomes the return value of
84 _ITM_beginTransaction (r2).
85 Third parameter is ignored for now. */
106 .size GTM_longjmp, .-GTM_longjmp
108 .section .note.GNU-stack, "", @progbits