Arm: Clean up PE GAS testsuite correct THUMB tests.
[deliverable/binutils-gdb.git] / gas / testsuite / gas / arm / sp-pc-usage-t.s
CommitLineData
539d4391
NC
1.arch armv7-r
2.syntax unified
3.text
4.thumb
5 .global foo
6foo:
7@ Section A6.1.3 "Use of 0b1101 as a register specifier".
8
9@ R13 as the source or destination register of a mov instruction.
10@ only register to register transfers without shifts are supported,
11@ with no flag setting
12
13mov sp,r0
14mov r0,sp
15
16@ Using the following instructions to adjust r13 up or down by a
17@ multiple of 4:
18
19add sp,sp,#0
20addw sp,sp,#0
21sub sp,sp,#0
22subw sp,sp,#0
23add sp,sp,r0
24add sp,sp,r0,lsl #1
25sub sp,sp,r0
26sub sp,sp,r0,lsl #1
27
28@ R13 as a base register <Rn> of any load/store instruction.
29
30ldr r0, [sp]
31ldr r0, [pc]
32ldr pc, [r0]
33ldr sp, [r0]
34ldr pc, [pc]
35ldr sp, [sp]
36ldr pc, [sp]
37ldr sp, [pc]
539d4391
NC
38
39str r0, [sp]
539d4391 40str sp, [r0]
539d4391 41str sp, [sp]
539d4391
NC
42
43@ R13 as the first operand <Rn> in any add{s}, cmn, cmp, or sub{s} instruction.
44
45add r0, sp, r0
46adds r0, sp, r0
47add r0, sp, r0, lsl #1
48adds r0, sp, r0, lsl #1
49
50cmn sp, #0
51cmn sp, r0
52cmn sp, r0, lsl #1
53cmp sp, #0
54cmp sp, r0
55cmp sp, r0, lsl #1
56
57sub sp, #0
58subs sp, #0
59sub r0, sp, #0
60subs r0, sp, #0
61
62@ ADD (sp plus immediate).
63
64add sp, #4
65add r0, sp, #4
66adds sp, #4
67adds r0, sp, #4
68addw r0, sp, #4
69
70add sp, sp, #4
71adds sp, sp, #4
72addw sp, sp, #4
73
74@ ADD (sp plus register).
75
76add sp, r0
77add r0, sp, r0
78add r0, sp, r0, lsl #1
79adds sp, r0
80adds r0, sp, r0
81adds r0, sp, r0, lsl #1
82
83add sp, sp, r0
84add sp, sp, r0, lsl #1
85adds sp, sp, r0
86adds sp, sp, r0, lsl #1
87
88add sp, sp, sp
89
90@ SUB (sp minus immediate).
91
92sub r0, sp , #0
93subs r0, sp , #0
94subw r0, sp , #0
95
96sub sp, sp , #0
97subs sp, sp , #0
98subw sp, sp , #0
99
100@ SUB (sp minus register).
101
102sub sp, #0
103subs sp, #0
104sub r0, sp, r0, lsl #1
105subs r0, sp, r0, lsl #1
106
107sub sp, sp, r0, lsl #1
108subs sp, sp, r0, lsl #1
109
110@ PC-related insns (equivalent to adr).
111
112add r0, pc, #4
113sub r0, pc, #4
114adds r0, pc, #4
115subs r0, pc, #4
116addw r0, pc, #4
117subw r0, pc, #4
118
119@ nops to pad the section out to an alignment boundary.
120
121nop
122nop
123nop
This page took 0.626933 seconds and 4 git commands to generate.