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

Unified Diff: runtime/vm/constants_ia32.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_arm64.h ('k') | runtime/vm/constants_mips.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/constants_ia32.h
diff --git a/runtime/vm/constants_ia32.h b/runtime/vm/constants_ia32.h
index 0950639ad51355cb4de4596c8b2ed5ae7a944ebb..466dd42b520519fdadad76a36bb501094dc5c396 100644
--- a/runtime/vm/constants_ia32.h
+++ b/runtime/vm/constants_ia32.h
@@ -10,7 +10,6 @@
namespace dart {
enum Register {
- kFirstFreeCpuRegister = 0,
EAX = 0,
ECX = 1,
EDX = 2,
@@ -19,9 +18,8 @@ enum Register {
EBP = 5,
ESI = 6,
EDI = 7,
- kLastFreeCpuRegister = 7,
kNumberOfCpuRegisters = 8,
- kNoRegister = -1 // Signals an illegal register.
+ kNoRegister = -1, // Signals an illegal register.
};
@@ -71,6 +69,7 @@ const Register ICREG = ECX; // IC data register.
const Register ARGS_DESC_REG = EDX; // Arguments descriptor register.
const Register THR = ESI; // 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 = EAX;
@@ -80,6 +79,18 @@ const Register kExceptionObjectReg = EAX;
const Register kStackTraceObjectReg = EDX;
+typedef uint32_t RegList;
+const RegList kAllCpuRegistersList = 0xFF;
+
+const intptr_t kReservedCpuRegisters =
+ (1 << SPREG) |
+ (1 << FPREG) |
+ (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_arm64.h ('k') | runtime/vm/constants_mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698