Commit 15ca25a4 authored by George Wort's avatar George Wort Committed by Commit Bot

[liftoff][arm] Implement AssertUnreachable

This implements AssertUnreachable for the arm32 port of Liftoff.

Bug: v8:6600
Change-Id: I9aa5083dc1be175fc5f2f386d8aace021bab3b03
Reviewed-on: https://chromium-review.googlesource.com/c/1346335
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57767}
parent 940d6f33
......@@ -1884,6 +1884,10 @@ void TurboAssembler::Assert(Condition cond, AbortReason reason) {
Check(cond, reason);
}
void TurboAssembler::AssertUnreachable(AbortReason reason) {
if (emit_debug_code()) Abort(reason);
}
void TurboAssembler::Check(Condition cond, AbortReason reason) {
Label L;
b(cond, &L);
......
......@@ -281,9 +281,13 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
void MovFromFloatResult(DwVfpRegister dst);
// Calls Abort(msg) if the condition cond is not satisfied.
// Use --debug_code to enable.
// Use --debug-code to enable.
void Assert(Condition cond, AbortReason reason);
// Like Assert(), but without condition.
// Use --debug-code to enable.
void AssertUnreachable(AbortReason reason);
// Like Assert(), but always enabled.
void Check(Condition cond, AbortReason reason);
......
......@@ -476,6 +476,7 @@ void LiftoffAssembler::FillI64Half(Register reg, uint32_t half_index) {
Register rhs) { \
instruction(dst, lhs, rhs); \
}
#define UNIMPLEMENTED_I64_BINOP(name) \
void LiftoffAssembler::emit_##name(LiftoffRegister dst, LiftoffRegister lhs, \
LiftoffRegister rhs) { \
......@@ -804,7 +805,8 @@ void LiftoffAssembler::CallTrapCallbackForTesting() {
}
void LiftoffAssembler::AssertUnreachable(AbortReason reason) {
BAILOUT("AssertUnreachable");
// Asserts unreachable within the wasm code.
TurboAssembler::AssertUnreachable(reason);
}
void LiftoffAssembler::PushRegisters(LiftoffRegList regs) {
......
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