[x86_64] shift operations may return wrong result if 2nd operand is larger than int8
Shifting instructions in Mu require two operands of the same size, e.g. Shl <int64> a b
, in which a
and b
are both int64
.
However shl
, shr
, sar
in x86_64 either takes a second operand in the CL
register (8 bits), or as a 8bits immediate. Current the instruction selector simply moves lower 8bits of b
into CL
, which may result in incorrect result.