[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: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53263}
This commit is contained in:
Vincent Belliard 2018-05-18 07:36:43 -07:00 committed by Commit Bot
parent c4179d7caa
commit 0300caa502
10 changed files with 18 additions and 1 deletions

View File

@ -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");

View File

@ -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()) {

View File

@ -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()) {

View File

@ -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);

View File

@ -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 __

View File

@ -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()) {

View File

@ -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()) {

View File

@ -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");

View File

@ -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");

View File

@ -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()) {