Commit b2f1d583 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[Liftoff] Implement the unreachable opcode

R=ahaas@chromium.org

Bug: v8:6600
Change-Id: Id2fd843aa15f7a414205ac413432bd8cfec6e88b
Reviewed-on: https://chromium-review.googlesource.com/1034862Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52888}
parent 9035ca19
...@@ -1199,7 +1199,12 @@ class LiftoffCompiler { ...@@ -1199,7 +1199,12 @@ class LiftoffCompiler {
__ Store(addr.gp(), no_reg, offset, reg, type, pinned); __ Store(addr.gp(), no_reg, offset, reg, type, pinned);
} }
void Unreachable(Decoder* decoder) { unsupported(decoder, "unreachable"); } void Unreachable(Decoder* decoder) {
Label* unreachable_label = AddOutOfLineTrap(
decoder->position(), Builtins::kThrowWasmTrapUnreachable);
__ emit_jump(unreachable_label);
__ AssertUnreachable(AbortReason::kUnexpectedReturnFromWasmTrap);
}
void Select(Decoder* decoder, const Value& cond, const Value& fval, void Select(Decoder* decoder, const Value& cond, const Value& fval,
const Value& tval, Value* result) { const Value& tval, Value* result) {
......
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