Add iabs instructions.rs

This is necessary for implementing SIMD [abs](https://github.com/WebAssembly/simd/blob/master/proposals/simd/SIMD.md#lane-wise-integer-absolute-value).
This commit is contained in:
Andrew Brown
2020-06-29 15:37:36 -07:00
parent ec76f3207a
commit 26bdf9c333
2 changed files with 13 additions and 0 deletions

View File

@@ -2347,6 +2347,18 @@ pub(crate) fn define(
.operands_out(vec![a]),
);
ig.push(
Inst::new(
"iabs",
r#"
Integer absolute value with wrapping: `a := |x|`.
"#,
&formats.unary,
)
.operands_in(vec![x])
.operands_out(vec![a]),
);
ig.push(
Inst::new(
"imul",