diff options
Diffstat (limited to 'chromium/v8/src/baseline/baseline-assembler-inl.h')
-rw-r--r-- | chromium/v8/src/baseline/baseline-assembler-inl.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/chromium/v8/src/baseline/baseline-assembler-inl.h b/chromium/v8/src/baseline/baseline-assembler-inl.h index 83c102176f8..583db7e6798 100644 --- a/chromium/v8/src/baseline/baseline-assembler-inl.h +++ b/chromium/v8/src/baseline/baseline-assembler-inl.h @@ -34,6 +34,8 @@ #include "src/baseline/mips64/baseline-assembler-mips64-inl.h" #elif V8_TARGET_ARCH_MIPS #include "src/baseline/mips/baseline-assembler-mips-inl.h" +#elif V8_TARGET_ARCH_LOONG64 +#include "src/baseline/loong64/baseline-assembler-loong64-inl.h" #else #error Unsupported target architecture. #endif @@ -135,6 +137,24 @@ SaveAccumulatorScope::~SaveAccumulatorScope() { assembler_->Pop(kInterpreterAccumulatorRegister); } +EnsureAccumulatorPreservedScope::EnsureAccumulatorPreservedScope( + BaselineAssembler* assembler) + : assembler_(assembler) +#ifdef V8_CODE_COMMENTS + , + comment_(assembler->masm(), "EnsureAccumulatorPreservedScope") +#endif +{ + assembler_->Push(kInterpreterAccumulatorRegister); +} + +EnsureAccumulatorPreservedScope::~EnsureAccumulatorPreservedScope() { + BaselineAssembler::ScratchRegisterScope scratch(assembler_); + Register reg = scratch.AcquireScratch(); + assembler_->Pop(reg); + AssertEqualToAccumulator(reg); +} + #undef __ } // namespace baseline |