Implemented `Smulhi` for the Cranelift interpreter, performing signed integer multiplication and producing the high half of a double-length result. Copyright (c) 2021, Arm Limited
13 lines
296 B
Plaintext
13 lines
296 B
Plaintext
test interpret
|
|
test run
|
|
target aarch64
|
|
; x86_64 backend only supports `i16`, `i32`, and `i64` types.
|
|
|
|
function %smulhi_i8(i8, i8) -> i8 {
|
|
block0(v0: i8, v1: i8):
|
|
v2 = smulhi v0, v1
|
|
return v2
|
|
}
|
|
; run: %smulhi_i8(-2, -4) == 0
|
|
; run: %smulhi_i8(2, -4) == -1
|
|
; run: %smulhi_i8(127, 127) == 63 |