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

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

Issue 1287383003: Re-reland: Remove register index/code indirection (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix MIPS tests again 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-arm.cc ('k') | test/cctest/test-code-stubs-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-code-stubs-arm64.cc
diff --git a/test/cctest/test-code-stubs-arm64.cc b/test/cctest/test-code-stubs-arm64.cc
index 8f40c9052ace2117ba7538d8e73a533ee020d7ec..c7a6cdb4be0e5f94a01c710fa884d2bee9666f4b 100644
--- a/test/cctest/test-code-stubs-arm64.cc
+++ b/test/cctest/test-code-stubs-arm64.cc
@@ -72,11 +72,13 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate,
// Save registers make sure they don't get clobbered.
int source_reg_offset = kDoubleSize;
int reg_num = 0;
- for (; reg_num < Register::NumAllocatableRegisters(); ++reg_num) {
+ for (; reg_num < Register::kNumRegisters; ++reg_num) {
Register reg = Register::from_code(reg_num);
- if (!reg.is(destination_reg)) {
- queue.Queue(reg);
- source_reg_offset += kPointerSize;
+ if (reg.IsAllocatable()) {
+ if (!reg.is(destination_reg)) {
+ queue.Queue(reg);
+ source_reg_offset += kPointerSize;
+ }
}
}
// Re-push the double argument.
@@ -101,10 +103,12 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate,
// // 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.is(destination_reg)) {
- __ Pop(ip0);
- __ cmp(reg, ip0);
- __ Assert(eq, kRegisterWasClobbered);
+ if (reg.IsAllocatable()) {
+ if (!reg.is(destination_reg)) {
+ __ Pop(ip0);
+ __ cmp(reg, ip0);
+ __ Assert(eq, kRegisterWasClobbered);
+ }
}
}
« no previous file with comments | « test/cctest/test-code-stubs-arm.cc ('k') | test/cctest/test-code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698