1 /* Unwinder test program.
3 Copyright 2006-2019 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 void tpcs_frame (void);
21 void switch_stack_to_same (void);
22 void switch_stack_to_other (void);
28 switch_stack_to_same ();
29 switch_stack_to_other ();
33 /* Normally Thumb functions use r7 as the frame pointer. However,
34 with the GCC option -mtpcs-frame, they may use fp instead. Make
35 sure that the prologue analyzer can handle this. */
47 " str r7, [sp, #16]\n"
51 " str r7, [sp, #12]\n"
57 /* We'll set a breakpoint at this call. We can't hardcode a trap
58 instruction; the right instruction to use varies too much. And
59 we can't use a global label, because GDB will think that's the
60 start of a new function. So, this slightly convoluted
74 " .type tpcs_offset, %object\n"
76 " .word .Ltpcs - tpcs_frame_1\n"
87 " str r7, [sp, #16]\n"
91 " str r7, [sp, #12]\n"
97 /* Clobber saved regs around the call. */
105 " pop {r1, r2, r3}\n"
123 "switch_stack_to_same:\n"
133 "switch_stack_to_other:\n"