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

Unified Diff: runtime/vm/constants_arm.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 | « no previous file | runtime/vm/constants_arm64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/constants_arm.h
diff --git a/runtime/vm/constants_arm.h b/runtime/vm/constants_arm.h
index 9bd7640420154962f51ff713513548ccfa9753da..4a9ff3972892789d5ec63562ac92cc531286d143 100644
--- a/runtime/vm/constants_arm.h
+++ b/runtime/vm/constants_arm.h
@@ -26,8 +26,6 @@ namespace dart {
enum Register {
- kNoRegister = -1,
- kFirstFreeCpuRegister = 0,
R0 = 0,
R1 = 1,
R2 = 2,
@@ -36,21 +34,23 @@ enum Register {
R5 = 5,
R6 = 6,
R7 = 7,
- R8 = 8,
- R9 = 9,
- R10 = 10,
- R11 = 11,
- R12 = 12,
- R13 = 13,
- R14 = 14,
- kLastFreeCpuRegister = 14,
- R15 = 15,
+ R8 = 8, // THR
+ R9 = 9, // PP
+ R10 = 10, // CTX
+ R11 = 11, // FP
+ R12 = 12, // IP aka TMP
+ R13 = 13, // SP
+ R14 = 14, // LR
+ R15 = 15, // PC
+ kNumberOfCpuRegisters = 16,
+ kNoRegister = -1, // Signals an illegal register.
+
+ // Aliases.
FP = R11,
IP = R12,
SP = R13,
LR = R14,
PC = R15,
- kNumberOfCpuRegisters = 16,
};
@@ -269,12 +269,16 @@ const QRegister kAbiFirstPreservedFpuReg = Q4;
const QRegister kAbiLastPreservedFpuReg = Q7;
const int kAbiPreservedFpuRegCount = 4;
+const RegList kReservedCpuRegisters =
+ (1 << SPREG) |
+ (1 << FPREG) |
+ (1 << TMP) |
+ (1 << PP) |
+ (1 << THR) |
+ (1 << PC);
// CPU registers available to Dart allocator.
const RegList kDartAvailableCpuRegs =
- (1 << R0) | (1 << R1) | (1 << R2) | (1 << R3) |
- (1 << R4) | (1 << R5) | (1 << R6) | (1 << R7) |
- (1 << R8) | (1 << R14);
-
+ kAllCpuRegistersList & ~kReservedCpuRegisters;
// Registers available to Dart that are not preserved by runtime calls.
const RegList kDartVolatileCpuRegs =
kDartAvailableCpuRegs & ~kAbiPreservedCpuRegs;
« no previous file with comments | « no previous file | runtime/vm/constants_arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698