1 /* _Unwind_Resume wrapper for ARM EABI.
2 Copyright (C) 2015-2017 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
21 /* This is just implementing exactly what the C version does.
22 We do it in assembly just to ensure that we get an unmolested tail
23 call to the libgcc function, which is necessary for the ARM unwinder. */
25 ENTRY (_Unwind_Resume)
26 LDR_HIDDEN (ip, ip, __libgcc_s_resume, 0)
29 0: PTR_DEMANGLE (ip, ip, r2, r3)
32 /* We need to save and restore LR (for our own return address)
33 and R0 (for the argument to _Unwind_Resume) around the call. */
35 cfi_adjust_cfa_offset (8)
36 cfi_rel_offset (r0, 0)
37 cfi_rel_offset (lr, 4)
40 cfi_adjust_cfa_offset (-8)
44 LDR_HIDDEN (ip, ip, __libgcc_s_resume, 0)