Skip to content

Commit 77882fc

Browse files
committed
补齐龙芯文本格式指令解析
1 parent 56e2e20 commit 77882fc

File tree

8 files changed

+270
-125
lines changed

8 files changed

+270
-125
lines changed

internal/native/loong64/a_out.go

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -940,50 +940,50 @@ var _AOpContextTable = [...]_OpContextType{
940940
AFADD_S: {mask: 0xffff8000, value: 0x01008000, op: AFADD_S, fmt: OpFormatType_3F},
941941
AFCLASS_D: {mask: 0xfffffc00, value: 0x01143800, op: AFCLASS_D, fmt: OpFormatType_2F},
942942
AFCLASS_S: {mask: 0xfffffc00, value: 0x01143400, op: AFCLASS_S, fmt: OpFormatType_2F},
943-
AFCMP_CAF_D: {mask: 0xffff8018, value: 0x0c200000, op: AFCMP_CAF_D, fmt: OpFormatType_cd_2R},
944-
AFCMP_CAF_S: {mask: 0xffff8018, value: 0x0c100000, op: AFCMP_CAF_S, fmt: OpFormatType_cd_2R},
945-
AFCMP_CEQ_D: {mask: 0xffff8018, value: 0x0c220000, op: AFCMP_CEQ_D, fmt: OpFormatType_cd_2R},
946-
AFCMP_CEQ_S: {mask: 0xffff8018, value: 0x0c120000, op: AFCMP_CEQ_S, fmt: OpFormatType_cd_2R},
947-
AFCMP_CLE_D: {mask: 0xffff8018, value: 0x0c230000, op: AFCMP_CLE_D, fmt: OpFormatType_cd_2R},
948-
AFCMP_CLE_S: {mask: 0xffff8018, value: 0x0c130000, op: AFCMP_CLE_S, fmt: OpFormatType_cd_2R},
949-
AFCMP_CLT_D: {mask: 0xffff8018, value: 0x0c210000, op: AFCMP_CLT_D, fmt: OpFormatType_cd_2R},
950-
AFCMP_CLT_S: {mask: 0xffff8018, value: 0x0c110000, op: AFCMP_CLT_S, fmt: OpFormatType_cd_2R},
951-
AFCMP_CNE_D: {mask: 0xffff8018, value: 0x0c280000, op: AFCMP_CNE_D, fmt: OpFormatType_cd_2R},
952-
AFCMP_CNE_S: {mask: 0xffff8018, value: 0x0c180000, op: AFCMP_CNE_S, fmt: OpFormatType_cd_2R},
953-
AFCMP_COR_D: {mask: 0xffff8018, value: 0x0c2a0000, op: AFCMP_COR_D, fmt: OpFormatType_cd_2R},
954-
AFCMP_COR_S: {mask: 0xffff8018, value: 0x0c1a0000, op: AFCMP_COR_S, fmt: OpFormatType_cd_2R},
955-
AFCMP_CUEQ_D: {mask: 0xffff8018, value: 0x0c260000, op: AFCMP_CUEQ_D, fmt: OpFormatType_cd_2R},
956-
AFCMP_CUEQ_S: {mask: 0xffff8018, value: 0x0c160000, op: AFCMP_CUEQ_S, fmt: OpFormatType_cd_2R},
957-
AFCMP_CULE_D: {mask: 0xffff8018, value: 0x0c270000, op: AFCMP_CULE_D, fmt: OpFormatType_cd_2R},
958-
AFCMP_CULE_S: {mask: 0xffff8018, value: 0x0c170000, op: AFCMP_CULE_S, fmt: OpFormatType_cd_2R},
959-
AFCMP_CULT_D: {mask: 0xffff8018, value: 0x0c250000, op: AFCMP_CULT_D, fmt: OpFormatType_cd_2R},
960-
AFCMP_CULT_S: {mask: 0xffff8018, value: 0x0c150000, op: AFCMP_CULT_S, fmt: OpFormatType_cd_2R},
961-
AFCMP_CUNE_D: {mask: 0xffff8018, value: 0x0c2c0000, op: AFCMP_CUNE_D, fmt: OpFormatType_cd_2R},
962-
AFCMP_CUNE_S: {mask: 0xffff8018, value: 0x0c1c0000, op: AFCMP_CUNE_S, fmt: OpFormatType_cd_2R},
963-
AFCMP_CUN_D: {mask: 0xffff8018, value: 0x0c240000, op: AFCMP_CUN_D, fmt: OpFormatType_cd_2R},
964-
AFCMP_CUN_S: {mask: 0xffff8018, value: 0x0c140000, op: AFCMP_CUN_S, fmt: OpFormatType_cd_2R},
965-
AFCMP_SAF_D: {mask: 0xffff8018, value: 0x0c208000, op: AFCMP_SAF_D, fmt: OpFormatType_cd_2R},
966-
AFCMP_SAF_S: {mask: 0xffff8018, value: 0x0c108000, op: AFCMP_SAF_S, fmt: OpFormatType_cd_2R},
967-
AFCMP_SEQ_D: {mask: 0xffff8018, value: 0x0c228000, op: AFCMP_SEQ_D, fmt: OpFormatType_cd_2R},
968-
AFCMP_SEQ_S: {mask: 0xffff8018, value: 0x0c128000, op: AFCMP_SEQ_S, fmt: OpFormatType_cd_2R},
969-
AFCMP_SLE_D: {mask: 0xffff8018, value: 0x0c238000, op: AFCMP_SLE_D, fmt: OpFormatType_cd_2R},
970-
AFCMP_SLE_S: {mask: 0xffff8018, value: 0x0c138000, op: AFCMP_SLE_S, fmt: OpFormatType_cd_2R},
971-
AFCMP_SLT_D: {mask: 0xffff8018, value: 0x0c218000, op: AFCMP_SLT_D, fmt: OpFormatType_cd_2R},
972-
AFCMP_SLT_S: {mask: 0xffff8018, value: 0x0c118000, op: AFCMP_SLT_S, fmt: OpFormatType_cd_2R},
973-
AFCMP_SNE_D: {mask: 0xffff8018, value: 0x0c288000, op: AFCMP_SNE_D, fmt: OpFormatType_cd_2R},
974-
AFCMP_SNE_S: {mask: 0xffff8018, value: 0x0c188000, op: AFCMP_SNE_S, fmt: OpFormatType_cd_2R},
975-
AFCMP_SOR_D: {mask: 0xffff8018, value: 0x0c2a8000, op: AFCMP_SOR_D, fmt: OpFormatType_cd_2R},
976-
AFCMP_SOR_S: {mask: 0xffff8018, value: 0x0c1a8000, op: AFCMP_SOR_S, fmt: OpFormatType_cd_2R},
977-
AFCMP_SUEQ_D: {mask: 0xffff8018, value: 0x0c268000, op: AFCMP_SUEQ_D, fmt: OpFormatType_cd_2R},
978-
AFCMP_SUEQ_S: {mask: 0xffff8018, value: 0x0c168000, op: AFCMP_SUEQ_S, fmt: OpFormatType_cd_2R},
979-
AFCMP_SULE_D: {mask: 0xffff8018, value: 0x0c278000, op: AFCMP_SULE_D, fmt: OpFormatType_cd_2R},
980-
AFCMP_SULE_S: {mask: 0xffff8018, value: 0x0c178000, op: AFCMP_SULE_S, fmt: OpFormatType_cd_2R},
981-
AFCMP_SULT_D: {mask: 0xffff8018, value: 0x0c258000, op: AFCMP_SULT_D, fmt: OpFormatType_cd_2R},
982-
AFCMP_SULT_S: {mask: 0xffff8018, value: 0x0c158000, op: AFCMP_SULT_S, fmt: OpFormatType_cd_2R},
983-
AFCMP_SUNE_D: {mask: 0xffff8018, value: 0x0c2c8000, op: AFCMP_SUNE_D, fmt: OpFormatType_cd_2R},
984-
AFCMP_SUNE_S: {mask: 0xffff8018, value: 0x0c1c8000, op: AFCMP_SUNE_S, fmt: OpFormatType_cd_2R},
985-
AFCMP_SUN_D: {mask: 0xffff8018, value: 0x0c248000, op: AFCMP_SUN_D, fmt: OpFormatType_cd_2R},
986-
AFCMP_SUN_S: {mask: 0xffff8018, value: 0x0c148000, op: AFCMP_SUN_S, fmt: OpFormatType_cd_2R},
943+
AFCMP_CAF_D: {mask: 0xffff8018, value: 0x0c200000, op: AFCMP_CAF_D, fmt: OpFormatType_cd_2F},
944+
AFCMP_CAF_S: {mask: 0xffff8018, value: 0x0c100000, op: AFCMP_CAF_S, fmt: OpFormatType_cd_2F},
945+
AFCMP_CEQ_D: {mask: 0xffff8018, value: 0x0c220000, op: AFCMP_CEQ_D, fmt: OpFormatType_cd_2F},
946+
AFCMP_CEQ_S: {mask: 0xffff8018, value: 0x0c120000, op: AFCMP_CEQ_S, fmt: OpFormatType_cd_2F},
947+
AFCMP_CLE_D: {mask: 0xffff8018, value: 0x0c230000, op: AFCMP_CLE_D, fmt: OpFormatType_cd_2F},
948+
AFCMP_CLE_S: {mask: 0xffff8018, value: 0x0c130000, op: AFCMP_CLE_S, fmt: OpFormatType_cd_2F},
949+
AFCMP_CLT_D: {mask: 0xffff8018, value: 0x0c210000, op: AFCMP_CLT_D, fmt: OpFormatType_cd_2F},
950+
AFCMP_CLT_S: {mask: 0xffff8018, value: 0x0c110000, op: AFCMP_CLT_S, fmt: OpFormatType_cd_2F},
951+
AFCMP_CNE_D: {mask: 0xffff8018, value: 0x0c280000, op: AFCMP_CNE_D, fmt: OpFormatType_cd_2F},
952+
AFCMP_CNE_S: {mask: 0xffff8018, value: 0x0c180000, op: AFCMP_CNE_S, fmt: OpFormatType_cd_2F},
953+
AFCMP_COR_D: {mask: 0xffff8018, value: 0x0c2a0000, op: AFCMP_COR_D, fmt: OpFormatType_cd_2F},
954+
AFCMP_COR_S: {mask: 0xffff8018, value: 0x0c1a0000, op: AFCMP_COR_S, fmt: OpFormatType_cd_2F},
955+
AFCMP_CUEQ_D: {mask: 0xffff8018, value: 0x0c260000, op: AFCMP_CUEQ_D, fmt: OpFormatType_cd_2F},
956+
AFCMP_CUEQ_S: {mask: 0xffff8018, value: 0x0c160000, op: AFCMP_CUEQ_S, fmt: OpFormatType_cd_2F},
957+
AFCMP_CULE_D: {mask: 0xffff8018, value: 0x0c270000, op: AFCMP_CULE_D, fmt: OpFormatType_cd_2F},
958+
AFCMP_CULE_S: {mask: 0xffff8018, value: 0x0c170000, op: AFCMP_CULE_S, fmt: OpFormatType_cd_2F},
959+
AFCMP_CULT_D: {mask: 0xffff8018, value: 0x0c250000, op: AFCMP_CULT_D, fmt: OpFormatType_cd_2F},
960+
AFCMP_CULT_S: {mask: 0xffff8018, value: 0x0c150000, op: AFCMP_CULT_S, fmt: OpFormatType_cd_2F},
961+
AFCMP_CUNE_D: {mask: 0xffff8018, value: 0x0c2c0000, op: AFCMP_CUNE_D, fmt: OpFormatType_cd_2F},
962+
AFCMP_CUNE_S: {mask: 0xffff8018, value: 0x0c1c0000, op: AFCMP_CUNE_S, fmt: OpFormatType_cd_2F},
963+
AFCMP_CUN_D: {mask: 0xffff8018, value: 0x0c240000, op: AFCMP_CUN_D, fmt: OpFormatType_cd_2F},
964+
AFCMP_CUN_S: {mask: 0xffff8018, value: 0x0c140000, op: AFCMP_CUN_S, fmt: OpFormatType_cd_2F},
965+
AFCMP_SAF_D: {mask: 0xffff8018, value: 0x0c208000, op: AFCMP_SAF_D, fmt: OpFormatType_cd_2F},
966+
AFCMP_SAF_S: {mask: 0xffff8018, value: 0x0c108000, op: AFCMP_SAF_S, fmt: OpFormatType_cd_2F},
967+
AFCMP_SEQ_D: {mask: 0xffff8018, value: 0x0c228000, op: AFCMP_SEQ_D, fmt: OpFormatType_cd_2F},
968+
AFCMP_SEQ_S: {mask: 0xffff8018, value: 0x0c128000, op: AFCMP_SEQ_S, fmt: OpFormatType_cd_2F},
969+
AFCMP_SLE_D: {mask: 0xffff8018, value: 0x0c238000, op: AFCMP_SLE_D, fmt: OpFormatType_cd_2F},
970+
AFCMP_SLE_S: {mask: 0xffff8018, value: 0x0c138000, op: AFCMP_SLE_S, fmt: OpFormatType_cd_2F},
971+
AFCMP_SLT_D: {mask: 0xffff8018, value: 0x0c218000, op: AFCMP_SLT_D, fmt: OpFormatType_cd_2F},
972+
AFCMP_SLT_S: {mask: 0xffff8018, value: 0x0c118000, op: AFCMP_SLT_S, fmt: OpFormatType_cd_2F},
973+
AFCMP_SNE_D: {mask: 0xffff8018, value: 0x0c288000, op: AFCMP_SNE_D, fmt: OpFormatType_cd_2F},
974+
AFCMP_SNE_S: {mask: 0xffff8018, value: 0x0c188000, op: AFCMP_SNE_S, fmt: OpFormatType_cd_2F},
975+
AFCMP_SOR_D: {mask: 0xffff8018, value: 0x0c2a8000, op: AFCMP_SOR_D, fmt: OpFormatType_cd_2F},
976+
AFCMP_SOR_S: {mask: 0xffff8018, value: 0x0c1a8000, op: AFCMP_SOR_S, fmt: OpFormatType_cd_2F},
977+
AFCMP_SUEQ_D: {mask: 0xffff8018, value: 0x0c268000, op: AFCMP_SUEQ_D, fmt: OpFormatType_cd_2F},
978+
AFCMP_SUEQ_S: {mask: 0xffff8018, value: 0x0c168000, op: AFCMP_SUEQ_S, fmt: OpFormatType_cd_2F},
979+
AFCMP_SULE_D: {mask: 0xffff8018, value: 0x0c278000, op: AFCMP_SULE_D, fmt: OpFormatType_cd_2F},
980+
AFCMP_SULE_S: {mask: 0xffff8018, value: 0x0c178000, op: AFCMP_SULE_S, fmt: OpFormatType_cd_2F},
981+
AFCMP_SULT_D: {mask: 0xffff8018, value: 0x0c258000, op: AFCMP_SULT_D, fmt: OpFormatType_cd_2F},
982+
AFCMP_SULT_S: {mask: 0xffff8018, value: 0x0c158000, op: AFCMP_SULT_S, fmt: OpFormatType_cd_2F},
983+
AFCMP_SUNE_D: {mask: 0xffff8018, value: 0x0c2c8000, op: AFCMP_SUNE_D, fmt: OpFormatType_cd_2F},
984+
AFCMP_SUNE_S: {mask: 0xffff8018, value: 0x0c1c8000, op: AFCMP_SUNE_S, fmt: OpFormatType_cd_2F},
985+
AFCMP_SUN_D: {mask: 0xffff8018, value: 0x0c248000, op: AFCMP_SUN_D, fmt: OpFormatType_cd_2F},
986+
AFCMP_SUN_S: {mask: 0xffff8018, value: 0x0c148000, op: AFCMP_SUN_S, fmt: OpFormatType_cd_2F},
987987
AFCOPYSIGN_D: {mask: 0xffff8000, value: 0x01130000, op: AFCOPYSIGN_D, fmt: OpFormatType_3F},
988988
AFCOPYSIGN_S: {mask: 0xffff8000, value: 0x01128000, op: AFCOPYSIGN_S, fmt: OpFormatType_3F},
989989
AFCVT_D_S: {mask: 0xfffffc00, value: 0x01192400, op: AFCVT_D_S, fmt: OpFormatType_2F},
@@ -1038,7 +1038,7 @@ var _AOpContextTable = [...]_OpContextType{
10381038
AFRSQRT_S: {mask: 0xfffffc00, value: 0x01146400, op: AFRSQRT_S, fmt: OpFormatType_2F},
10391039
AFSCALEB_D: {mask: 0xffff8000, value: 0x01110000, op: AFSCALEB_D, fmt: OpFormatType_3F},
10401040
AFSCALEB_S: {mask: 0xffff8000, value: 0x01108000, op: AFSCALEB_S, fmt: OpFormatType_3F},
1041-
AFSEL: {mask: 0xfffc0000, value: 0x0d000000, op: AFSEL, fmt: OpFormatType_3R_ca},
1041+
AFSEL: {mask: 0xfffc0000, value: 0x0d000000, op: AFSEL, fmt: OpFormatType_3F_ca},
10421042
AFSQRT_D: {mask: 0xfffffc00, value: 0x01144800, op: AFSQRT_D, fmt: OpFormatType_2F},
10431043
AFSQRT_S: {mask: 0xfffffc00, value: 0x01144400, op: AFSQRT_S, fmt: OpFormatType_2F},
10441044
AFSTGT_D: {mask: 0xffff8000, value: 0x38768000, op: AFSTGT_D, fmt: OpFormatType_1F_2R},

internal/native/loong64/asm.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,6 @@ func (ctx *_OpContextType) asmSyntax(
117117
return fmt.Sprintf("%s %d, %s", asNameFn(as, asName), arg.Imm, rName(arg.Rs1))
118118
case OpFormatType_cd_1F:
119119
return fmt.Sprintf("%s %d, %s", asNameFn(as, asName), arg.Imm, rName(arg.Rs1))
120-
case OpFormatType_cd_2R:
121-
return fmt.Sprintf("%s %d, %s, %s", asNameFn(as, asName), arg.Imm, rName(arg.Rs1), rName(arg.Rs2))
122120
case OpFormatType_cd_2F:
123121
return fmt.Sprintf("%s %d, %s, %s", asNameFn(as, asName), arg.Imm, rName(arg.Rs1), rName(arg.Rs2))
124122
case OpFormatType_1R_cj:
@@ -137,7 +135,7 @@ func (ctx *_OpContextType) asmSyntax(
137135
return fmt.Sprintf("%s %s, %d", asNameFn(as, asName), rName(arg.Rs1), arg.Imm)
138136
case OpFormatType_op_2R:
139137
return fmt.Sprintf("%s %d, %s, %s", asNameFn(as, asName), arg.Imm, rName(arg.Rs1), rName(arg.Rs2))
140-
case OpFormatType_3R_ca:
138+
case OpFormatType_3F_ca:
141139
return fmt.Sprintf("%s %s, %s, %s, %d", asNameFn(as, asName), rName(arg.Rd), rName(arg.Rs1), rName(arg.Rs2), arg.Imm)
142140
case OpFormatType_hint_1R_si12:
143141
return fmt.Sprintf("%s %d, %s, %s", asNameFn(as, asName), arg.Imm, rName(arg.Rs1), formatImm())

internal/native/loong64/decode.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,6 @@ func (op _OpContextType) decodeInst(x uint32) (as abi.As, arg *abi.AsArgument, a
166166
panic("TODO")
167167
case OpFormatType_cd_1F:
168168
panic("TODO")
169-
case OpFormatType_cd_2R:
170-
panic("TODO")
171169
case OpFormatType_cd_2F:
172170
panic("TODO")
173171
case OpFormatType_1R_cj:
@@ -186,7 +184,7 @@ func (op _OpContextType) decodeInst(x uint32) (as abi.As, arg *abi.AsArgument, a
186184
panic("TODO")
187185
case OpFormatType_op_2R:
188186
panic("TODO")
189-
case OpFormatType_3R_ca:
187+
case OpFormatType_3F_ca:
190188
panic("TODO")
191189
case OpFormatType_hint_1R_si12:
192190
panic("TODO")

internal/native/loong64/encode.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ func (ctx *_OpContextType) encodeRaw(as abi.As, arg *abi.AsArgument) (x uint32,
100100
panic("TODO")
101101
case OpFormatType_cd_1F:
102102
panic("TODO")
103-
case OpFormatType_cd_2R:
104-
panic("TODO")
105103
case OpFormatType_cd_2F:
106104
panic("TODO")
107105
case OpFormatType_1R_cj:
@@ -120,7 +118,7 @@ func (ctx *_OpContextType) encodeRaw(as abi.As, arg *abi.AsArgument) (x uint32,
120118
panic("TODO")
121119
case OpFormatType_op_2R:
122120
panic("TODO")
123-
case OpFormatType_3R_ca:
121+
case OpFormatType_3F_ca:
124122
panic("TODO")
125123
case OpFormatType_hint_1R_si12:
126124
panic("TODO")

internal/native/loong64/gen/base.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ const (
4242
OpFormatType_1R_fcsr
4343
OpFormatType_cd_1R
4444
OpFormatType_cd_1F
45-
OpFormatType_cd_2R
4645
OpFormatType_cd_2F
4746
OpFormatType_1R_cj
4847
OpFormatType_1F_cj
@@ -52,7 +51,7 @@ const (
5251
OpFormatType_level
5352
OpFormatType_0_1R_seq
5453
OpFormatType_op_2R
55-
OpFormatType_3R_ca
54+
OpFormatType_3F_ca
5655
OpFormatType_hint_1R_si12
5756
OpFormatType_hint_2R
5857
OpFormatType_hint

internal/native/loong64/gen/main.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ func getOpFormatType(as int, asArgs instArgs) OpFormatType {
205205

206206
case Arg_cd:
207207
if arg2 := asArgs[2]; arg2 == Arg_fk {
208-
return OpFormatType_cd_2R
208+
return OpFormatType_cd_2F
209209
} else {
210210
return OpFormatType_cd_1R
211211
}
@@ -240,7 +240,7 @@ func getOpFormatType(as int, asArgs instArgs) OpFormatType {
240240
assert(asArgs[1] == Arg_fj)
241241
assert(asArgs[2] == Arg_fk)
242242
assert(i == 3)
243-
return OpFormatType_3R_ca
243+
return OpFormatType_3F_ca
244244

245245
case Arg_hint_4_0:
246246
assert(i == 0)
@@ -365,8 +365,6 @@ func OpFormatTypeString(x OpFormatType) string {
365365
return "OpFormatType_cd_1R"
366366
case OpFormatType_cd_1F:
367367
return "OpFormatType_cd_1F"
368-
case OpFormatType_cd_2R:
369-
return "OpFormatType_cd_2R"
370368
case OpFormatType_cd_2F:
371369
return "OpFormatType_cd_2F"
372370
case OpFormatType_1R_cj:
@@ -385,8 +383,8 @@ func OpFormatTypeString(x OpFormatType) string {
385383
return "OpFormatType_0_1R_seq"
386384
case OpFormatType_op_2R:
387385
return "OpFormatType_op_2R"
388-
case OpFormatType_3R_ca:
389-
return "OpFormatType_3R_ca"
386+
case OpFormatType_3F_ca:
387+
return "OpFormatType_3F_ca"
390388
case OpFormatType_hint_1R_si12:
391389
return "OpFormatType_hint_1R_si12"
392390
case OpFormatType_hint_2R:

internal/native/loong64/opcode.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ import (
99
"wa-lang.org/wa/internal/native/abi"
1010
)
1111

12+
//
13+
// 以下的指令编码是龙芯官方手册简化后的版本(9种)
14+
// 凹语言龙芯汇编器已经针对每个细粒度的不同编码作了定义区分处理(大约40+种)
1215
//
1316
// 31 10 9 5 4 0
1417
// +-------------------------------------------------------------+ +------------+ +------------+
@@ -56,7 +59,7 @@ import (
5659
// +--------------+ +--------------------------------------------+ +---------------------------+
5760
//
5861

59-
// 指令格式类型9种
62+
// 龙芯指令格式类型
6063
type OpFormatType int
6164

6265
const (
@@ -87,7 +90,6 @@ const (
8790
OpFormatType_1R_fcsr
8891
OpFormatType_cd_1R
8992
OpFormatType_cd_1F
90-
OpFormatType_cd_2R
9193
OpFormatType_cd_2F
9294
OpFormatType_1R_cj
9395
OpFormatType_1F_cj
@@ -97,7 +99,7 @@ const (
9799
OpFormatType_level
98100
OpFormatType_0_1R_seq
99101
OpFormatType_op_2R
100-
OpFormatType_3R_ca
102+
OpFormatType_3F_ca
101103
OpFormatType_hint_1R_si12
102104
OpFormatType_hint_2R
103105
OpFormatType_hint
@@ -190,8 +192,6 @@ func (x OpFormatType) String() string {
190192
return "OpFormatType_cd_1R"
191193
case OpFormatType_cd_1F:
192194
return "OpFormatType_cd_1F"
193-
case OpFormatType_cd_2R:
194-
return "OpFormatType_cd_2R"
195195
case OpFormatType_cd_2F:
196196
return "OpFormatType_cd_2F"
197197
case OpFormatType_1R_cj:
@@ -210,8 +210,8 @@ func (x OpFormatType) String() string {
210210
return "OpFormatType_0_1R_seq"
211211
case OpFormatType_op_2R:
212212
return "OpFormatType_op_2R"
213-
case OpFormatType_3R_ca:
214-
return "OpFormatType_3R_ca"
213+
case OpFormatType_3F_ca:
214+
return "OpFormatType_3F_ca"
215215
case OpFormatType_hint_1R_si12:
216216
return "OpFormatType_hint_1R_si12"
217217
case OpFormatType_hint_2R:

0 commit comments

Comments
 (0)