* gas/arm/thumb2_bcond.d: Allow for varying number of nops at the
[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]
38ldr sp, [r0, +pc]
39
40str r0, [sp]
539d4391 41str sp, [r0]
539d4391 42str sp, [sp]
539d4391
NC
43str sp, [r0, +pc]
44
45@ R13 as the first operand <Rn> in any add{s}, cmn, cmp, or sub{s} instruction.
46
47add r0, sp, r0
48adds r0, sp, r0
49add r0, sp, r0, lsl #1
50adds r0, sp, r0, lsl #1
51
52cmn sp, #0
53cmn sp, r0
54cmn sp, r0, lsl #1
55cmp sp, #0
56cmp sp, r0
57cmp sp, r0, lsl #1
58
59sub sp, #0
60subs sp, #0
61sub r0, sp, #0
62subs r0, sp, #0
63
64@ ADD (sp plus immediate).
65
66add sp, #4
67add r0, sp, #4
68adds sp, #4
69adds r0, sp, #4
70addw r0, sp, #4
71
72add sp, sp, #4
73adds sp, sp, #4
74addw sp, sp, #4
75
76@ ADD (sp plus register).
77
78add sp, r0
79add r0, sp, r0
80add r0, sp, r0, lsl #1
81adds sp, r0
82adds r0, sp, r0
83adds r0, sp, r0, lsl #1
84
85add sp, sp, r0
86add sp, sp, r0, lsl #1
87adds sp, sp, r0
88adds sp, sp, r0, lsl #1
89
90add sp, sp, sp
91
92@ SUB (sp minus immediate).
93
94sub r0, sp , #0
95subs r0, sp , #0
96subw r0, sp , #0
97
98sub sp, sp , #0
99subs sp, sp , #0
100subw sp, sp , #0
101
102@ SUB (sp minus register).
103
104sub sp, #0
105subs sp, #0
106sub r0, sp, r0, lsl #1
107subs r0, sp, r0, lsl #1
108
109sub sp, sp, r0, lsl #1
110subs sp, sp, r0, lsl #1
111
112@ PC-related insns (equivalent to adr).
113
114add r0, pc, #4
115sub r0, pc, #4
116adds r0, pc, #4
117subs r0, pc, #4
118addw r0, pc, #4
119subw r0, pc, #4
120
121@ nops to pad the section out to an alignment boundary.
122
123nop
124nop
125nop
This page took 0.052542 seconds and 4 git commands to generate.