Index: test/cctest/test-code-stubs-x87.cc |
diff --git a/test/cctest/test-code-stubs-x87.cc b/test/cctest/test-code-stubs-x87.cc |
index ef44f5420b3cab82add4634bf0c839d4f8a28e03..e0f9a453ed20fc65c8fea39f37aa47fc145efe8a 100644 |
--- a/test/cctest/test-code-stubs-x87.cc |
+++ b/test/cctest/test-code-stubs-x87.cc |
@@ -70,11 +70,13 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate, |
int param_offset = 7 * kPointerSize; |
// Save registers make sure they don't get clobbered. |
int reg_num = 0; |
- for (; reg_num < Register::NumAllocatableRegisters(); ++reg_num) { |
- Register reg = Register::FromAllocationIndex(reg_num); |
- if (!reg.is(esp) && !reg.is(ebp) && !reg.is(destination_reg)) { |
- __ push(reg); |
- param_offset += kPointerSize; |
+ for (; reg_num < Register::kNumRegisters; ++reg_num) { |
+ Register reg = Register::from_code(reg_num); |
+ if (reg.IsAllocatable()) { |
+ if (!reg.is(esp) && !reg.is(ebp) && !reg.is(destination_reg)) { |
+ __ push(reg); |
+ param_offset += kPointerSize; |
+ } |
} |
} |
@@ -89,11 +91,13 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate, |
// Make sure no registers have been unexpectedly clobbered |
for (--reg_num; reg_num >= 0; --reg_num) { |
- Register reg = Register::FromAllocationIndex(reg_num); |
- if (!reg.is(esp) && !reg.is(ebp) && !reg.is(destination_reg)) { |
- __ cmp(reg, MemOperand(esp, 0)); |
- __ Assert(equal, kRegisterWasClobbered); |
- __ add(esp, Immediate(kPointerSize)); |
+ Register reg = Register::from_code(reg_num); |
+ if (reg.IsAllocatable()) { |
+ if (!reg.is(esp) && !reg.is(ebp) && !reg.is(destination_reg)) { |
+ __ cmp(reg, MemOperand(esp, 0)); |
+ __ Assert(equal, kRegisterWasClobbered); |
+ __ add(esp, Immediate(kPointerSize)); |
+ } |
} |
} |