Skip to content

Commit 481de63

Browse files
authored
fix(vector): remove incorrect decode for some insts (#958)
In previous commit a4dd9c0, the decode of vopm are divided into vopmvv (funct3=OPMVV) and vopmvx (funct3=OPMVX). However, some instructions are incorrectly duplicated in both categories, e.g., there is only vredxor.vv but no vredxor.vx, but vredxor is put in both vopmvv and vopmvx. This commit removes those incorrect decodes. Fix #952.
1 parent 304d1da commit 481de63

File tree

1 file changed

+8
-22
lines changed

1 file changed

+8
-22
lines changed

src/isa/riscv64/instr/rvv/decode.h

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def_THelper(vopivv) {
204204
def_INSTR_TAB("010101 ? ????? ????? ??? ????? ????? ??", vrol);
205205
def_INSTR_TAB("010100 ? ????? ????? ??? ????? ????? ??", vror);
206206
def_INSTR_TAB("110101 ? ????? ????? ??? ????? ????? ??", vwsll);
207-
207+
208208
return EXEC_ID_inv;
209209
}
210210

@@ -265,7 +265,7 @@ def_THelper(vopivx) {
265265
def_INSTR_TAB("010101 ? ????? ????? ??? ????? ????? ??", vrol);
266266
def_INSTR_TAB("010100 ? ????? ????? ??? ????? ????? ??", vror);
267267
def_INSTR_TAB("110101 ? ????? ????? ??? ????? ????? ??", vwsll);
268-
268+
269269
return EXEC_ID_inv;
270270
}
271271

@@ -324,7 +324,7 @@ def_THelper(vopivi) {
324324

325325
def_INSTR_TAB("01010 ? ? ????? ????? ??? ????? ????? ??", vror);
326326
def_INSTR_TAB("110101 ? ????? ????? ??? ????? ????? ??", vwsll);
327-
327+
328328
return EXEC_ID_inv;
329329
}
330330

@@ -344,6 +344,7 @@ def_THelper(vopmvv) {
344344
def_INSTR_TAB("001001 ? ????? ????? ??? ????? ????? ??", vaadd);
345345
def_INSTR_TAB("001010 ? ????? ????? ??? ????? ????? ??", vasubu);
346346
def_INSTR_TAB("001011 ? ????? ????? ??? ????? ????? ??", vasub);
347+
347348
def_INSTR_TAB("010000 ? ????? ????? ??? ????? ????? ??", vwxunary0_dispatch);
348349
def_INSTR_IDTAB("010010 ? ????? ????? ??? ????? ????? ??", vxunary0_dispatch, vxunary0_dispatch);
349350
def_INSTR_TAB("010100 ? ????? ????? ??? ????? ????? ??", vmunary0_dispatch);
@@ -356,6 +357,7 @@ def_THelper(vopmvv) {
356357
def_INSTR_TAB("011101 ? ????? ????? ??? ????? ????? ??", vmnand);
357358
def_INSTR_TAB("011110 ? ????? ????? ??? ????? ????? ??", vmnor);
358359
def_INSTR_TAB("011111 ? ????? ????? ??? ????? ????? ??", vmxnor);
360+
359361
def_INSTR_TAB("100000 ? ????? ????? ??? ????? ????? ??", vdivu);
360362
def_INSTR_TAB("100001 ? ????? ????? ??? ????? ????? ??", vdiv);
361363
def_INSTR_TAB("100010 ? ????? ????? ??? ????? ????? ??", vremu);
@@ -368,6 +370,7 @@ def_THelper(vopmvv) {
368370
def_INSTR_TAB("101011 ? ????? ????? ??? ????? ????? ??", vnmsub);
369371
def_INSTR_TAB("101101 ? ????? ????? ??? ????? ????? ??", vmacc);
370372
def_INSTR_TAB("101111 ? ????? ????? ??? ????? ????? ??", vnmsac);
373+
371374
def_INSTR_TAB("110000 ? ????? ????? ??? ????? ????? ??", vwaddu);
372375
def_INSTR_TAB("110001 ? ????? ????? ??? ????? ????? ??", vwadd);
373376
def_INSTR_TAB("110010 ? ????? ????? ??? ????? ????? ??", vwsubu);
@@ -381,7 +384,6 @@ def_THelper(vopmvv) {
381384
def_INSTR_TAB("111011 ? ????? ????? ??? ????? ????? ??", vwmul);
382385
def_INSTR_TAB("111100 ? ????? ????? ??? ????? ????? ??", vwmaccu);
383386
def_INSTR_TAB("111101 ? ????? ????? ??? ????? ????? ??", vwmacc);
384-
def_INSTR_TAB("111110 ? ????? ????? ??? ????? ????? ??", vwmaccus);
385387
def_INSTR_TAB("111111 ? ????? ????? ??? ????? ????? ??", vwmaccsu);
386388

387389
return EXEC_ID_inv;
@@ -391,32 +393,15 @@ def_THelper(vopmvx) {
391393
if (!vp_enable()) {
392394
return EXEC_ID_inv;
393395
}
394-
def_INSTR_TAB("000000 ? ????? ????? ??? ????? ????? ??", vredsum);
395-
def_INSTR_TAB("000001 ? ????? ????? ??? ????? ????? ??", vredand);
396-
def_INSTR_TAB("000010 ? ????? ????? ??? ????? ????? ??", vredor);
397-
def_INSTR_TAB("000011 ? ????? ????? ??? ????? ????? ??", vredxor);
398-
def_INSTR_TAB("000100 ? ????? ????? ??? ????? ????? ??", vredminu);
399-
def_INSTR_TAB("000101 ? ????? ????? ??? ????? ????? ??", vredmin);
400-
def_INSTR_TAB("000110 ? ????? ????? ??? ????? ????? ??", vredmaxu);
401-
def_INSTR_TAB("000111 ? ????? ????? ??? ????? ????? ??", vredmax);
402396
def_INSTR_TAB("001000 ? ????? ????? ??? ????? ????? ??", vaaddu);
403397
def_INSTR_TAB("001001 ? ????? ????? ??? ????? ????? ??", vaadd);
404398
def_INSTR_TAB("001010 ? ????? ????? ??? ????? ????? ??", vasubu);
405399
def_INSTR_TAB("001011 ? ????? ????? ??? ????? ????? ??", vasub);
406-
407400
def_INSTR_TAB("001110 ? ????? ????? ??? ????? ????? ??", vslide1up);
408401
def_INSTR_TAB("001111 ? ????? ????? ??? ????? ????? ??", vslide1down);
409402

410403
def_INSTR_TAB("010000 ? ????? ????? ??? ????? ????? ??", vrxunary0_dispatch);
411-
def_INSTR_TAB("010111 ? ????? ????? ??? ????? ????? ??", vcompress);
412-
def_INSTR_TAB("011000 ? ????? ????? ??? ????? ????? ??", vmandnot);
413-
def_INSTR_TAB("011001 ? ????? ????? ??? ????? ????? ??", vmand);
414-
def_INSTR_TAB("011010 ? ????? ????? ??? ????? ????? ??", vmor);
415-
def_INSTR_TAB("011011 ? ????? ????? ??? ????? ????? ??", vmxor);
416-
def_INSTR_TAB("011100 ? ????? ????? ??? ????? ????? ??", vmornot);
417-
def_INSTR_TAB("011101 ? ????? ????? ??? ????? ????? ??", vmnand);
418-
def_INSTR_TAB("011110 ? ????? ????? ??? ????? ????? ??", vmnor);
419-
def_INSTR_TAB("011111 ? ????? ????? ??? ????? ????? ??", vmxnor);
404+
420405
def_INSTR_TAB("100000 ? ????? ????? ??? ????? ????? ??", vdivu);
421406
def_INSTR_TAB("100001 ? ????? ????? ??? ????? ????? ??", vdiv);
422407
def_INSTR_TAB("100010 ? ????? ????? ??? ????? ????? ??", vremu);
@@ -429,6 +414,7 @@ def_THelper(vopmvx) {
429414
def_INSTR_TAB("101011 ? ????? ????? ??? ????? ????? ??", vnmsub);
430415
def_INSTR_TAB("101101 ? ????? ????? ??? ????? ????? ??", vmacc);
431416
def_INSTR_TAB("101111 ? ????? ????? ??? ????? ????? ??", vnmsac);
417+
432418
def_INSTR_TAB("110000 ? ????? ????? ??? ????? ????? ??", vwaddu);
433419
def_INSTR_TAB("110001 ? ????? ????? ??? ????? ????? ??", vwadd);
434420
def_INSTR_TAB("110010 ? ????? ????? ??? ????? ????? ??", vwsubu);

0 commit comments

Comments
 (0)