[wasm][liftoff][eh] Decode fp values from exceptions

R=clemensb@chromium.org

Bug: v8:11453
Change-Id: I3aada28f3cb9839b2d5fc7e85f5fe87018d17d1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2767022
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73475}
This commit is contained in:
Thibaud Michaud 2021-03-17 13:39:58 +01:00 committed by Commit Bot
parent 644b730631
commit c665440b7f

View File

@ -3967,9 +3967,25 @@ class LiftoffCompiler {
case kI32:
Load32BitExceptionValue(value.gp(), values_array, index, pinned);
break;
case kF32: {
LiftoffRegister tmp_reg =
pinned.set(__ GetUnusedRegister(kGpReg, pinned));
Load32BitExceptionValue(tmp_reg.gp(), values_array, index, pinned);
__ emit_type_conversion(kExprF32ReinterpretI32, value, tmp_reg,
nullptr);
break;
}
case kI64:
Load64BitExceptionValue(value, values_array, index, pinned);
break;
case kF64: {
RegClass rc = reg_class_for(kI64);
LiftoffRegister tmp_reg = pinned.set(__ GetUnusedRegister(rc, pinned));
Load64BitExceptionValue(tmp_reg, values_array, index, pinned);
__ emit_type_conversion(kExprF64ReinterpretI64, value, tmp_reg,
nullptr);
break;
}
default:
UNREACHABLE();
}
@ -3987,7 +4003,8 @@ class LiftoffCompiler {
uint32_t index = 0;
const WasmExceptionSig* sig = exception->sig;
for (ValueType param : sig->parameters()) {
if (param != kWasmI32 && param != kWasmI64) {
if (param != kWasmI32 && param != kWasmI64 && param != kWasmF32 &&
param != kWasmF64) {
unsupported(decoder, kExceptionHandling,
"unsupported type in exception payload");
return;