292
|
1
|
322
|
2 # This file specifies the encoding of the arm instruction set.
|
292
|
3
|
322
|
4 fields {
|
|
5 word16 16 {
|
|
6 opcode 15:12
|
|
7 top2 15:14
|
|
8 top6 15:10
|
|
9 data_opcode 9..6
|
|
10 opB 11:9
|
|
11 Rm 8:6
|
|
12 Rn 5:3
|
|
13 Rt 2:0
|
|
14 }
|
292
|
15 }
|
|
16
|
322
|
17 patterns {
|
|
18 add = 0
|
|
19 sub, mul = 1..2
|
|
20 [r1, r2, r3, r4, r5] is todo = 1..5
|
|
21 [STR, STRH, STRB, LDRSB, LDR, LDRH, LDRB, LDRSH] is opcode = 0b0101 & opB = {0 to 7}
|
|
22
|
|
23 EQ, NE, CS, CC, MI, PL, VS, VC, HI, LS, GE, LT, GT, LE, AL = 0..14
|
|
24 [AND, EOR, LSL, LSR, ASR, ADC, SBC, ROR, TST, RSB, CMP, CMN, ORR, MUL, BIC, MVN] is 0..15
|
|
25
|
|
26 memop is STR | STRH | STRB | LDRSB | LDR | LDR | LDRH | LDRB | LDRSH
|
292
|
27 }
|
|
28
|
322
|
29
|
|
30 constructors
|
|
31 {
|
|
32 alu rs1, reg_or_imm, rd
|
|
33 memop Rt, [Rn, Rm] is memop & Rt & Rn & Rm
|
292
|
34 }
|
|
35
|
322
|
36
|