Merged scalar and simd logical operator
This commit is contained in:
committed by
Andrew Brown
parent
4ccacde3d4
commit
cd4d7ca0a1
@@ -786,15 +786,15 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
|
||||
let (arg1, arg2) = state.pop2();
|
||||
state.push1(builder.ins().iadd(arg1, arg2));
|
||||
}
|
||||
Operator::I32And | Operator::I64And => {
|
||||
Operator::I32And | Operator::I64And | Operator::V128And => {
|
||||
let (arg1, arg2) = state.pop2();
|
||||
state.push1(builder.ins().band(arg1, arg2));
|
||||
}
|
||||
Operator::I32Or | Operator::I64Or => {
|
||||
Operator::I32Or | Operator::I64Or | Operator::V128Or => {
|
||||
let (arg1, arg2) = state.pop2();
|
||||
state.push1(builder.ins().bor(arg1, arg2));
|
||||
}
|
||||
Operator::I32Xor | Operator::I64Xor => {
|
||||
Operator::I32Xor | Operator::I64Xor | Operator::V128Xor => {
|
||||
let (arg1, arg2) = state.pop2();
|
||||
state.push1(builder.ins().bxor(arg1, arg2));
|
||||
}
|
||||
@@ -1100,18 +1100,6 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
|
||||
let a = state.pop1();
|
||||
state.push1(builder.ins().bnot(a));
|
||||
}
|
||||
Operator::V128And => {
|
||||
let (a, b) = state.pop2();
|
||||
state.push1(builder.ins().band(a, b));
|
||||
}
|
||||
Operator::V128Or => {
|
||||
let (a, b) = state.pop2();
|
||||
state.push1(builder.ins().bor(a, b));
|
||||
}
|
||||
Operator::V128Xor => {
|
||||
let (a, b) = state.pop2();
|
||||
state.push1(builder.ins().bxor(a, b));
|
||||
}
|
||||
Operator::I16x8Shl | Operator::I32x4Shl | Operator::I64x2Shl => {
|
||||
let (a, b) = state.pop2();
|
||||
let bitcast_a = optionally_bitcast_vector(a, type_of(op), builder);
|
||||
|
||||
Reference in New Issue
Block a user