Skip to content

Commit 420eda6

Browse files
authored
[RV64_DYNAREC] Fix VPERM2I128 vector mask multiple (#4589)
VPERM2I128 only operates on 256-bit vectors, so the vector mask multiple parameter should be 2.
1 parent 5735c8b commit 420eda6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/dynarec/rv64/dynarec_rv64_avx_66_0f3a_vector.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ uintptr_t dynarec64_AVX_66_0F3A_vector(dynarec_rv64_t* dyn, uintptr_t addr, uint
136136
int zero = j ? (u8 & 0x80) : (u8 & 0x08);
137137
int mask = j ? 0xc : 0x3;
138138
if (zero) {
139-
VECTOR_LOAD_VMASK(mask, x4, 1);
139+
VECTOR_LOAD_VMASK(mask, x4, 2);
140140
VXOR_VV(v0, v0, v0, VECTOR_MASKED);
141141
} else if (control != j) {
142142
int src = (control & 2) ? q1 : q0;
143-
VECTOR_LOAD_VMASK(mask, x4, 1);
143+
VECTOR_LOAD_VMASK(mask, x4, 2);
144144
if (((j == 0) && ((control & 1) == 0)) || ((j == 1) && ((control & 1) == 1))) {
145145
VMERGE_VVM(v0, v0, src);
146146
} else {
@@ -354,11 +354,11 @@ uintptr_t dynarec64_AVX_66_0F3A_vector(dynarec_rv64_t* dyn, uintptr_t addr, uint
354354
int zero = j ? (u8 & 0x80) : (u8 & 0x08);
355355
int mask = j ? 0xc : 0x3;
356356
if (zero) {
357-
VECTOR_LOAD_VMASK(mask, x4, 1);
357+
VECTOR_LOAD_VMASK(mask, x4, 2);
358358
VXOR_VV(v0, v0, v0, VECTOR_MASKED);
359359
} else if (control != j) {
360360
int src = (control & 2) ? q1 : q0;
361-
VECTOR_LOAD_VMASK(mask, x4, 1);
361+
VECTOR_LOAD_VMASK(mask, x4, 2);
362362
if (((j == 0) && ((control & 1) == 0)) || ((j == 1) && ((control & 1) == 1))) {
363363
VMERGE_VVM(v0, v0, src);
364364
} else {

0 commit comments

Comments
 (0)