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

Unified Diff: src/x64/macro-assembler-x64.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 | « src/x64/macro-assembler-x64.h ('k') | src/x87/assembler-x87.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/macro-assembler-x64.cc
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
index f41da95da76e9601bf11f96aed31cbb9ccfef601..ea837dca4b014f4397428cdecc65db08b81cc42f 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -10,7 +10,6 @@
#include "src/codegen.h"
#include "src/debug/debug.h"
#include "src/heap/heap.h"
-#include "src/register-configuration.h"
#include "src/x64/assembler-x64.h"
#include "src/x64/macro-assembler-x64.h"
@@ -730,8 +729,7 @@
}
-#define REG(Name) \
- { Register::kCode_##Name }
+#define REG(Name) { kRegister_ ## Name ## _Code }
static const Register saved_regs[] = {
REG(rax), REG(rcx), REG(rdx), REG(rbx), REG(rbp), REG(rsi), REG(rdi), REG(r8),
@@ -3712,14 +3710,12 @@
#endif
// Optionally save all XMM registers.
if (save_doubles) {
- int space = XMMRegister::kMaxNumRegisters * kDoubleSize +
- arg_stack_space * kRegisterSize;
+ int space = XMMRegister::kMaxNumAllocatableRegisters * kDoubleSize +
+ arg_stack_space * kRegisterSize;
subp(rsp, Immediate(space));
int offset = -2 * kPointerSize;
- const RegisterConfiguration* config = RegisterConfiguration::ArchDefault();
- for (int i = 0; i < config->num_allocatable_double_registers(); ++i) {
- DoubleRegister reg =
- DoubleRegister::from_code(config->GetAllocatableDoubleCode(i));
+ for (int i = 0; i < XMMRegister::NumAllocatableRegisters(); i++) {
+ XMMRegister reg = XMMRegister::FromAllocationIndex(i);
movsd(Operand(rbp, offset - ((i + 1) * kDoubleSize)), reg);
}
} else if (arg_stack_space > 0) {
@@ -3762,10 +3758,8 @@
// r15 : argv
if (save_doubles) {
int offset = -2 * kPointerSize;
- const RegisterConfiguration* config = RegisterConfiguration::ArchDefault();
- for (int i = 0; i < config->num_allocatable_double_registers(); ++i) {
- DoubleRegister reg =
- DoubleRegister::from_code(config->GetAllocatableDoubleCode(i));
+ for (int i = 0; i < XMMRegister::NumAllocatableRegisters(); i++) {
+ XMMRegister reg = XMMRegister::FromAllocationIndex(i);
movsd(reg, Operand(rbp, offset - ((i + 1) * kDoubleSize)));
}
}
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | src/x87/assembler-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698