1 /* Copyright 2010, 2011 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/>. */
21 #if defined (__thumb__)
32 /* Test call and return */
38 nop @ Location test_ret_end
43 /* Test ldr from pc */
46 /* Test ldm/stm only in ARM mode */
47 #if !defined (__thumb__)
51 /* Test ldrX literal in ARM */
52 #if !defined (__thumb__)
56 /* Test 32-bit adr in ARM */
57 #if !defined(__thumb__)
61 #if !defined(__thumb__)
65 /* Test str in ARM mode and Thumb-2 */
66 #if !defined(__thumb__)
76 .global test_call_subr
77 #if defined (__thumb__)
81 .type test_call_subr, %function
86 nop @ Location test_call_end
90 .size test_call_subr, .-test_call_subr
94 #if defined (__thumb__)
98 .type test_branch, %function
104 .size test_branch, .-test_branch
107 #if defined (__thumb__)
111 .type test_ldr_pc, %function
118 .size test_ldr_pc, .-test_ldr_pc
120 #if !defined (__thumb__)
121 .global test_ldm_stm_pc
122 .type test_ldm_stm_pc, %function
136 .word test_ldm_stm_pc_ret
137 .size test_ldm_stm_pc, .-test_ldm_stm_pc
140 #if !defined (__thumb__)
141 .global test_ldr_literal
142 .type test_ldr_literal, %function
145 .global test_ldrsb_literal
148 .global test_ldrsh_literal
151 .global test_ldr_literal_end
152 test_ldr_literal_end:
154 .size test_ldr_literal, .-test_ldr_literal
158 #if !defined(__thumb__)
159 .global test_adr_32bit
160 #if defined(__thumb2__)
169 .global test_adr_32bit_after
170 test_adr_32bit_after:
173 .global test_adr_32bit_end
176 .size test_adr_32bit, .-test_adr_32bit
180 .type test_pop_pc, %function
181 #if defined(__thumb__)
188 #if defined(__thumb__)
194 .global test_pop_pc_1
197 .global test_pop_pc_ret
202 .word test_pop_pc_ret
203 .size test_pop_pc, .-test_pop_pc
205 #if !defined(__thumb__)
206 #if defined (__thumb2__)
211 .type test_str_pc, %function
216 /* compute offset again without displaced stepping. */
221 /* r0 should be equal to r1. */
225 .global pc_offset_right
229 .global pc_offset_wrong
233 .global test_str_pc_end