@@ -539,7 +539,7 @@ struct VECTOR_SHL_V128
539
539
}
540
540
if (all_same) {
541
541
// Every count is the same, so we can use SHL
542
- e.SHL (i.dest .reg ().B16 (), i.src1 .reg ().B16 (), shamt.u8 [0 ]);
542
+ e.SHL (i.dest .reg ().B16 (), i.src1 .reg ().B16 (), shamt.u8 [0 ] & 0x7 );
543
543
return ;
544
544
}
545
545
e.ADD (e.GetNativeParam (1 ), SP, e.StashConstantV (1 , i.src2 .constant ()));
@@ -563,7 +563,7 @@ struct VECTOR_SHL_V128
563
563
}
564
564
if (all_same) {
565
565
// Every count is the same, so we can use SHL
566
- e.SHL (i.dest .reg ().H8 (), i.src1 .reg ().H8 (), shamt.u8 [0 ]);
566
+ e.SHL (i.dest .reg ().H8 (), i.src1 .reg ().H8 (), shamt.u8 [0 ] & 0xF );
567
567
return ;
568
568
}
569
569
e.ADD (e.GetNativeParam (1 ), SP, e.StashConstantV (1 , i.src2 .constant ()));
@@ -587,7 +587,7 @@ struct VECTOR_SHL_V128
587
587
}
588
588
if (all_same) {
589
589
// Every count is the same, so we can use SHL
590
- e.SHL (i.dest .reg ().S4 (), i.src1 .reg ().S4 (), shamt.u8 [0 ]);
590
+ e.SHL (i.dest .reg ().S4 (), i.src1 .reg ().S4 (), shamt.u8 [0 ] & 0x1F );
591
591
return ;
592
592
}
593
593
e.ADD (e.GetNativeParam (1 ), SP, e.StashConstantV (1 , i.src2 .constant ()));
0 commit comments