Implement saturated add/subtract

This commit is contained in:
ayazhafiz 2022-01-10 22:37:08 -05:00
parent 4ea91b54eb
commit 2c41c43aea
10 changed files with 177 additions and 66 deletions

View file

@ -136,6 +136,7 @@ pub fn dispatch_low_level<'a>(
},
NumToStr => return NotImplemented,
NumAddChecked => return NotImplemented,
NumAddSaturated => return NotImplemented,
NumSub => match ret_layout {
WasmLayout::Primitive(value_type, _) => match value_type {
I32 => code_builder.i32_sub(),
@ -168,6 +169,7 @@ pub fn dispatch_low_level<'a>(
},
},
NumSubChecked => return NotImplemented,
NumSubSaturated => return NotImplemented,
NumMul => match ret_layout {
WasmLayout::Primitive(value_type, _) => match value_type {
I32 => code_builder.i32_mul(),