Commit 5841a47e authored by Vincent Belliard's avatar Vincent Belliard Committed by Commit Bot

[arm64][Liftoff] implement trap instructions

Define and use TurboAssembler::AssertUnreachable

Bug: v8:6600
Change-Id: I6901896ea4fd7e0fe24dd76a1afbb409a24a2994
Reviewed-on: https://chromium-review.googlesource.com/1040766
Commit-Queue: Vincent Belliard <vincent.belliard@arm.com>
Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52963}
parent 7208d645
......@@ -3012,6 +3012,10 @@ void TurboAssembler::Assert(Condition cond, AbortReason reason) {
}
}
void TurboAssembler::AssertUnreachable(AbortReason reason) {
if (emit_debug_code()) Abort(reason);
}
void MacroAssembler::AssertRegisterIsRoot(Register reg,
Heap::RootListIndex index,
AbortReason reason) {
......
......@@ -590,6 +590,10 @@ class TurboAssembler : public Assembler {
// 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);
void AssertSmi(Register object,
AbortReason reason = AbortReason::kOperandIsNotASmi);
......
......@@ -619,11 +619,11 @@ void LiftoffAssembler::StackCheck(Label* ool_code) {
}
void LiftoffAssembler::CallTrapCallbackForTesting() {
BAILOUT("CallTrapCallbackForTesting");
CallCFunction(ExternalReference::wasm_call_trap_callback_for_testing(), 0);
}
void LiftoffAssembler::AssertUnreachable(AbortReason reason) {
BAILOUT("AssertUnreachable");
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