-
Notifications
You must be signed in to change notification settings - Fork 0
/
encoding.txt
177 lines (166 loc) · 19 KB
/
encoding.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
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
+=====================+======================+==========+=====================+=========+=============+
| class | instruction | format | f7 | f3 | custom |
+=====================+======================+==========+=====================+=========+=============+
| | | | | | |
| SPARKLE_RV32_TYPE2 | sparkle.addrori | 2R+I->1R | 00 : imm5 | 7 = 111 | 1 = 0101011 |
| SPARKLE_RV32_TYPE2 | sparkle.subrori | 2R+I->1R | 01 : imm5 | 7 = 111 | 1 = 0101011 |
| SPARKLE_RV32_TYPE2 | sparkle.xorrori | 2R+I->1R | 10 : imm5 | 7 = 111 | 1 = 0101011 |
| | | | | | |
+=====================+======================+==========+=====================+=========+=============+
.macro sparkle.addrori rd, rs1, rs2, imm // sparkle.addrori => 00ii iiir rrrr rrrr r111 rrrr r010 1011
.insn r CUSTOM_1, 7, \imm+( 0*32), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_ADDRORI 0x0000702B
.endm // => #define MASK_SPARKLE_ADDRORI 0xC000707F
.macro sparkle.subrori rd, rs1, rs2, imm // sparkle.subrori => 01ii iiir rrrr rrrr r111 rrrr r010 1011
.insn r CUSTOM_1, 7, \imm+( 1*32), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_SUBRORI 0x4000702B
.endm // => #define MASK_SPARKLE_SUBRORI 0xC000707F
.macro sparkle.xorrori rd, rs1, rs2, imm // sparkle.xorrori => 10ii iiir rrrr rrrr r111 rrrr r010 1011
.insn r CUSTOM_1, 7, \imm+( 2*32), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_XORRORI 0x8000702B
.endm // => #define MASK_SPARKLE_XORRORI 0xC000707F
+=====================+======================+==========+=====================+=========+=============+
| class | instruction | format | f7 | f3 | custom |
+=====================+======================+==========+=====================+=========+=============+
| | | | | | |
| SPARKLE_RV32_RCON | sparkle.rcon | 1R+I->1R | 00 : 00 : imm3 | 6 = 110 | 2 = 1011011 |
| SPARKLE_RV64_RCON | sparkle.rcon | 1R+I->1R | 00 : 00 : imm3 | 6 = 110 | 2 = 1011011 |
| SPARKLE_RV64_RCON | sparkle.rconw | 1R+I->1R | 00 : 01 : imm3 | 6 = 110 | 2 = 1011011 |
| | | | | | |
| SPARKLE_RV64_TYPE2 | sparkle.block.enci | 2R+I->1R | 01 : 00 : 0 : imm2 | 7 = 111 | 2 = 1011011 |
| SPARKLE_RV64_TYPE2 | sparkle.block.deci | 2R+I->1R | 01 : 01 : 0 : imm2 | 7 = 111 | 2 = 1011011 |
| | | | | | |
| SPARKLE_RV32_TYPE4 | sparkle.whole.enci.x | 2R+I->1R | 10 : 00 : imm3 | 7 = 111 | 2 = 1011011 |
| SPARKLE_RV32_TYPE4 | sparkle.whole.enci.y | 2R+I->1R | 10 : 01 : imm3 | 7 = 111 | 2 = 1011011 |
| SPARKLE_RV32_TYPE4 | sparkle.whole.deci.x | 2R+I->1R | 10 : 10 : imm3 | 7 = 111 | 2 = 1011011 |
| SPARKLE_RV32_TYPE4 | sparkle.whole.deci.y | 2R+I->1R | 10 : 11 : imm3 | 7 = 111 | 2 = 1011011 |
| | | | | | |
| SPARKLE_RV64_TYPE4 | sparkle.whole.enci | 1R+I->1R | 11 : 00 : imm3 | 6 = 110 | 2 = 1011011 |
| SPARKLE_RV64_TYPE4 | sparkle.whole.deci | 1R+I->1R | 11 : 01 : imm3 | 6 = 110 | 2 = 1011011 |
| | | | | | |
+=====================+======================+==========+=====================+=========+=============+
.macro sparkle.rcon rd, rs1, imm // sparkle.rcon => 0000 iiir rrrr rrrr r110 rrrr r101 1011
.insn r CUSTOM_2, 6, \imm+( 0* 8), \rd, \rs1, x0 // => #define MATCH_SPARKLE_RCON 0x0000605B
.endm // => #define MASK_SPARKLE_RCON 0xF000707F
.macro sparkle.rconw rd, rs1, imm // sparkle.rconw => 0001 iiir rrrr rrrr r110 rrrr r101 1011
.insn r CUSTOM_2, 6, \imm+( 1* 8), \rd, \rs1, x0 // => #define MATCH_SPARKLE_RCONW 0x1000605B
.endm // => #define MASK_SPARKLE_RCONW 0xF000707F
.macro sparkle.block.enci rd, rs1, rs2, imm // sparkle.block.enci => 0100 0iir rrrr rrrr r111 rrrr r101 1011
.insn r CUSTOM_2, 7, \imm+( 4* 8), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_BLOCK_ENCI 0x4000705B
.endm // => #define MASK_SPARKLE_BLOCK_ENCI 0xF000707F
.macro sparkle.block.deci rd, rs1, rs2, imm // sparkle.block.deci => 0101 0iir rrrr rrrr r111 rrrr r101 1011
.insn r CUSTOM_2, 7, \imm+( 5* 8), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_BLOCK_DECI 0x5000705B
.endm // => #define MASK_SPARKLE_BLOCK_DECI 0xF000707F
.macro sparkle.whole.enci.x rd, rs1, rs2, imm // sparkle.whole.enci.x => 1000 iiir rrrr rrrr r111 rrrr r101 1011
.insn r CUSTOM_2, 7, \imm+( 8* 8), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_WHOLE_ENCI_X 0x8000705B
.endm // => #define MASK_SPARKLE_WHOLE_ENCI_X 0xF000707F
.macro sparkle.whole.enci.y rd, rs1, rs2, imm // sparkle.whole.enci.y => 1001 iiir rrrr rrrr r111 rrrr r101 1011
.insn r CUSTOM_2, 7, \imm+( 9* 8), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_WHOLE_ENCI_Y 0x9000705B
.endm // => #define MASK_SPARKLE_WHOLE_ENCI_Y 0xF000707F
.macro sparkle.whole.deci.x rd, rs1, rs2, imm // sparkle.whole.deci.x => 1010 iiir rrrr rrrr r111 rrrr r101 1011
.insn r CUSTOM_2, 7, \imm+(10* 8), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_WHOLE_DECI_X 0xA000705B
.endm // => #define MASK_SPARKLE_WHOLE_DECI_X 0xF000707F
.macro sparkle.whole.deci.y rd, rs1, rs2, imm // sparkle.whole.deci.y => 1011 iiir rrrr rrrr r111 rrrr r101 1011
.insn r CUSTOM_2, 7, \imm+(11* 8), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_WHOLE_DECI_Y 0xB000705B
.endm // => #define MASK_SPARKLE_WHOLE_DECI_Y 0xF000707F
.macro sparkle.whole.enci rd, rs1, imm // sparkle.whole.enci => 1100 iii0 0000 rrrr r110 rrrr r101 1011
.insn r CUSTOM_2, 6, \imm+(12* 8), \rd, \rs1, x0 // => #define MATCH_SPARKLE_WHOLE_ENCI 0xC000605B
.endm // => #define MASK_SPARKLE_WHOLE_ENCI 0xF000707F
.macro sparkle.whole.deci rd, rs1, imm // sparkle.whole.deci => 1101 iii0 0000 rrrr r110 rrrr r101 1011
.insn r CUSTOM_2, 6, \imm+(13* 8), \rd, \rs1, x0 // => #define MATCH_SPARKLE_WHOLE_DECI 0xD000605B
.endm // => #define MASK_SPARKLE_WHOLE_DECI 0xF000707F
+=====================+======================+==========+=====================+=========+=============+
| class | instruction | format | f7 | f3 | custom |
+=====================+======================+==========+=====================+=========+=============+
| | | | | | |
| SPARKLE_RV32_ELL | sparkle.ell | 2R ->1R | 00 : 00010 | 7 = 111 | 3 = 1111011 |
| SPARKLE_RV64_ELL | sparkle.ell | 2R ->1R | 00 : 00010 | 7 = 111 | 3 = 1111011 |
| SPARKLE_RV64_ELL | sparkle.ellrev | 2R ->1R | 00 : 00011 | 7 = 111 | 3 = 1111011 |
| | | | | | |
| SPARKLE_RV32_TYPE3 | sparkle.addror.31 | 2R ->1R | 01 : 00000 | 7 = 111 | 3 = 1111011 |
| SPARKLE_RV32_TYPE3 | sparkle.addror.17 | 2R ->1R | 01 : 00001 | 7 = 111 | 3 = 1111011 |
| SPARKLE_RV32_TYPE3 | sparkle.addror.24 | 2R ->1R | 01 : 00010 | 7 = 111 | 3 = 1111011 |
| SPARKLE_RV32_TYPE3 | sparkle.subror.31 | 2R ->1R | 01 : 00011 | 7 = 111 | 3 = 1111011 |
| SPARKLE_RV32_TYPE3 | sparkle.subror.17 | 2R ->1R | 01 : 00100 | 7 = 111 | 3 = 1111011 |
| SPARKLE_RV32_TYPE3 | sparkle.subror.24 | 2R ->1R | 01 : 00101 | 7 = 111 | 3 = 1111011 |
| SPARKLE_RV32_TYPE3 | sparkle.xorror.31 | 2R ->1R | 01 : 00110 | 7 = 111 | 3 = 1111011 |
| SPARKLE_RV32_TYPE3 | sparkle.xorror.17 | 2R ->1R | 01 : 00111 | 7 = 111 | 3 = 1111011 |
| SPARKLE_RV32_TYPE3 | sparkle.xorror.24 | 2R ->1R | 01 : 01000 | 7 = 111 | 3 = 1111011 |
| SPARKLE_RV32_TYPE3 | sparkle.xorror.16 | 2R ->1R | 01 : 01001 | 7 = 111 | 3 = 1111011 |
| | | | | | |
| SPARKLE_RV64_TYPE3 | sparkle.block.enc.0 | 2R ->1R | 10 : 00000 | 7 = 111 | 3 = 1111011 |
| SPARKLE_RV64_TYPE3 | sparkle.block.enc.1 | 2R ->1R | 10 : 00001 | 7 = 111 | 3 = 1111011 |
| SPARKLE_RV64_TYPE3 | sparkle.block.enc.2 | 2R ->1R | 10 : 00010 | 7 = 111 | 3 = 1111011 |
| SPARKLE_RV64_TYPE3 | sparkle.block.enc.3 | 2R ->1R | 10 : 00011 | 7 = 111 | 3 = 1111011 |
| SPARKLE_RV64_TYPE3 | sparkle.block.dec.0 | 2R ->1R | 10 : 00100 | 7 = 111 | 3 = 1111011 |
| SPARKLE_RV64_TYPE3 | sparkle.block.dec.1 | 2R ->1R | 10 : 00101 | 7 = 111 | 3 = 1111011 |
| SPARKLE_RV64_TYPE3 | sparkle.block.dec.2 | 2R ->1R | 10 : 00110 | 7 = 111 | 3 = 1111011 |
| SPARKLE_RV64_TYPE3 | sparkle.block.dec.3 | 2R ->1R | 10 : 00111 | 7 = 111 | 3 = 1111011 |
| | | | | | |
| SPARKLE_RV64_TYPE5 | sparkle.whole.enc | 2R ->1R | 11 : 00000 | 7 = 111 | 3 = 1111011 |
| SPARKLE_RV64_TYPE5 | sparkle.whole.dec | 2R ->1R | 11 : 00001 | 7 = 111 | 3 = 1111011 |
| | | | | | |
+=====================+======================+==========+=====================+=========+=============+
.macro sparkle.ell rd, rs1, rs2 // sparkle.ell => 0000 010r rrrr rrrr r111 rrrr r111 1011
.insn r CUSTOM_3, 7, ( 2* 1), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_ELL 0x0400707B
.endm // => #define MASK_SPARKLE_ELL 0xFE00707F
.macro sparkle.ellrev rd, rs1, rs2 // sparkle.ellrev => 0000 011r rrrr rrrr r111 rrrr r111 1011
.insn r CUSTOM_3, 7, ( 3* 1), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_ELLREV 0x0600707B
.endm // => #define MASK_SPARKLE_ELLREV 0xFE00707F
.macro sparkle.addror.31 rd, rs1, rs2 // sparkle.addror.31 => 0100 000r rrrr rrrr r111 rrrr r111 1011
.insn r CUSTOM_3, 7, (32* 1), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_ADDROR_31 0x4000707B
.endm // => #define MASK_SPARKLE_ADDROR_31 0xFE00707F
.macro sparkle.addror.17 rd, rs1, rs2 // sparkle.addror.17 => 0100 001r rrrr rrrr r111 rrrr r111 1011
.insn r CUSTOM_3, 7, (33* 1), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_ADDROR_17 0x4200707B
.endm // => #define MASK_SPARKLE_ADDROR_17 0xFE00707F
.macro sparkle.addror.24 rd, rs1, rs2 // sparkle.addror.24 => 0100 010r rrrr rrrr r111 rrrr r111 1011
.insn r CUSTOM_3, 7, (34* 1), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_ADDROR_24 0x4400707B
.endm // => #define MASK_SPARKLE_ADDROR_24 0xFE00707F
.macro sparkle.subror.31 rd, rs1, rs2 // sparkle.subror.31 => 0100 011r rrrr rrrr r111 rrrr r111 1011
.insn r CUSTOM_3, 7, (35* 1), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_SUBROR_31 0x4600707B
.endm // => #define MASK_SPARKLE_SUBROR_31 0xFE00707F
.macro sparkle.subror.17 rd, rs1, rs2 // sparkle.subror.17 => 0100 100r rrrr rrrr r111 rrrr r111 1011
.insn r CUSTOM_3, 7, (36* 1), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_SUBROR_17 0x4800707B
.endm // => #define MASK_SPARKLE_SUBROR_17 0xFE00707F
.macro sparkle.subror.24 rd, rs1, rs2 // sparkle.subror.24 => 0100 101r rrrr rrrr r111 rrrr r111 1011
.insn r CUSTOM_3, 7, (37* 1), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_SUBROR_24 0x4A00707B
.endm // => #define MASK_SPARKLE_SUBROR_24 0xFE00707F
.macro sparkle.xorror.31 rd, rs1, rs2 // sparkle.xorror.31 => 0100 110r rrrr rrrr r111 rrrr r111 1011
.insn r CUSTOM_3, 7, (38* 1), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_XORROR_31 0x4C00707B
.endm // => #define MASK_SPARKLE_XORROR_31 0xFE00707F
.macro sparkle.xorror.17 rd, rs1, rs2 // sparkle.xorror.17 => 0100 111r rrrr rrrr r111 rrrr r111 1011
.insn r CUSTOM_3, 7, (39* 1), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_XORROR_17 0x4E00707B
.endm // => #define MASK_SPARKLE_XORROR_17 0xFE00707F
.macro sparkle.xorror.24 rd, rs1, rs2 // sparkle.xorror.24 => 0101 000r rrrr rrrr r111 rrrr r111 1011
.insn r CUSTOM_3, 7, (40* 1), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_XORROR_24 0x5000707B
.endm // => #define MASK_SPARKLE_XORROR_24 0xFE00707F
.macro sparkle.xorror.16 rd, rs1, rs2 // sparkle.xorror.16 => 0101 001r rrrr rrrr r111 rrrr r111 1011
.insn r CUSTOM_3, 7, (41* 1), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_XORROR_16 0x5200707B
.endm // => #define MASK_SPARKLE_XORROR_16 0xFE00707F
.macro sparkle.block.enc.0 rd, rs1, rs2 // sparkle.block.enc.0 => 1000 000r rrrr rrrr r111 rrrr r111 1011
.insn r CUSTOM_3, 7, (64* 1), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_BLOCK_ENC_0 0x8000707B
.endm // => #define MASK_SPARKLE_BLOCK_ENC_0 0xFE00707F
.macro sparkle.block.enc.1 rd, rs1, rs2 // sparkle.block.enc.1 => 1000 001r rrrr rrrr r111 rrrr r111 1011
.insn r CUSTOM_3, 7, (65* 1), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_BLOCK_ENC_1 0x8200707B
.endm // => #define MASK_SPARKLE_BLOCK_ENC_1 0xFE00707F
.macro sparkle.block.enc.2 rd, rs1, rs2 // sparkle.block.enc.2 => 1000 010r rrrr rrrr r111 rrrr r111 1011
.insn r CUSTOM_3, 7, (66* 1), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_BLOCK_ENC_2 0x8400707B
.endm // => #define MASK_SPARKLE_BLOCK_ENC_2 0xFE00707F
.macro sparkle.block.enc.3 rd, rs1, rs2 // sparkle.block.enc.3 => 1000 011r rrrr rrrr r111 rrrr r111 1011
.insn r CUSTOM_3, 7, (67* 1), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_BLOCK_ENC_3 0x8600707B
.endm // => #define MASK_SPARKLE_BLOCK_ENC_3 0xFE00707F
.macro sparkle.block.dec.0 rd, rs1, rs2 // sparkle.block.dec.0 => 1000 100r rrrr rrrr r111 rrrr r111 1011
.insn r CUSTOM_3, 7, (68* 1), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_BLOCK_DEC_0 0x8800707B
.endm // => #define MASK_SPARKLE_BLOCK_DEC_0 0xFE00707F
.macro sparkle.block.dec.1 rd, rs1, rs2 // sparkle.block.dec.1 => 1000 101r rrrr rrrr r111 rrrr r111 1011
.insn r CUSTOM_3, 7, (69* 1), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_BLOCK_DEC_1 0x8A00707B
.endm // => #define MASK_SPARKLE_BLOCK_DEC_1 0xFE00707F
.macro sparkle.block.dec.2 rd, rs1, rs2 // sparkle.block.dec.2 => 1000 110r rrrr rrrr r111 rrrr r111 1011
.insn r CUSTOM_3, 7, (70* 1), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_BLOCK_DEC_2 0x8C00707B
.endm // => #define MASK_SPARKLE_BLOCK_DEC_2 0xFE00707F
.macro sparkle.block.dec.3 rd, rs1, rs2 // sparkle.block.dec.3 => 1000 111r rrrr rrrr r111 rrrr r111 1011
.insn r CUSTOM_3, 7, (71* 1), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_BLOCK_DEC_3 0x8E00707B
.endm // => #define MASK_SPARKLE_BLOCK_DEC_3 0xFE00707F
.macro sparkle.whole.enc rd, rs1, rs2 // sparkle.whole.enc => 1100 000r rrrr rrrr r111 rrrr r111 1011
.insn r CUSTOM_3, 7, (96* 1), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_WHOLE_ENC 0xC000707B
.endm // => #define MASK_SPARKLE_WHOLE_ENC 0xFE00707F
.macro sparkle.whole.dec rd, rs1, rs2 // sparkle.whole.dec => 1100 001r rrrr rrrr r111 rrrr r111 1011
.insn r CUSTOM_3, 7, (97* 1), \rd, \rs1, \rs2 // => #define MATCH_SPARKLE_WHOLE_DEC 0xC200707B
.endm // => #define MASK_SPARKLE_WHOLE_DEC 0xFE00707F