Add translations for various sub-directories
[binutils-gdb.git] / gdb / testsuite / gdb.arch / arm-pseudo-unwind-asm.S
blob46cde89a522e45316ccccfe49ae94a939d569efe
1 /* Copyright 2018-2024 Free Software Foundation, Inc.
3    This file is part of GDB.
5    This program is free software; you can redistribute it and/or modify
6    it under the terms of the GNU General Public License as published by
7    the Free Software Foundation; either version 3 of the License, or
8    (at your option) any later version.
10    This program 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
13    GNU General Public License for more details.
15    You should have received a copy of the GNU General Public License
16    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
18 .section .note.GNU-stack,"",%progbits
20 .data
21 value_callee:
22 .quad 0x2021222324252627
23 value_caller:
24 .quad 0x1011121314151617
26 .text
27 .arm
28 .global callee
29 callee:
30         /* Standard prologue.  */
31 .cfi_startproc
32         push {fp, lr}
33 .cfi_def_cfa fp, 4
34 .cfi_offset fp, -8
35 .cfi_offset lr, -4
36         add fp, sp, #4
38         /* Save caller's d8 value on the stack.  */
39 .cfi_offset d8, -16
40         vpush {d8}
42         /* Put our own d8 value.  */
43         ldr r0, =value_callee
44         vldr d8, [r0]
45 break_here_asm:
47         /* Restore caller's d8 value.  */
48         vpop {d8}
50         /* Standard epilogue.  */
51         pop {fp, pc}
52 .cfi_endproc
55 .global caller
56 caller:
57         /* Standard prologue.  */
58 .cfi_startproc
59         push {fp, lr}
60 .cfi_def_cfa fp, 4
61 .cfi_offset fp, -8
62 .cfi_offset lr, -4
63         add fp, sp, #4
65         /* Put our own d8 value.  */
66         ldr r0, =value_caller
67         vldr d8, [r0]
69         /* Call callee.  */
70         bl callee
72         /* Store our d8 value in r0-r1 to return it.  */
73         vpush {d8}
74         pop {r0}
75         pop {r1}
77         /* Standard epilogue.  */
78         pop {fp, pc}
79 .cfi_endproc