Skip to content

Commit

Permalink
Translate Wasm's i32x4.trunc_sat_f32x4_s instruction to Cranelift's f…
Browse files Browse the repository at this point in the history
…cvt_to_sint_sat
  • Loading branch information
abrown committed Jun 12, 2020
1 parent 5379273 commit 6f62360
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cranelift/wasm/src/code_translator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1548,8 +1548,11 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
let a = pop1_with_bitcast(state, I32X4, builder);
state.push1(builder.ins().fcvt_from_uint(F32X4, a))
}
Operator::I32x4TruncSatF32x4S
| Operator::I32x4TruncSatF32x4U
Operator::I32x4TruncSatF32x4S => {
let a = pop1_with_bitcast(state, F32X4, builder);
state.push1(builder.ins().fcvt_to_sint_sat(I32X4, a))
}
Operator::I32x4TruncSatF32x4U
| Operator::I8x16Abs
| Operator::I16x8Abs
| Operator::I32x4Abs
Expand Down

0 comments on commit 6f62360

Please sign in to comment.