emit_x64_vector: Fix ArithmeticShiftRightByte zero_extend constant
Should be shifting in _bytes_ of `0x80`. Not bits.
This commit is contained in:
parent
ec52922dae
commit
3e932ca55d
1 changed files with 1 additions and 1 deletions
|
@ -442,7 +442,7 @@ static void ArithmeticShiftRightByte(EmitContext& ctx, BlockOfCode& code, const
|
||||||
if (code.HasAVX512_Icelake()) {
|
if (code.HasAVX512_Icelake()) {
|
||||||
// Do a logical shift right upon the 8x8 bit-matrix, but shift in
|
// Do a logical shift right upon the 8x8 bit-matrix, but shift in
|
||||||
// `0x80` bytes into the matrix to repeat the most significant bit.
|
// `0x80` bytes into the matrix to repeat the most significant bit.
|
||||||
const u64 zero_extend = ~(0xFFFFFFFFFFFFFFFF << shift_amount) & 0x8080808080808080;
|
const u64 zero_extend = ~(0xFFFFFFFFFFFFFFFF << (shift_amount * 8)) & 0x8080808080808080;
|
||||||
const u64 shift_matrix = (0x0102040810204080 >> (shift_amount * 8)) | zero_extend;
|
const u64 shift_matrix = (0x0102040810204080 >> (shift_amount * 8)) | zero_extend;
|
||||||
code.vgf2p8affineqb(result, result, code.MConst(xword_b, shift_matrix), 0);
|
code.vgf2p8affineqb(result, result, code.MConst(xword_b, shift_matrix), 0);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue