-
Notifications
You must be signed in to change notification settings - Fork 0
/
encoding.txt
52 lines (47 loc) · 5.22 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
+=====================+======================+==========+=====================+=========+=============+
| class | instruction | format | f7 | f3 | custom |
+=====================+======================+==========+=====================+=========+=============+
| | | | | | |
| GIFT_RV32_TYPE2 | gift.swapmove | 2R+I->1R | 00 : imm5 | 7 = 111 | 0 = 0001011 |
| | | | | | |
| GIFT_RV32_TYPE2 | gift.rori.n | 1R+I->1R | 01 : imm5 | 6 = 110 | 0 = 0001011 |
| GIFT_RV32_TYPE2 | gift.rori.b | 1R+I->1R | 10 : imm5 | 6 = 110 | 0 = 0001011 |
| GIFT_RV32_TYPE2 | gift.rori.h | 1R+I->1R | 11 : imm5 | 6 = 110 | 0 = 0001011 |
| | | | | | |
+=====================+======================+==========+=====================+=========+=============+
.macro gift.swapmove rd, rs1, rs2, imm // gift.swapmove => 00ii iii0 0000 rrrr r111 rrrr r000 1011
.insn r CUSTOM_0, 7, \imm+( 0*32), \rd, \rs1, \rs2 // => #define MATCH_GIFT_SWAPMOVE 0x0000700B
.endm // => #define MASK_GIFT_SWAPMOVE 0xC000707F
.macro gift.rori.n rd, rs1, imm // gift.rori.n => 01ii iii0 0000 rrrr r110 rrrr r000 1011
.insn r CUSTOM_0, 6, \imm+( 1*32), \rd, \rs1, x0 // => #define MATCH_GIFT_RORI_N 0x4000600B
.endm // => #define MASK_GIFT_RORI_N 0xC000707F
.macro gift.rori.b rd, rs1, imm // gift.rori.b => 10ii iii0 0000 rrrr r110 rrrr r000 1011
.insn r CUSTOM_0, 6, \imm+( 2*32), \rd, \rs1, x0 // => #define MATCH_GIFT_RORI_B 0x8000600B
.endm // => #define MASK_GIFT_RORI_B 0xC000707F
.macro gift.rori.h rd, rs1, imm // gift.rori.h => 11ii iii0 0000 rrrr r110 rrrr r000 1011
.insn r CUSTOM_0, 6, \imm+( 3*32), \rd, \rs1, x0 // => #define MATCH_GIFT_RORI_H 0xC000600B
.endm // => #define MASK_GIFT_RORI_H 0xC000707F
+=====================+======================+==========+=====================+=========+=============+
| class | instruction | format | f7 | f3 | custom |
+=====================+======================+==========+=====================+=========+=============+
| | | | | | |
| GIFT_RV32_TYPE2 | gift.key.reorg | 1R+I->1R | 00 : imm5 | 6 = 110 | 1 = 0101011 |
| GIFT_RV32_TYPE2 | gift.key.updstd | 1R ->1R | 01 : 00000 | 6 = 110 | 1 = 0101011 |
| GIFT_RV32_TYPE3 | gift.key.updstd | 1R ->1R | 01 : 00000 | 6 = 110 | 1 = 0101011 |
| GIFT_RV32_TYPE2 | gift.key.updfix | 1R+I->1R | 10 : imm5 | 6 = 110 | 1 = 0101011 |
| | | | | | |
| GIFT_RV32_TYPE3 | gift.permbits.step | 1R+I->1R | 11 : imm5 | 6 = 110 | 1 = 0101011 |
| | | | | | |
+=====================+======================+==========+=====================+=========+=============+
.macro gift.key.reorg rd, rs1, imm // gift.key.reorg => 00ii iii0 0000 rrrr r110 rrrr r010 1011
.insn r CUSTOM_1, 6, \imm+( 0*32), \rd, \rs1, x0 // => #define MATCH_GIFT_KEY_REORG 0x0000602B
.endm // => #define MASK_GIFT_KEY_REORG 0xC000707F
.macro gift.key.updstd rd, rs1 // gift.key.updstd => 0100 0000 0000 rrrr r110 rrrr r010 1011
.insn r CUSTOM_1, 6, ( 1*32), \rd, \rs1, x0 // => #define MATCH_GIFT_KEY_UPDSTD 0x4000602B
.endm // => #define MASK_GIFT_KEY_UPDSTD 0xC000707F
.macro gift.key.updfix rd, rs1, imm // gift.key.updfix => 10ii iii0 0000 rrrr r110 rrrr r010 1011
.insn r CUSTOM_1, 6, \imm+( 2*32), \rd, \rs1, x0 // => #define MATCH_GIFT_KEY_UPDFIX 0x8000602B
.endm // => #define MASK_GIFT_KEY_UPDFIX 0xC000707F
.macro gift.permbits.step rd, rs1, imm // gift.permbits.step => 11ii iii0 0000 rrrr r110 rrrr r010 1011
.insn r CUSTOM_1, 6, \imm+( 3*32), \rd, \rs1, x0 // => #define MATCH_GIFT_PERMBITS_STEP 0xC000602B
.endm // => #define MASK_GIFT_PERMBITS_STEP 0xC000707F