Index: src/x64/assembler-x64.cc |
diff --git a/src/x64/assembler-x64.cc b/src/x64/assembler-x64.cc |
index 059b576beaa42d52765c8b383762199a0a14e392..cb93ab878b9517a1348d32df1914fa9cff856f65 100644 |
--- a/src/x64/assembler-x64.cc |
+++ b/src/x64/assembler-x64.cc |
@@ -113,6 +113,20 @@ |
CpuFeatures::IsSupported(BMI2), CpuFeatures::IsSupported(LZCNT), |
CpuFeatures::IsSupported(POPCNT), CpuFeatures::IsSupported(ATOM)); |
} |
+ |
+ |
+// ----------------------------------------------------------------------------- |
+// Register constants. |
+ |
+const int |
+ Register::kRegisterCodeByAllocationIndex[kMaxNumAllocatableRegisters] = { |
+ // rax, rbx, rdx, rcx, rsi, rdi, r8, r9, r11, r12, r14, r15 |
+ 0, 3, 2, 1, 6, 7, 8, 9, 11, 12, 14, 15 |
+}; |
+ |
+const int Register::kAllocationIndexByRegisterCode[kNumRegisters] = { |
+ 0, 3, 2, 1, -1, -1, 4, 5, 6, 7, -1, 8, 9, -1, 10, 11 |
+}; |
// ----------------------------------------------------------------------------- |