Index: test/cctest/test-code-stubs-ia32.cc |
diff --git a/test/cctest/test-code-stubs-ia32.cc b/test/cctest/test-code-stubs-ia32.cc |
index e0f9a453ed20fc65c8fea39f37aa47fc145efe8a..ef44f5420b3cab82add4634bf0c839d4f8a28e03 100644 |
--- a/test/cctest/test-code-stubs-ia32.cc |
+++ b/test/cctest/test-code-stubs-ia32.cc |
@@ -70,13 +70,11 @@ |
int param_offset = 7 * kPointerSize; |
// Save registers make sure they don't get clobbered. |
int reg_num = 0; |
- 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; |
- } |
+ 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; |
} |
} |
@@ -91,13 +89,11 @@ |
// Make sure no registers have been unexpectedly clobbered |
for (--reg_num; reg_num >= 0; --reg_num) { |
- 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)); |
- } |
+ 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)); |
} |
} |