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:
@@ -2347,6 +2347,18 @@ pub(crate) fn define(
|
|||||||
.operands_out(vec![a]),
|
.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(
|
ig.push(
|
||||||
Inst::new(
|
Inst::new(
|
||||||
"imul",
|
"imul",
|
||||||
|
|||||||
@@ -2069,6 +2069,7 @@ pub(crate) fn lower_insn_to_regs<C: LowerCtx<I = Inst>>(
|
|||||||
panic!("x86-specific opcode in supposedly arch-neutral IR!");
|
panic!("x86-specific opcode in supposedly arch-neutral IR!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Opcode::Iabs => unimplemented!(),
|
||||||
Opcode::AvgRound => unimplemented!(),
|
Opcode::AvgRound => unimplemented!(),
|
||||||
Opcode::TlsValue => unimplemented!(),
|
Opcode::TlsValue => unimplemented!(),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user