-
Notifications
You must be signed in to change notification settings - Fork 21
/
thumb.isdf
707 lines (625 loc) · 14.2 KB
/
thumb.isdf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
# Thumb Instruction Set Descriptor File
# by geohot
# part of "The Embedded Disassembler"
#
# Number Two, let's do it syntax blind
# In fact, theres so little syntax, yay!
Registers 32 R0 R1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11 R12 SP LR PC CPSR SPSR
# Special Strings
ProgramCounter `PC`
LinkRegister `LR`
StackPointer `SP`
ProgramCounterOffset 4
Z (([`CPSR`] >> 30) & 1)
C (([`CPSR`] >> 29) & 1)
N (([`CPSR`] >> 31) & 1)
V (([`CPSR`] >> 28) & 1)
# UpdateFlags is evaled in the presence of Operand
UpdateFlags ([`CPSR`] & 0x0FFFFFFF) | (({Operand}) & 0x80000000) | ((({Operand})==0) << 30)
Condition 1
DefaultChange 32 `PC` [`PC`]+2
# ADC
010000 0101 mmm ddd
Parsed "O R, R" ADC {{d}} {{m}}
Operand [`{{d}}`] + [`{{m}}`] + {C}
Change 32 `{{d}}` {Operand}
Change 32 `CPSR` {UpdateFlags}
Stop
# ADD(1)
0001110 iii nnn ddd
Parsed "O R, R, #I" ADD {{d}} {{n}} {|{i}|}
Operand [`{{n}}`] + {i}
Change 32 `{{d}}` {Operand}
Change 32 `CPSR` {UpdateFlags}
Stop
# ADD(2)
00110 ddd iiiiiiii
Parsed "O R, #I" ADD {{d}} {|{i}|}
Operand [`{{d}}`] + {i}
Change 32 `{{d}}` {Operand}
Change 32 `CPSR` {UpdateFlags}
Stop
# ADD(3)
0001100 mmm nnn ddd
Parsed "O R, R, R" ADD {{d}} {{n}} {{m}}
Operand [`{{n}}`] + [`{{m}}`]
Change 32 `{{d}}` {Operand}
Change 32 `CPSR` {UpdateFlags}
Stop
# ADD(4)
01000100 h mmmm ddd
hd {|{h}*8 + {d}|}
Parsed "O R, R" ADD {{hd}} {{m}}
Operand [`{{hd}}`] + [`{{m}}`]
Change 32 `{{hd}}` {Operand}
Stop
# ADD(5)
10100 ddd iiiiiiii
ri ({i}<<2)
Parsed "O R, R, #I" ADD {{d}} PC {|{ri}|}
Change 32 `{{d}}` ([`PC`] & 0xFFFFFFFC) + {ri}
Stop
# ADD(6)
10101 ddd iiiiiiii
ri ({i}<<2)
Parsed "O R, R, #I" ADD {{d}} SP {|{ri}|}
Change 32 `{{d}}` [`SP`] + {ri}
Stop
# ADD(7)
101100000 iiiiiii
ri ({i}<<2)
Parsed "O R, #I" SP {|{ri}|}
Change 32 `SP` [`SP`] + {ri}
Stop
# AND
010000 0000 mmm ddd
Parsed "O R, R" AND {{d}} {{m}}
Operand [`{{d}}`] & [`{{m}}`]
Change 32 `{{d}}` {Operand}
Change 32 `CPSR` {UpdateFlags}
Stop
# ASR(1)
00010 iiiii mmm ddd
Parsed "O R, R, #I" ASR {{d}} {{m}} {i}
Operand [`{{m}}`] >>> {i}
Change 32 `{{d}}` {Operand}
Change 32 `CPSR` {UpdateFlags}
Stop
# ASR(2)
010000 0100 sss ddd
Parsed "O R, R" ASR {{d}} {{s}}
Operand [`{{d}}`] >>> ([`{{s}}`] & 0xFF)
Change 32 `{{d}}` {Operand}
Change 32 `CPSR` {UpdateFlags}
Stop
# B(1)
1101 0000 ********
Condition {Z}
ConditionString EQ
1101 0001 ********
Condition ~{Z}
ConditionString NE
1101 0010 ********
Condition {C}
ConditionString HS
1101 0011 ********
Condition ~{C}
ConditionString LO
1101 0100 ********
Condition {N}
ConditionString MI
1101 0101 ********
Condition ~{N}
ConditionString PL
1101 0110 ********
Condition {V}
ConditionString VS
1101 0111 ********
Condition ~{V}
ConditionString VC
1101 1000 ********
Condition {C}&~{Z}
ConditionString HI
1101 1001 ********
Condition {Z}|~{C}
ConditionString LS
1101 1010 ********
Condition ~({N}^{V})
ConditionString GE
1101 1011 ********
Condition {N}^{V}
ConditionString LT
1101 1100 ********
Condition ~(Z)&~({N}^{V})
ConditionString GT
1101 1101 ********
Condition {Z}&({N}^{V})
ConditionString LE
1101 1110 ********
Condition 1
1101 1111 ********
Condition 1
1101 cccc iiiiiiii
ri (({i}<<1) | (({i}>>7)?(0xFFFFFE00))) + 4
Parsed "OF P" B {ConditionString} {|{ri}|}
Change 32 `PC` [`PC`] + {ri}
Stop
# B(2)
11100 iiiiiiiiiii
ri (({i}<<1) | (({i}>>11)?(0xFFFFF000))) + 4
Parsed "O P" B {|{ri}|}
Change 32 `PC` [`PC`] + {ri}
Stop
# BIC
010000 1110 mmm ddd
Parsed "O R, R" BIC {{d}} {{m}}
Operand [`{{d}}`] & (~[`{{m}}`])
Change 32 `{{d}}` {Operand}
Change 32 `CPSR` {UpdateFlags}
Stop
# BKPT
10111110 iiiiiiii
Parsed "O I" BKPT {i}
Change 32 `PC` 0xC
Stop
# BL, BLX(1) -- 01
111 01 iiiiiiiiiii
ri ({i} << 1)
Parsed "O I + R" BL {|{ri}|} LR
Change 32 `LR` ([`PC`]+2) | 1
Change 32 `PC` ([`LR`] + {ri}) & 0xFFFFFFFC
Change 32 `CPSR` [`CPSR`] & 0xFFFFFFDF
Stop
# BL, two opcodes
111 11 jjjjjjjjjjj 111 10 iiiiiiiiiii
ri (({i} << 12) | (({i}>>11)?(0xFF800000))) + ({j} << 1) + 4
Parsed "O P" BL {|{ri}|}
Change 32 `LR` ([`PC`]+4)
Change 32 `PC` ([`PC`] + {ri})
Stop
# BL, BLX(1) -- 11
111 11 iiiiiiiiiii
ri ({i} << 1)
Parsed "O I + R" BL {|{ri}|} LR
Change 32 `LR` ([`PC`]+2) | 1
Change 32 `PC` ([`LR`] + {ri}) + 4
Stop
# BL, BLX(1) -- 10
111 10 iiiiiiiiiii
ri ({i} << 12) | (({i}>>11)?(0xFF800000))
Parsed "O R, R + #I" MOV LR PC {|{ri}|}
Change 32 `LR` [`PC`] + {ri}
Stop
# BLX(2)
010001111 **** ***
Change 32 `LR` ([`PC`]+2) | 1
# BLX(2) and BX
01000111* mmmm ***
Parsed "O R" BLX {{m}}
Change 32 `PC` ([`m`] & 0xFFFFFFFE) + 4
Change 32 `CPSR` ([`CPSR`] & 0xFFFFFFDF) | (([`{{m}}`]&0x1) << 5)
Stop
# CMN
010000 1011 mmm nnn
Parsed "O R, R" CMN {{n}} {{m}}
Operand [`{{n}}`] + [`{{m}}`]
Change 32 `CPSR` {UpdateFlags}
Stop
# CMP(1)
00101 nnn iiiiiiii
Parsed "O R, #I" CMP {{n}} {|{i}|}
Operand [`{{n}}`] + {i}
Change 32 `CPSR` {UpdateFlags}
Stop
# CMP(2)
010000 1010 mmm nnn
Parsed "O R, R" CMP {{n}} {{m}}
Operand [`{{n}}`] - [`{{m}}`]
Change 32 `CPSR` {UpdateFlags}
Stop
# CMP(3)
01000101 h mmmm ddd
hd {|{h}*8 + {d}|}
Parsed "O R, R" CMP {{hd}} {{m}}
Operand [`{{hd}}`] - [`{{m}}`]
Change 32 `CPSR` {UpdateFlags}
Stop
# CPSIE
1011 0 1 1 0 0 1 1 0 0 iii
Parsed "OF I" CPS IE {i}
Operand `CPSR` [`CPSR`] & (~0xE0)
# CPSID
1011 0 1 1 0 0 1 1 1 0 iii
Parsed "OF I" CPS ID {i}
Operand `CPSR` [`CPSR`] | 0xE0
# CPY
01000100 h mmmm ddd
hd {|{h}*8 + {d}|}
Parsed "O R, R" CPY {{hd}} {{m}}
Change 32 `{{hd}}` [`{{m}}`]
Stop
# EOR
010000 0100 mmm ddd
Parsed "O R, R" XOR {{m}} {{s}}
Operand [`{{d}}`] ^ [`{{m}}`]
Change 32 `{{d}}` {Operand}
Change 32 `CPSR` {UpdateFlags}
Stop
# LDMIA
# LDMIA isn't finished
11001 nnn ********
Parsed "O R!, " LDMIA {n}
Stop
# LDR(1)
01101 iiiii nnn ddd
ri {i} << 2
Parsed "O R, [R, #I]" LDR {{d}} {{n}} {|{ri}|}
Change 32 `{{d}}` [[`{{n}}`] + {ri}]
Stop
# LDR(2)
0101100 mmm nnn ddd
Parsed "O R, [R, R]" LDR {{d}} {{n}} {{m}}
Change 32 `{{d}}` [[`{{n}}`] + [`{{m}}`]]
Stop
# LDR(3) -- PC relative
01001 ddd iiiiiiii
Source [([`PC`] & 0xFFFFFFFC) + ({i} << 2)]
Parsed "O R, =I" LDR {{d}} {|Source|}
Change 32 `{{d}}` {Source}
Stop
# LDR(4) -- from stack
01001 ddd iiiiiiii
ri ({i} << 2)
Parsed "O R, [R, #I]" LDR {{d}} SP {|{ri}|}
Change 32 `{{d}}` [[`SP`] + {ri}]
Stop
# LDRB(1)
01111 iiiii nnn ddd
Parsed "O R, [R, #I]" LDRB {{d}} {{n}} {|{i}|}
Change 8 `{{d}}` [[`{{n}}`] + {i}]
Stop
# LDRB(2)
0101110 mmm nnn ddd
Parsed "O R, [R, R]" LDRB {{d}} {{n}} {{m}}
Change 8 `{{d}}` [[`{{n}}`] + [`{{m}}`]]
Stop
# LDRH(1)
10001 iiiii nnn ddd
ri ({i} << 1)
Parsed "O R, [R, #I]" LDRH {{d}} {{n}} {|{ri}|}
Change 16 `{{d}}` [[`{{n}}`] + {ri}]
Stop
# LDRH(2)
0101101 mmm nnn ddd
Parsed "O R, [R, R]" LDRH {{d}} {{n}} {{m}}
Change 16 `{{d}}` [[`{{n}}`] + [`{{m}}`]]
Stop
# LDRSB
0101011 mmm nnn ddd
Parsed "O R, [R, R]" LDRSH {{d}} {{n}} {{m}}
Operand ([[`{{n}}`] + [`{{m}}`]]) & 0xFF
Change 32 `{{d}}` {Operand} | ((({Operand})>>7)?{0xFFFFFF00))
Stop
# LDRSH
0101011 mmm nnn ddd
Parsed "O R, [R, R]" LDRSH {{d}} {{n}} {{m}}
Operand ([[`{{n}}`] + [`{{m}}`]]) & 0xFFFF
Change 32 `{{d}}` {Operand} | ((({Operand})>>15)?{0xFFFF0000))
Stop
# LSL(1)
00000 iiiii mmm ddd
Parsed "O R, R, #I" LSL {{d}} {{m}} {i}
Operand [`{{m}}`] << {i}
Change 32 `{{d}}` {Operand}
Change 32 `CPSR` {UpdateFlags}
Stop
# LSL(2)
010000 0010 sss ddd
Parsed "O R, R" LSL {{d}} {{s}}
Operand [`{{d}}`] << ([`{{s}}`] & 0xFF)
Change 32 `{{d}}` {Operand}
Change 32 `CPSR` {UpdateFlags}
Stop
# LSR(1)
00001 iiiii mmm ddd
Parsed "O R, R, #I" LSR {{d}} {{m}} {i}
Operand [`{{m}}`] >> {i}
Change 32 `{{d}}` {Operand}
Change 32 `CPSR` {UpdateFlags}
Stop
# LSR(2)
010000 0011 sss ddd
Parsed "O R, R" LSR {{d}} {{s}}
Operand [`{{d}}`] >> ([`{{s}}`] & 0xFF)
Change 32 `{{d}}` {Operand}
Change 32 `CPSR` {UpdateFlags}
Stop
# MOV(1)
00100 ddd iiiiiiii
Parsed "O R, #I" MOV {{d}} {|{i}|}
Operand {i}
Change 32 `{{d}}` {Operand}
Change 32 `CPSR` {UpdateFlags}
Stop
# MOV(2)
0001110 000 nnn ddd
Parsed "O R, R" MOV {{d}} {{n}}
Operand [`{{n}}`]
Change 32 `{{d}}` {Operand}
Change 32 `CPSR` {UpdateFlags}
Stop
# MOV(3)
01000110 h mmmm ddd
hd {|{h}*8 + {d}|}
Parsed "O R, R" MOV {{hd}} {{m}}
Operand [`{{m}}`]
Change 32 `{{hd}}` {Operand}
Change 32 `CPSR` {UpdateFlags}
Stop
# MUL
010000 1101 mmm ddd
Parsed "O R, R" MUL {{d}} {{m}}
Operand [`{{d}}`] * [`{{m}}`]
Change 32 `{{d}}` {Operand}
Change 32 `CPSR` {UpdateFlags}
Stop
# MVN
010000 1101 mmm ddd
Parsed "O R, R" MVN {{d}} {{m}}
Operand (~[`{{m}}`])
Change 32 `{{d}}` {Operand}
Change 32 `CPSR` {UpdateFlags}
Stop
# NEG
010000 1001 mmm ddd
Parsed "O R, R" MVN {{d}} {{m}}
Operand (0 - [`{{m}}`])
Change 32 `{{d}}` {Operand}
Change 32 `CPSR` {UpdateFlags}
Stop
# ORR
010000 1100 mmm ddd
Parsed "O R, R" ORR {{d}} {{m}}
Operand [`{{d}}`] | [`{{m}}`]
Change 32 `{{d}}` {Operand}
Change 32 `CPSR` {UpdateFlags}
Stop
# POP init
1011110 * ********
Writeback [`SP`]
Parsed "O " POP
# POP R0
1011110 * *******1
Parsed "%R " R0
Writeback+ +4
Change 32 `R0` [{Writeback}-4]
# POP R1
1011110 * ******1*
Parsed "%R " R1
Writeback+ +4
Change 32 `R1` [{Writeback}-4]
# POP R2
1011110 * *****1**
Parsed "%R " R2
Writeback+ +4
Change 32 `R2` [{Writeback}-4]
# POP R3
1011110 * ****1***
Parsed "%R " R3
Writeback+ +4
Change 32 `R3` [{Writeback}-4]
# POP R4
1011110 * ***1****
Parsed "%R " R4
Writeback+ +4
Change 32 `R4` [{Writeback}-4]
# POP R5
1011110 * **1*****
Parsed "%R " R5
Writeback+ +4
Change 32 `R5` [{Writeback}-4]
# POP R6
1011110 * *1******
Parsed "%R " R6
Writeback+ +4
Change 32 `R6` [{Writeback}-4]
# POP R7
1011110 * 1*******
Parsed "%R " R7
Writeback+ +4
Change 32 `R7` [{Writeback}-4]
# POP PC
1011110 1 ********
Parsed "%R " PC
Writeback+ +4
Change 32 `PC` [{Writeback}-4] & 0xFFFFFFFE
# POP stop
1011110 * ********
Change 32 `SP` {Writeback}
Stop
# PUSH init
1011010 * ********
Writeback [`SP`]
Parsed "O " PUSH
# PUSH LR
1011010 1 ********
Parsed "%R " LR
Writeback+ -4
Change 32 {Writeback} [`LR`]
# PUSH R7
1011010 * 1*******
Parsed "%R " R7
Writeback+ -4
Change 32 {Writeback}-4 [`R7`]
# PUSH R6
1011010 * *1******
Parsed "%R " R6
Writeback+ -4
Change 32 {Writeback} [`R6`]
# PUSH R5
1011010 * **1*****
Parsed "%R " R5
Writeback+ -4
Change 32 {Writeback} [`R5`]
# PUSH R4
1011010 * ***1****
Parsed "%R " R4
Writeback+ -4
Change 32 {Writeback} [`R4`]
# PUSH R3
1011010 * ****1***
Parsed "%R " R3
Writeback+ -4
Change 32 {Writeback} [`R3`]
# PUSH R2
1011010 * *****1**
Parsed "%R " R2
Writeback+ -4
Change 32 {Writeback} [`R2`]
# PUSH R1
1011010 * ******1*
Parsed "%R " R1
Writeback+ -4
Change 32 {Writeback} [`R1`]
# PUSH R0
1011010 * *******1
Parsed "%R " R0
Writeback+ -4
Change 32 {Writeback} [`R0`]
# PUSH stop
1011010 * ********
Change 32 `SP` {Writeback}
Stop
# REV
1011 1010 0 0 nnn ddd
Parsed "O R, R" REV {{d}} {{n}}
r [`{{n}}`]
Change 32 `{{d}}` (({r} >> 24) & 0xFF) | (({r} >> 8) & 0xFF00) | (({r} << 8) & 0xFF0000) | (({r} << 24) & 0xFF000000)
Stop
# REV16
1011 1010 0 1 nnn ddd
Parsed "O R, R" REV16 {{d}} {{n}}
r [`{{n}}`]
Change 32 `{{d}}` (({r} >> 8) & 0xFF) | (({r} << 8) & 0xFF00) | (({r} >> 8) & 0xFF0000) | (({r} << 8) & 0xFF000000)
Stop
# REVSH
1011 1010 1 1 nnn ddd
Parsed "O R, R" REV16 {{d}} {{n}}
r [`{{n}}`]
Change 32 `{{d}}` ((({r} >> 8) & 0xFF) | (({r} << 8) & 0xFF00))) | (({r}>>7)?(0xFFFF0000))
# ROR
010000 0111 sss ddd
Parsed "O R, R" ROR {{d}} {{s}}
Operand [`{{d}}`] >/> ([`{{s}}`] & 0xFF)
Change 32 `{{d}}` {Operand}
Change 32 `CPSR` {UpdateFlags}
Stop
# SBC
010000 0101 mmm ddd
Parsed "O R, R" SBC {{d}} {{m}}
Operand [`{{d}}`] - [`{{m}}`] - {C}
Change 32 `{{d}}` {Operand}
Change 32 `CPSR` {UpdateFlags}
Stop
# SETEND
1011 01100101 e ***
Parsed "O I" SETEND {e}
Change 32 `CPSR` ([`CPSR`] & 0xFFFFFEFF) | ({e} << 9)
Stop
# STMIA
# STMIA isn't finished
11000 nnn ********
Parsed "O R!, " STMIA {n}
Stop
# STR(1)
01100 iiiii nnn ddd
ri ({i} << 2)
Parsed "O R, [R, #I]" STR {{d}} {{n}} {|{ri}|}
Change 32 [`{{n}}`]+{ri} [`{{d}}`]
Stop
# STR(2)
0101000 mmm nnn ddd
Parsed "O R, [R, R]" STR {{d}} {{n}} {{m}}
Change 32 [`{{n}}`]+[`{{m}}`] [`{{d}}`]
Stop
# STR(3) -- to stack
10010 ddd iiiiiiii
ri ({i} << 2)
Parsed "O R, [R, #I]" STR {{d}} SP {|{ri}|}
Change 32 [`SP`]+{ri} [`{{d}}`]
Stop
# STRB(1)
01110 iiiii nnn ddd
Parsed "O R, [R, #I]" STRB {{d}} {{n}} {|{i}|}
Change 8 [`{{n}}`] + {i} [`{{d}}`]
Stop
# STRB(2)
0101010 mmm nnn ddd
Parsed "O R, [R, R]" STRB {{d}} {{n}} {{m}}
Change 8 [`{{n}}`]+[`{{m}}`] [`{{d}}`]
Stop
# STRH(1)
10000 iiiii nnn ddd
ri ({i} << 1)
Parsed "O R, [R, #I]" STRH {{d}} {{n}} {|{ri}|}
Change 16 [`{{n}}`]+{ri} [`{{d}}`]
Stop
# STRH(2)
0101001 mmm nnn ddd
Parsed "O R, [R, R]" STRH {{d}} {{n}} {{m}}
Change 16 [`{{n}}`]+[`{{m}}`] [`{{d}}`]
Stop
# SUB(1)
0001111 iii nnn ddd
Parsed "O R, R, #I" SUB {{d}} {{n}} {|{i}|}
Operand [`{{n}}`] - {i}
Change 32 `{{d}}` {Operand}
Change 32 `CPSR` {UpdateFlags}
Stop
# SUB(2)
00111 ddd iiiiiiii
Parsed "O R, #I" SUB {{d}} {|{i}|}
Operand [`{{d}}`] - {i}
Change 32 `{{d}}` {Operand}
Change 32 `CPSR` {UpdateFlags}
Stop
# SUB(3)
0001101 mmm nnn ddd
Parsed "O R, R, R" SUB {{d}} {{n}} {{m}}
Operand [`{{n}}`] - [`{{m}}`]
Change 32 `{{d}}` {Operand}
Change 32 `CPSR` {UpdateFlags}
Stop
# SUB(4)
101100001 iiiiiii
ri ({i}<<2)
Parsed "O R, #I" SUB SP {|{ri}|}
Change 32 `SP` [`SP`] - {ri}
Stop
# SWI
11011111 iiiiiiii
Parsed "O I" SWI {i}
Change 32 `PC` 0x8
Stop
# SXTB
1011 0010 01 mmm ddd
Parsed "O R, R" SXTB {{d}} {{m}}
Change 32 `{{d}}` ([`{{m}}`]&0xFF) | (([`{{m}}`]>>7)?0xFFFFFF00)
# SXTH
1011 0010 00 mmm ddd
Parsed "O R, R" SXTH {{d}} {{m}}
Change 32 `{{d}}` ([`{{m}}`]&0xFFFF) | (([`{{m}}`]>>15)?0xFFFF0000)
# TST
010000 1000 mmm nnn
Parsed "O R, R" TST {{n}} {{m}}
Operand [`{{n}}`] & [`{{m}}`]
Change 32 `CPSR` {UpdateFlags}
Stop
# UXTB
1011 0010 11 mmm ddd
Parsed "O R, R" UXTB {{d}} {{m}}
Change 32 `{{d}}` ([`{{m}}`]&0xFF)
# UXTH
1011 0010 10 mmm ddd
Parsed "O R, R" UXTH {{d}} {{m}}
Change 32 `{{d}}` ([`{{m}}`]&0xFFFF)