* fix parameter error. * fix float convert to i8 and i16 should extract sign bit. * add missing regression test file. * using tmp register. * float convert i8 will consume more instructions. * fix worse inst emit size. * fix worst_case_size.
20 lines
317 B
Plaintext
20 lines
317 B
Plaintext
test interpret
|
|
test run
|
|
target riscv64
|
|
|
|
function %a(f32) -> i8 system_v {
|
|
block0(v0: f32):
|
|
v1 = fcvt_to_sint_sat.i8 v0
|
|
return v1
|
|
}
|
|
|
|
; run: %a(-0x1.000006p125) == -128
|
|
|
|
|
|
function %b(f32) -> i16 system_v {
|
|
block0(v0: f32):
|
|
v1 = fcvt_to_sint_sat.i16 v0
|
|
return v1
|
|
}
|
|
|
|
; run: %b(-0x1.000006p125) == -32768 |