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

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

Issue 1365073002: Revert of Remove register index/code indirection (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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-mips64.cc ('k') | test/unittests/compiler/instruction-selector-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-code-stubs-x64.cc
diff --git a/test/cctest/test-code-stubs-x64.cc b/test/cctest/test-code-stubs-x64.cc
index 8f22dd9fcfc48f595114f7351e7257f1bbddba21..b58b073f3b7939736499e39caa4fea653634a53c 100644
--- a/test/cctest/test-code-stubs-x64.cc
+++ b/test/cctest/test-code-stubs-x64.cc
@@ -33,7 +33,6 @@
#include "src/code-stubs.h"
#include "src/factory.h"
#include "src/macro-assembler.h"
-#include "src/register-configuration.h"
#include "test/cctest/cctest.h"
#include "test/cctest/test-code-stubs.h"
@@ -63,24 +62,20 @@
__ pushq(rsi);
__ pushq(rdi);
-
- const RegisterConfiguration* config = RegisterConfiguration::ArchDefault();
if (!source_reg.is(rsp)) {
// The argument we pass to the stub is not a heap number, but instead
// stack-allocated and offset-wise made to look like a heap number for
// the stub. We create that "heap number" after pushing all allocatable
// registers.
int double_argument_slot =
- (config->num_allocatable_general_registers() - 1) * kPointerSize +
- kDoubleSize;
+ (Register::NumAllocatableRegisters() - 1) * kPointerSize + kDoubleSize;
__ leaq(source_reg, MemOperand(rsp, -double_argument_slot - offset));
}
// Save registers make sure they don't get clobbered.
int reg_num = 0;
- for (; reg_num < config->num_allocatable_general_registers(); ++reg_num) {
- Register reg =
- Register::from_code(config->GetAllocatableGeneralCode(reg_num));
+ for (;reg_num < Register::NumAllocatableRegisters(); ++reg_num) {
+ Register reg = Register::FromAllocationIndex(reg_num);
if (!reg.is(rsp) && !reg.is(rbp) && !reg.is(destination_reg)) {
__ pushq(reg);
}
@@ -97,8 +92,7 @@
// Make sure no registers have been unexpectedly clobbered
for (--reg_num; reg_num >= 0; --reg_num) {
- Register reg =
- Register::from_code(config->GetAllocatableGeneralCode(reg_num));
+ Register reg = Register::FromAllocationIndex(reg_num);
if (!reg.is(rsp) && !reg.is(rbp) && !reg.is(destination_reg)) {
__ cmpq(reg, MemOperand(rsp, 0));
__ Assert(equal, kRegisterWasClobbered);
« no previous file with comments | « test/cctest/test-code-stubs-mips64.cc ('k') | test/unittests/compiler/instruction-selector-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698