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:
dheaton-arm
2021-09-02 13:11:41 +01:00
parent 02ef6a02b8
commit 16b6a404e4
4 changed files with 116 additions and 2 deletions

View File

@@ -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;