Commit db36a80b authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[liftoff] Remove bailout for saturating conversions

Saturating conversions are implemented on all platforms now, so remove
the (unreachable) bailout.
Also, move the new cases up to the other macros, such that the
indentation (by clang-format) makes more sense.

R=rstz@chromium.org, thibaudm@chromium.org

Bug: v8:10520
Change-Id: Ia44a4852a087b0a2c19b3d62aebd73c834fa9af9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2289982Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68782}
parent 911a13eb
...@@ -1083,6 +1083,22 @@ class LiftoffCompiler { ...@@ -1083,6 +1083,22 @@ class LiftoffCompiler {
CASE_I64_UNOP(I64SExtendI32, i64_signextend_i32) CASE_I64_UNOP(I64SExtendI32, i64_signextend_i32)
CASE_I64_UNOP(I64Clz, i64_clz) CASE_I64_UNOP(I64Clz, i64_clz)
CASE_I64_UNOP(I64Ctz, i64_ctz) CASE_I64_UNOP(I64Ctz, i64_ctz)
CASE_TYPE_CONVERSION(I32SConvertSatF32, I32, F32, nullptr, kNoTrap)
CASE_TYPE_CONVERSION(I32UConvertSatF32, I32, F32, nullptr, kNoTrap)
CASE_TYPE_CONVERSION(I32SConvertSatF64, I32, F64, nullptr, kNoTrap)
CASE_TYPE_CONVERSION(I32UConvertSatF64, I32, F64, nullptr, kNoTrap)
CASE_TYPE_CONVERSION(I64SConvertSatF32, I64, F32,
&ExternalReference::wasm_float32_to_int64_sat,
kNoTrap)
CASE_TYPE_CONVERSION(I64UConvertSatF32, I64, F32,
&ExternalReference::wasm_float32_to_uint64_sat,
kNoTrap)
CASE_TYPE_CONVERSION(I64SConvertSatF64, I64, F64,
&ExternalReference::wasm_float64_to_int64_sat,
kNoTrap)
CASE_TYPE_CONVERSION(I64UConvertSatF64, I64, F64,
&ExternalReference::wasm_float64_to_uint64_sat,
kNoTrap)
case kExprI32Eqz: case kExprI32Eqz:
DCHECK(decoder->lookahead(0, kExprI32Eqz)); DCHECK(decoder->lookahead(0, kExprI32Eqz));
if (decoder->lookahead(1, kExprBrIf)) { if (decoder->lookahead(1, kExprBrIf)) {
...@@ -1116,24 +1132,6 @@ class LiftoffCompiler { ...@@ -1116,24 +1132,6 @@ class LiftoffCompiler {
__ emit_type_conversion(kExprI64UConvertI32, dst, c_call_dst, __ emit_type_conversion(kExprI64UConvertI32, dst, c_call_dst,
nullptr); nullptr);
}); });
CASE_TYPE_CONVERSION(I32SConvertSatF32, I32, F32, nullptr, kNoTrap)
CASE_TYPE_CONVERSION(I32UConvertSatF32, I32, F32, nullptr, kNoTrap)
CASE_TYPE_CONVERSION(I32SConvertSatF64, I32, F64, nullptr, kNoTrap)
CASE_TYPE_CONVERSION(I32UConvertSatF64, I32, F64, nullptr, kNoTrap)
CASE_TYPE_CONVERSION(I64SConvertSatF32, I64, F32,
&ExternalReference::wasm_float32_to_int64_sat,
kNoTrap)
CASE_TYPE_CONVERSION(I64UConvertSatF32, I64, F32,
&ExternalReference::wasm_float32_to_uint64_sat,
kNoTrap)
CASE_TYPE_CONVERSION(I64SConvertSatF64, I64, F64,
&ExternalReference::wasm_float64_to_int64_sat,
kNoTrap)
CASE_TYPE_CONVERSION(I64UConvertSatF64, I64, F64,
&ExternalReference::wasm_float64_to_uint64_sat,
kNoTrap)
return unsupported(decoder, kNonTrappingFloatToInt,
WasmOpcodes::OpcodeName(opcode));
default: default:
UNREACHABLE(); UNREACHABLE();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment