Index: test/cctest/test-utils-a64.cc |
diff --git a/test/cctest/test-utils-a64.cc b/test/cctest/test-utils-a64.cc |
index e637a6e52b7d1138b300ab3b890c7b04cb126df1..e9aecb825ddd5ac369c7730867930b7be0351b05 100644 |
--- a/test/cctest/test-utils-a64.cc |
+++ b/test/cctest/test-utils-a64.cc |
@@ -323,11 +323,8 @@ void RegisterDump::Dump(MacroAssembler* masm) { |
ASSERT(__ StackPointer().Is(csp)); |
// Ensure that we don't unintentionally clobber any registers. |
- Register old_tmp0 = __ Tmp0(); |
- Register old_tmp1 = __ Tmp1(); |
- FPRegister old_fptmp0 = __ FPTmp0(); |
- __ SetScratchRegisters(NoReg, NoReg); |
- __ SetFPScratchRegister(NoFPReg); |
+ UseScratchRegisterScope temps(masm); |
+ temps.ExcludeAll(); |
// Preserve some temporary registers. |
Register dump_base = x0; |
@@ -418,9 +415,5 @@ void RegisterDump::Dump(MacroAssembler* masm) { |
__ Ldr(dump2_base, MemOperand(dump2, dump2_base.code() * kXRegSizeInBytes)); |
__ Ldr(dump2, MemOperand(dump2, dump2.code() * kXRegSizeInBytes)); |
- // Restore the MacroAssembler's scratch registers. |
- __ SetScratchRegisters(old_tmp0, old_tmp1); |
- __ SetFPScratchRegister(old_fptmp0); |
- |
completed_ = true; |
} |