Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Unified Diff: test/cctest/test-code-stubs-ia32.cc

Issue 1380863004: Revert of Reland: Remove register index/code indirection (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-code-stubs-arm64.cc ('k') | test/cctest/test-code-stubs-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
}
« no previous file with comments | « test/cctest/test-code-stubs-arm64.cc ('k') | test/cctest/test-code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698