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

Unified Diff: runtime/vm/constants_arm.h

Issue 1421253004: Use the iOS ABI when running SIMARM on Mac or targeting 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
Index: runtime/vm/constants_arm.h
diff --git a/runtime/vm/constants_arm.h b/runtime/vm/constants_arm.h
index 51a6ebcb868d59789119555f2b1bc1e6f2b18cda..4309fdad87cb883a00584bc6ecbfa8ddb1027059 100644
--- a/runtime/vm/constants_arm.h
+++ b/runtime/vm/constants_arm.h
@@ -31,13 +31,13 @@ enum Register {
R2 = 2,
R3 = 3,
R4 = 4,
- R5 = 5,
- R6 = 6,
- R7 = 7,
- R8 = 8, // THR
- R9 = 9, // PP
- R10 = 10, // CTX
- R11 = 11, // FP
+ R5 = 5, // PP
+ R6 = 6, // CTX
+ R7 = 7, // iOS FP
+ R8 = 8,
+ R9 = 9,
+ R10 = 10, // THR
+ R11 = 11, // Linux FP
R12 = 12, // IP aka TMP
R13 = 13, // SP
R14 = 14, // LR
@@ -46,7 +46,13 @@ enum Register {
kNoRegister = -1, // Signals an illegal register.
// Aliases.
- FP = R11,
+#if defined(TARGET_OS_MACOS)
+ FP = R7,
+ R711 = R11,
zra 2015/10/27 20:46:41 NOTFP, or some other non-numeric name, might be a
rmacnak 2015/10/27 21:30:46 Yeah, they're both clunky but at least NOTFP would
+#else
+ FP = R11,
+ R711 = R7,
+#endif
IP = R12,
SP = R13,
LR = R14,
@@ -261,10 +267,17 @@ const RegList kAllCpuRegistersList = 0xFFFF;
// C++ ABI call registers.
const RegList kAbiArgumentCpuRegs =
(1 << R0) | (1 << R1) | (1 << R2) | (1 << R3);
+#if defined(TARGET_OS_MACOS)
+const RegList kAbiPreservedCpuRegs =
+ (1 << R4) | (1 << R5) | (1 << R6) | (1 << R8) |
+ (1 << R10) | (1 << R11);
+const int kAbiPreservedCpuRegCount = 6;
+#else
const RegList kAbiPreservedCpuRegs =
(1 << R4) | (1 << R5) | (1 << R6) | (1 << R7) |
(1 << R8) | (1 << R9) | (1 << R10);
const int kAbiPreservedCpuRegCount = 7;
+#endif
const QRegister kAbiFirstPreservedFpuReg = Q4;
const QRegister kAbiLastPreservedFpuReg = Q7;
const int kAbiPreservedFpuRegCount = 4;
@@ -282,7 +295,11 @@ const RegList kDartAvailableCpuRegs =
// Registers available to Dart that are not preserved by runtime calls.
const RegList kDartVolatileCpuRegs =
kDartAvailableCpuRegs & ~kAbiPreservedCpuRegs;
+#if defined(TARGET_OS_MACOS)
+const int kDartVolatileCpuRegCount = 6;
+#else
const int kDartVolatileCpuRegCount = 5;
+#endif
const QRegister kDartFirstVolatileFpuReg = Q0;
const QRegister kDartLastVolatileFpuReg = Q3;
const int kDartVolatileFpuRegCount = 4;

Powered by Google App Engine
This is Rietveld 408576698