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