Implement Umulhi for the interpreter
Implemented `Umulhi` for the Cranelift interpreter, performing unsigned integer multiplication and producing the high half of a double-length result. Fixed `ExtractUpper` conversion behaviour as part of this change, which was extracting from a 128-bit value regardless of the size of the original value. Copyright (c) 2021, Arm Limited.
This commit is contained in:
@@ -273,7 +273,7 @@ impl Value for DataValue {
|
||||
kind
|
||||
);
|
||||
|
||||
let shift_amt = 128 - (ty.bytes() * 8);
|
||||
let shift_amt = (self.ty().bytes() * 8) - (ty.bytes() * 8);
|
||||
let mask = (1 << (ty.bytes() * 8)) - 1i128;
|
||||
let shifted_mask = mask << shift_amt;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user