Project

General

Profile

Instruction Set Architecture » History » Version 8

Alexander Protsenko, 03/16/2023 01:58 PM

1 1 Alexander Protsenko
h1. Instruction Set Architecture
2
3 3 Alexander Protsenko
h2. Data processing - immediate
4
5 1 Alexander Protsenko
h3. Arithmetic (immediate)
6
7
### ADD (immediate). Add.
8
Specification: add, add_32
9
### SUB (immediate). Subtract.
10
Specification: sub, sub_32
11
### ADDS (immediate). Add and set flags.
12
Specification: adds, adds_32
13
### SUBS (immediate). Subtract and set flags.
14
Specification: subs, subs_32
15
### CMP (immediate). Compare.
16
Specification: cmp, cmp_32
17
### CMN (immediate). Compare negative.
18
Specification: cmn, cmn_32
19
20
h3. Logical (immediate)
21
22
### AND (immediate). Bitwise AND
23
Specification: and_bitmask, and_bitmask_32
24
### ANDS (immediate). Bitwise AND and set flags
25
Specification: ands_bitmask, ands_bitmask_32
26
### EOR (immediate). Bitwise exclusive OR
27
Specification: eor_bitmask, eor_bitmask_32
28
### ORR (immediate). Bitwise inclusive OR
29
Specification: orr_bitmask, orr_bitmask_32
30
### TST (immediate). TST Test bits
31
Specification: tst_bitmask, tst_bitmask_32
32
33
h3. Move (wide immediate)
34
35
### MOVZ. Move wide with zero
36
Specification: movz, movz_32
37
### MOVN. Move wide with NOT
38
Specification: movn, movn_32
39
### MOVK. Move wide with keep
40
Specification: movk, movk_32
41
42
h3. Move (immediate)
43
44
### MOV (wide immediate). Move (wide immediate)
45
Specification: mov_wide_imm, mov_wide_imm_32
46
### MOV (inverted wide immediate). Move (inverted wide immediate)
47
Specification: mov_inv_wide_imm, mov_inv_wide_imm_32
48 2 Alexander Protsenko
### MOV (bitmask immediate). Move (bitmask immediate)
49 1 Alexander Protsenko
Specification: mov_bitmask, mov_bitmask_32
50
51 3 Alexander Protsenko
h3. PC-relative address calculation
52
53
### ADRP. Compute address of 4KB page at a PC-relative offset
54
Specification: adrp
55
### ADR. Compute address of label at a PC-relative offset.
56
Specification: adr
57
58
h3. Extract register
59
60
### EXTR. Extract register from pair
61
Specification: extr, extr_32
62
63
h2. Data processing - register
64
65
h3. Arithmetic (shifted register)
66
67
### ADD (shifted register). Add
68
Specification: add_sh_reg, add_sh_reg_32
69
### ADDS (shifted register). Add and set flags
70
Specification: adds_sh_reg, adds_sh_reg_32
71
### SUB (shifted register). Subtract
72
Specification: sub_sh_reg, sub_sh_reg_32
73
### SUBS (shifted register). Subtract and set flags
74
Specification: subs_sh_reg, subs_sh_reg_32
75
### CMN (shifted register). Compare negative
76
Specification: cmn_sh_reg, cmn_sh_reg_32
77
### CMP (shifted register). Compare
78
Specification: cmp_sh_reg, cmp_sh_reg_32
79
80
h3. Arithmetic (extending register)
81
82
### ADD (extended register). Add
83
Specification: add_ex_reg, add_ex_reg_32
84
### ADDS (extended register). Add and set flags
85
Specification: adds_ex_reg, adds_ex_reg_32
86
### SUB (extended register). Subtract
87
Specification: sub_ex_reg, sub_ex_reg_32
88
### SUBS (extended register). Subtract and set flags
89
Specification: subs_ex_reg, subs_ex_reg_32
90
### CMN (extended register). Compare negative
91
Specification: cmn_ex_reg, cmn_ex_reg_32
92
### CMP (extended register). Compare
93
Specification: cmp_ex_reg, cmp_ex_reg_32
94 1 Alexander Protsenko
95
h3. Logical (shifted register)
96
97 4 Alexander Protsenko
### AND (shifted register). Bitwise AND
98
Specification: and_bitwise, and_bitwise_32
99
### ANDS (shifted register). Bitwise AND and set flags
100
Specification: ands_bitwise, ands_bitwise_32
101
### BIC (shifted register). Bitwise bit clear
102
Specification: bic_bitwise, bic_bitwise_32
103
### BICS (shifted register). Bitwise bit clear and set flags
104
Specification: bics_bitwise, bics_bitwise_32
105
### EON (shifted register). Bitwise exclusive OR NOT
106
Specification: eon_bitwise, eon_bitwise_32
107
### EOR (shifted register). Bitwise exclusive OR
108
Specification: eor_bitwise, eor_bitwise_32
109
### ORR (shifted register). Bitwise inclusive OR
110
Specification: orr_bitwise, orr_bitwise_32
111
### MVN. Bitwise NOT
112
Specification: mvn_bitwise, mvn_bitwise_32
113
### ORN (shifted register). Bitwise inclusive OR NOT
114
Specification: orn_bitwise, orn_bitwise_32
115
### TST (shifted register). Test bits
116
Specification: tst_bitwise, tst_bitwise_32
117
118
h3. Move (register)
119
120
###  MOV (register). Move register
121
Specification: mov_reg, mov_reg_32
122
### MOV (to/from SP). Move register to SP or move SP to register
123
Specification: mov_sp, mov_sp_32
124 3 Alexander Protsenko
125 5 Alexander Protsenko
h3. Multiply and divide
126
127 6 Alexander Protsenko
###  MADD. Multiply-add
128 5 Alexander Protsenko
Specification: madd, madd_32
129 6 Alexander Protsenko
###  MSUB. Multiply-subtract
130 5 Alexander Protsenko
Specification: msub, msub_32
131 6 Alexander Protsenko
###  MNEG. Multiply-negate
132 5 Alexander Protsenko
Specification: mneg, mneg_32
133 6 Alexander Protsenko
###  MUL. Multiply
134 5 Alexander Protsenko
Specification: mul, mul_32
135 6 Alexander Protsenko
###  SMADDL. Signed multiply-add long
136 5 Alexander Protsenko
Specification: smaddl
137 6 Alexander Protsenko
###  SMSUBL. Signed multiply-subtract long
138 5 Alexander Protsenko
Specification: smsubl
139 6 Alexander Protsenko
###  SMNEGL. Signed multiply-negate long
140 5 Alexander Protsenko
Specification: smnegl
141 6 Alexander Protsenko
###  SMULL. Signed multiply long
142 5 Alexander Protsenko
Specification: smull
143 6 Alexander Protsenko
###  SMULH. Signed multiply high
144 5 Alexander Protsenko
Specification: smulh
145 6 Alexander Protsenko
###  UMADDL. Unsigned multiply-add long
146 5 Alexander Protsenko
Specification: umaddl
147 6 Alexander Protsenko
###  UMSUBL. Unsigned multiply-subtract long
148 5 Alexander Protsenko
Specification: umsubl
149 6 Alexander Protsenko
###  UMNEGL. Unsigned multiply-negate long
150 5 Alexander Protsenko
Specification: umnegl
151 6 Alexander Protsenko
###  UMULL. Unsigned multiply long
152 5 Alexander Protsenko
Specification: umull
153 6 Alexander Protsenko
###  UMULH. Unsigned multiply high
154 5 Alexander Protsenko
Specification: umulh
155
156
h3. Divide
157
158 6 Alexander Protsenko
###  SDIV. Signed divide
159 5 Alexander Protsenko
Specification: sdiv, sdiv_32
160
###  UDIV. Unsigned divide
161
Specification: udiv, udiv_32
162
163 7 Alexander Protsenko
h2. Branches, Exception generating, and System instructions
164 1 Alexander Protsenko
165 7 Alexander Protsenko
h3. Conditional Branch
166
167
###  B.cond. Branch conditionally
168
Specification: b
169
### CBNZ. Compare and branch if nonzero
170
Specification: cbnz, cbnz_32
171
### CBZ. Compare and branch if zero
172
Specification: cbz, cbz_32
173
### TBNZ. Test bit and branch if nonzero
174
Specification: tbnz
175
### TBZ. Test bit and branch if zero
176
Specification: tbz
177
178
h3. Unconditional branch (immediate)
179
180
### B. Branch unconditionally
181
Specification: b_imm
182
### BL. Branch with link
183
Specification: bl
184
185
h3. Unconditional branch (register)
186
187
### BLR. Branch with link to register
188
Specification: blr
189
### BR. Branch to register
190
Specification: br
191
### RET. Return from subroutine
192
Specification: ret
193
194
h3. Exception generation and return
195
196 8 Alexander Protsenko
*Exception generating*
197
198 7 Alexander Protsenko
### BRK. Breakpoint Instruction
199
Specification: brk
200
### HLT. Halt Instruction HLT
201
Specification: hlt
202
### HVC. Generate exception targeting Exception level 2 HVC
203
Specification: hvc
204
### SMC. Generate exception targeting Exception level 3 SMC
205
Specification: smc
206
### SVC. Generate exception targeting Exception level 1
207
Specification: svc
208 8 Alexander Protsenko
209
*Exception return*
210
211 1 Alexander Protsenko
### ERET. Exception return using current ELR and SPSR
212
Specification: eret
213
214 8 Alexander Protsenko
*Debug state*
215 1 Alexander Protsenko
216 8 Alexander Protsenko
### DCPS1. Debug switch to Exception level 1 DCPS1
217
Specification: dcps1
218
### DCPS2. Debug switch to Exception level 2 DCPS2
219
Specification: dcps2
220
### DCPS3. Debug switch to Exception level 3 DCPS3
221
Specification: dcps3
222
### DRPS. Debug restore PE state
223
Specification: drps
224
225
h3. System register instructions
226
227
### MRS. Move System register to general-purpose register MRS
228
Specification: msr
229
### MSR. Move general-purpose register to System register MSR (register)
230
Specification: mrs
231
### MSR. Move immediate to PE state field MSR (immediate)
232
Specification: msr_dc, msr_ds, msr_ss, msr_uao
233
234
h3. System instructions
235
236
### SYS. System instruction
237
Specification: sys
238
### SYSL. System instruction with result
239
Specification: sysl
240
### IC. Instruction cache maintenance
241
Specification: ic, ic_reg
242
### DC. Data cache maintenance
243
Specification: dc
244
### AT. Address translation
245
Specification: at
246
### TLBI. TLB Invalidate
247
Specification: tlbi, tlbi_reg
248
249
h3. Hint instructions
250
251
### NOP. No operation
252
Specification: at
253
254
### YIELD. Yield hint
255
Specification: at
256
### WFE. Wait for event
257
### WFI. Wait for interrupt
258
### SEV. Send event
259
### SEVL. Send event local
260
### HINT. Unallocated hint
261
### DGH. Data Gathering Hint
262
263
264 7 Alexander Protsenko
[185]: hint
265
[186]: nop
266
[187]: yield_op
267
[188]: wfe
268
[189]: wfi
269
[190]: sev
270
[191]: sevl
271
[192]: clrex
272
[193]: dsb
273
[194]: dmb
274 1 Alexander Protsenko
[195]: isb
275
276
[127]: ldr_postindex
277
[128]: str_postindex
278
[129]: ldxr
279
[130]: ldxr_32
280
[131]: ldxrb_32
281
[132]: ldxrh_32
282
[133]: ldxp
283
[134]: ldxp_32
284
[135]: stxr
285
[136]: stxr_32
286
[137]: stxrb_32
287
[138]: stxrh_32
288
[139]: stxp
289
[140]: stxp_32
290
[141]: ldar
291
[142]: ldar_32
292
[143]: ldarb
293
[144]: ldarh
294
[145]: stlr
295
[146]: stlr_32
296
[147]: stlrb
297
[148]: stlrh
298
[149]: ldaxr
299
[150]: ldaxr_32
300
[151]: ldaxrb_32
301
[152]: ldaxrh_32
302
[153]: ldaxp
303
[154]: ldaxp_32
304
[155]: stlxr
305
[156]: stlxr_32
306
[157]: stlxrb_32
307
[158]: stlxrh_32
308 7 Alexander Protsenko
[159]: stlxp
309 1 Alexander Protsenko
[160]: stlxp_32
310
311
312
[200]: psldr
313
[201]: psldr32