Commit 0300caa5 authored by Vincent Belliard's avatar Vincent Belliard Committed by Commit Bot

[Liftoff] add LiftoffAssembler::AbortCompilation

For AArch64, clean correctly the pools when the compilation is aborted

Bug: v8:6600
Change-Id: I4bacdbeae49290ece0ce1bf47319bf7076fec37c
Reviewed-on: https://chromium-review.googlesource.com/1066151
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53263}
parent c4179d7c
......@@ -25,6 +25,8 @@ void LiftoffAssembler::PatchPrepareStackFrame(uint32_t offset,
void LiftoffAssembler::FinishCode() { CheckConstPool(true, false); }
void LiftoffAssembler::AbortCompilation() { FinishCode(); }
void LiftoffAssembler::LoadConstant(LiftoffRegister reg, WasmValue value,
RelocInfo::Mode rmode) {
BAILOUT("LoadConstant");
......
......@@ -155,6 +155,8 @@ void LiftoffAssembler::PatchPrepareStackFrame(uint32_t offset,
void LiftoffAssembler::FinishCode() { CheckConstPool(true, false); }
void LiftoffAssembler::AbortCompilation() { AbortedCodeGeneration(); }
void LiftoffAssembler::LoadConstant(LiftoffRegister reg, WasmValue value,
RelocInfo::Mode rmode) {
switch (value.type()) {
......
......@@ -144,6 +144,8 @@ void LiftoffAssembler::PatchPrepareStackFrame(uint32_t offset,
void LiftoffAssembler::FinishCode() {}
void LiftoffAssembler::AbortCompilation() {}
void LiftoffAssembler::LoadConstant(LiftoffRegister reg, WasmValue value,
RelocInfo::Mode rmode) {
switch (value.type()) {
......
......@@ -350,6 +350,7 @@ class LiftoffAssembler : public TurboAssembler {
inline uint32_t PrepareStackFrame();
inline void PatchPrepareStackFrame(uint32_t offset, uint32_t stack_slots);
inline void FinishCode();
inline void AbortCompilation();
inline void LoadConstant(LiftoffRegister, WasmValue,
RelocInfo::Mode rmode = RelocInfo::NONE);
......
......@@ -2013,7 +2013,7 @@ wasm::WasmCode* LiftoffCompilationUnit::FinishCompilation(
void LiftoffCompilationUnit::AbortCompilation() {
// The compilation is aborted. Put the assembler in a clean mode before
// its deletion.
asm_.FinishCode();
asm_.AbortCompilation();
}
#undef __
......
......@@ -128,6 +128,8 @@ void LiftoffAssembler::PatchPrepareStackFrame(uint32_t offset,
void LiftoffAssembler::FinishCode() {}
void LiftoffAssembler::AbortCompilation() {}
void LiftoffAssembler::LoadConstant(LiftoffRegister reg, WasmValue value,
RelocInfo::Mode rmode) {
switch (value.type()) {
......
......@@ -118,6 +118,8 @@ void LiftoffAssembler::PatchPrepareStackFrame(uint32_t offset,
void LiftoffAssembler::FinishCode() {}
void LiftoffAssembler::AbortCompilation() {}
void LiftoffAssembler::LoadConstant(LiftoffRegister reg, WasmValue value,
RelocInfo::Mode rmode) {
switch (value.type()) {
......
......@@ -25,6 +25,8 @@ void LiftoffAssembler::PatchPrepareStackFrame(uint32_t offset,
void LiftoffAssembler::FinishCode() { EmitConstantPool(); }
void LiftoffAssembler::AbortCompilation() { FinishCode(); }
void LiftoffAssembler::LoadConstant(LiftoffRegister reg, WasmValue value,
RelocInfo::Mode rmode) {
BAILOUT("LoadConstant");
......
......@@ -25,6 +25,8 @@ void LiftoffAssembler::PatchPrepareStackFrame(uint32_t offset,
void LiftoffAssembler::FinishCode() {}
void LiftoffAssembler::AbortCompilation() {}
void LiftoffAssembler::LoadConstant(LiftoffRegister reg, WasmValue value,
RelocInfo::Mode rmode) {
BAILOUT("LoadConstant");
......
......@@ -134,6 +134,8 @@ void LiftoffAssembler::PatchPrepareStackFrame(uint32_t offset,
void LiftoffAssembler::FinishCode() {}
void LiftoffAssembler::AbortCompilation() {}
void LiftoffAssembler::LoadConstant(LiftoffRegister reg, WasmValue value,
RelocInfo::Mode rmode) {
switch (value.type()) {
......
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