Index: src/a64/lithium-codegen-a64.cc |
diff --git a/src/a64/lithium-codegen-a64.cc b/src/a64/lithium-codegen-a64.cc |
index 6c29abdcff467eaf2cfa923d92ce7438ae20195d..ad5e7a254db4c9e61d77ef56a83238c9ead7abae 100644 |
--- a/src/a64/lithium-codegen-a64.cc |
+++ b/src/a64/lithium-codegen-a64.cc |
@@ -2535,7 +2535,8 @@ void LCodeGen::DoCheckValue(LCheckValue* instr) { |
Handle<HeapObject> object = instr->hydrogen()->object().handle(); |
AllowDeferredHandleDereference smi_check; |
if (isolate()->heap()->InNewSpace(*object)) { |
- Register temp = ToRegister(instr->temp()); |
+ UseScratchRegisterScope temps(masm()); |
+ Register temp = temps.AcquireX(); |
Handle<Cell> cell = isolate()->factory()->NewCell(object); |
__ Mov(temp, Operand(Handle<Object>(cell))); |
__ Ldr(temp, FieldMemOperand(temp, Cell::kValueOffset)); |