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

Unified Diff: runtime/vm/constants_arm.h

Issue 2757783003: Set TARGET_OS_* from GN, falling back to HOST_OS_*. (Closed)
Patch Set: . Created 3 years, 9 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 c4213ad0451be3fed5374203ab35cb6ace34eb9b..224f0f6839c2766fd3c2df3a3dc88f0687868b58 100644
--- a/runtime/vm/constants_arm.h
+++ b/runtime/vm/constants_arm.h
@@ -81,14 +81,12 @@ enum Register {
kNoRegister = -1, // Signals an illegal register.
// Aliases.
-#if defined(TARGET_ABI_IOS)
+#if defined(TARGET_OS_MACOS) || TARGET_OS_IOS
FP = R7,
NOTFP = R11,
-#elif defined(TARGET_ABI_EABI)
+#else
FP = R11,
NOTFP = R7,
-#else
-#error Unknown ABI
#endif
IP = R12,
SP = R13,
@@ -305,17 +303,15 @@ const RegList kAllCpuRegistersList = 0xFFFF;
// C++ ABI call registers.
const RegList kAbiArgumentCpuRegs =
(1 << R0) | (1 << R1) | (1 << R2) | (1 << R3);
-#if defined(TARGET_ABI_IOS)
+#if defined(TARGET_OS_MACOS) || TARGET_OS_IOS
const RegList kAbiPreservedCpuRegs =
(1 << R4) | (1 << R5) | (1 << R6) | (1 << R8) | (1 << R10) | (1 << R11);
const int kAbiPreservedCpuRegCount = 6;
-#elif defined(TARGET_ABI_EABI)
+#else
const RegList kAbiPreservedCpuRegs = (1 << R4) | (1 << R5) | (1 << R6) |
(1 << R7) | (1 << R8) | (1 << R9) |
(1 << R10);
const int kAbiPreservedCpuRegCount = 7;
-#else
-#error Unknown ABI
#endif
const QRegister kAbiFirstPreservedFpuReg = Q4;
const QRegister kAbiLastPreservedFpuReg = Q7;
@@ -329,9 +325,9 @@ const RegList kDartAvailableCpuRegs =
// Registers available to Dart that are not preserved by runtime calls.
const RegList kDartVolatileCpuRegs =
kDartAvailableCpuRegs & ~kAbiPreservedCpuRegs;
-#if defined(TARGET_ABI_IOS)
+#if defined(TARGET_OS_MACOS) || TARGET_OS_IOS
const int kDartVolatileCpuRegCount = 6;
-#elif defined(TARGET_ABI_EABI)
+#else
const int kDartVolatileCpuRegCount = 5;
#endif
const QRegister kDartFirstVolatileFpuReg = Q0;

Powered by Google App Engine
This is Rietveld 408576698