1- use core:: ops:: { BitAnd , BitOr , BitXor } ;
1+ use core:: ops:: { BitAnd , BitOr , BitXor , Neg } ;
22
33use super :: { DefaultRuntime , Stack } ;
44use crate :: {
@@ -332,16 +332,16 @@ fn exec_one(
332332 I64Or => arithmetic_method ! ( bitor, i64 , stack) ,
333333 I32Xor => arithmetic_method ! ( bitxor, i32 , stack) ,
334334 I64Xor => arithmetic_method ! ( bitxor, i64 , stack) ,
335- I32Shl => arithmetic_method ! ( wrapping_shl_self , i32 , stack) ,
336- I64Shl => arithmetic_method ! ( wrapping_shl_self , i64 , stack) ,
337- I32ShrS => arithmetic_method ! ( wrapping_shr_self , i32 , stack) ,
338- I64ShrS => arithmetic_method ! ( wrapping_shr_self , i64 , stack) ,
339- I32ShrU => arithmetic_method_cast ! ( wrapping_shr_self , i32 , u32 , stack) ,
340- I64ShrU => arithmetic_method_cast ! ( wrapping_shr_self , i64 , u64 , stack) ,
341- I32Rotl => arithmetic_method ! ( wrapping_rotl_self , i32 , stack) ,
342- I64Rotl => arithmetic_method ! ( wrapping_rotl_self , i64 , stack) ,
343- I32Rotr => arithmetic_method ! ( wrapping_rotr_self , i32 , stack) ,
344- I64Rotr => arithmetic_method ! ( wrapping_rotr_self , i64 , stack) ,
335+ I32Shl => arithmetic_method ! ( wasm_shl , i32 , stack) ,
336+ I64Shl => arithmetic_method ! ( wasm_shl , i64 , stack) ,
337+ I32ShrS => arithmetic_method ! ( wasm_shr , i32 , stack) ,
338+ I64ShrS => arithmetic_method ! ( wasm_shr , i64 , stack) ,
339+ I32ShrU => arithmetic_method_cast ! ( wasm_shr , i32 , u32 , stack) ,
340+ I64ShrU => arithmetic_method_cast ! ( wasm_shr , i64 , u64 , stack) ,
341+ I32Rotl => arithmetic_method ! ( wasm_rotl , i32 , stack) ,
342+ I64Rotl => arithmetic_method ! ( wasm_rotl , i64 , stack) ,
343+ I32Rotr => arithmetic_method ! ( wasm_rotr , i32 , stack) ,
344+ I64Rotr => arithmetic_method ! ( wasm_rotr , i64 , stack) ,
345345
346346 I32Clz => arithmetic_method_self ! ( leading_zeros, i32 , stack) ,
347347 I64Clz => arithmetic_method_self ! ( leading_zeros, i64 , stack) ,
@@ -367,6 +367,27 @@ fn exec_one(
367367 I64ExtendI32S => conv_1 ! ( i32 , i64 , stack) ,
368368 I32WrapI64 => conv_1 ! ( i64 , i32 , stack) ,
369369
370+ F32Abs => arithmetic_method_self ! ( abs, f32 , stack) ,
371+ F64Abs => arithmetic_method_self ! ( abs, f64 , stack) ,
372+ F32Neg => arithmetic_method_self ! ( neg, f32 , stack) ,
373+ F64Neg => arithmetic_method_self ! ( neg, f64 , stack) ,
374+ F32Ceil => arithmetic_method_self ! ( ceil, f32 , stack) ,
375+ F64Ceil => arithmetic_method_self ! ( ceil, f64 , stack) ,
376+ F32Floor => arithmetic_method_self ! ( floor, f32 , stack) ,
377+ F64Floor => arithmetic_method_self ! ( floor, f64 , stack) ,
378+ F32Trunc => arithmetic_method_self ! ( trunc, f32 , stack) ,
379+ F64Trunc => arithmetic_method_self ! ( trunc, f64 , stack) ,
380+ F32Nearest => arithmetic_method_self ! ( wasm_nearest, f32 , stack) ,
381+ F64Nearest => arithmetic_method_self ! ( wasm_nearest, f64 , stack) ,
382+ F32Sqrt => arithmetic_method_self ! ( sqrt, f32 , stack) ,
383+ F64Sqrt => arithmetic_method_self ! ( sqrt, f64 , stack) ,
384+ F32Min => arithmetic_method ! ( wasm_min, f32 , stack) ,
385+ F64Min => arithmetic_method ! ( wasm_min, f64 , stack) ,
386+ F32Max => arithmetic_method ! ( wasm_max, f32 , stack) ,
387+ F64Max => arithmetic_method ! ( wasm_max, f64 , stack) ,
388+ F32Copysign => arithmetic_method ! ( copysign, f32 , stack) ,
389+ F64Copysign => arithmetic_method ! ( copysign, f64 , stack) ,
390+
370391 // no-op instructions since types are erased at runtime
371392 I32ReinterpretF32 => { }
372393 I64ReinterpretF64 => { }
0 commit comments