-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathisa.txt
71 lines (61 loc) · 1.21 KB
/
isa.txt
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
Opcode formats
Register move:
mov rD, rS[, [+|-]0xB]
0010_1DDD_SSSP_BBBB
D = destination register
S = source register
P = bitshift direction (0 = left (+), 1 = right (-))
B = bitshift offset
Register branch:
b[cond|x] rR[, [+|-]0xOO]
0011_0CCR_RRSO_OOOO
C = condition code
R = target register
S = sign of offset (1 => negative)
O = offset
PC-relative load/store:
ldr|str rR, pc[, [+|-]0xOOOO]
010L_RRRS_OOOO_OOOO
L = load/store (0 => load)
R = target register
S = sign of offset (1 => negative)
O = offset
PC-relative branch:
b[cond|x] pc[, [+|-]0x000]
011C_CSOO_OOOO_OOOO
C = condition code
S = sign of offset (1 => negative)
O = offset
Register move immediate:
mov rD, 0xIII
100D_DDII_IIII_IIII
D = destination register
I = immediate
Register load/store:
ldr|str rT, rA[, [+|-]0xOOOO]
101L_TTTA_AAPO_OOOO
L = load/store (0 => load)
T = target register
A = address register
P = sign of offset (1 => negative)
O = offset
ALU operation:
opc rD[, rA[, rB]]
11DD_DAAA_BBBO_OOOO
D = destination register
A,B = operand registers
O = opcode
ALU opcodes:
mnemonic opcode
add 00000
adc 00001
sub 00010
not 00011
and 00100
or 00101
xor 00110
csr 00111
csl 01000
lsr 01001
lsl 01010
The ALU does not support immediate arguments.