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

Unified Diff: runtime/vm/constants_x64.h

Issue 1417433002: Don't touch x18 on ARM64 - it is globally reserved on iOS. (Closed) Base URL: git@github.com:dart-lang/sdk.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 | « runtime/vm/constants_mips.h ('k') | runtime/vm/disassembler_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/constants_x64.h
diff --git a/runtime/vm/constants_x64.h b/runtime/vm/constants_x64.h
index c2b48c56cab5b89b08ad3ae8eef6c0ef4765ffbd..9c92faa5d030af33954b91ee4b929e957dfb0385 100644
--- a/runtime/vm/constants_x64.h
+++ b/runtime/vm/constants_x64.h
@@ -8,7 +8,6 @@
namespace dart {
enum Register {
- kFirstFreeCpuRegister = 0,
RAX = 0,
RCX = 1,
RDX = 2,
@@ -25,9 +24,8 @@ enum Register {
R13 = 13,
R14 = 14,
R15 = 15,
- kLastFreeCpuRegister = 15,
kNumberOfCpuRegisters = 16,
- kNoRegister = -1 // Signals an illegal register.
+ kNoRegister = -1, // Signals an illegal register.
};
@@ -96,6 +94,7 @@ const Register ARGS_DESC_REG = R10; // Arguments descriptor register.
const Register CODE_REG = R12;
const Register THR = R14; // Caches current thread in generated code.
+
// Exception object is passed in this register to the catch handlers when an
// exception is thrown.
const Register kExceptionObjectReg = RAX;
@@ -105,6 +104,20 @@ const Register kExceptionObjectReg = RAX;
const Register kStackTraceObjectReg = RDX;
+typedef uint32_t RegList;
+const RegList kAllCpuRegistersList = 0xFFFF;
+
+const RegList kReservedCpuRegisters =
+ (1 << SPREG) |
+ (1 << FPREG) |
+ (1 << TMP) |
+ (1 << PP) |
+ (1 << THR);
+// CPU registers available to Dart allocator.
+const RegList kDartAvailableCpuRegs =
+ kAllCpuRegistersList & ~kReservedCpuRegisters;
+
+
enum ScaleFactor {
TIMES_1 = 0,
TIMES_2 = 1,
« no previous file with comments | « runtime/vm/constants_mips.h ('k') | runtime/vm/disassembler_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698