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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef RUNTIME_VM_CONSTANTS_ARM_H_ 5 #ifndef RUNTIME_VM_CONSTANTS_ARM_H_
6 #define RUNTIME_VM_CONSTANTS_ARM_H_ 6 #define RUNTIME_VM_CONSTANTS_ARM_H_
7 7
8 #include "platform/globals.h" 8 #include "platform/globals.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 10
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 R10 = 10, // THR 74 R10 = 10, // THR
75 R11 = 11, // Linux FP 75 R11 = 11, // Linux FP
76 R12 = 12, // IP aka TMP 76 R12 = 12, // IP aka TMP
77 R13 = 13, // SP 77 R13 = 13, // SP
78 R14 = 14, // LR 78 R14 = 14, // LR
79 R15 = 15, // PC 79 R15 = 15, // PC
80 kNumberOfCpuRegisters = 16, 80 kNumberOfCpuRegisters = 16,
81 kNoRegister = -1, // Signals an illegal register. 81 kNoRegister = -1, // Signals an illegal register.
82 82
83 // Aliases. 83 // Aliases.
84 #if defined(TARGET_ABI_IOS) 84 #if defined(TARGET_OS_MACOS) || TARGET_OS_IOS
85 FP = R7, 85 FP = R7,
86 NOTFP = R11, 86 NOTFP = R11,
87 #elif defined(TARGET_ABI_EABI) 87 #else
88 FP = R11, 88 FP = R11,
89 NOTFP = R7, 89 NOTFP = R7,
90 #else
91 #error Unknown ABI
92 #endif 90 #endif
93 IP = R12, 91 IP = R12,
94 SP = R13, 92 SP = R13,
95 LR = R14, 93 LR = R14,
96 PC = R15, 94 PC = R15,
97 }; 95 };
98 96
99 97
100 // Values for single-precision floating point registers. 98 // Values for single-precision floating point registers.
101 enum SRegister { 99 enum SRegister {
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 296
299 297
300 // List of registers used in load/store multiple. 298 // List of registers used in load/store multiple.
301 typedef uint16_t RegList; 299 typedef uint16_t RegList;
302 const RegList kAllCpuRegistersList = 0xFFFF; 300 const RegList kAllCpuRegistersList = 0xFFFF;
303 301
304 302
305 // C++ ABI call registers. 303 // C++ ABI call registers.
306 const RegList kAbiArgumentCpuRegs = 304 const RegList kAbiArgumentCpuRegs =
307 (1 << R0) | (1 << R1) | (1 << R2) | (1 << R3); 305 (1 << R0) | (1 << R1) | (1 << R2) | (1 << R3);
308 #if defined(TARGET_ABI_IOS) 306 #if defined(TARGET_OS_MACOS) || TARGET_OS_IOS
309 const RegList kAbiPreservedCpuRegs = 307 const RegList kAbiPreservedCpuRegs =
310 (1 << R4) | (1 << R5) | (1 << R6) | (1 << R8) | (1 << R10) | (1 << R11); 308 (1 << R4) | (1 << R5) | (1 << R6) | (1 << R8) | (1 << R10) | (1 << R11);
311 const int kAbiPreservedCpuRegCount = 6; 309 const int kAbiPreservedCpuRegCount = 6;
312 #elif defined(TARGET_ABI_EABI) 310 #else
313 const RegList kAbiPreservedCpuRegs = (1 << R4) | (1 << R5) | (1 << R6) | 311 const RegList kAbiPreservedCpuRegs = (1 << R4) | (1 << R5) | (1 << R6) |
314 (1 << R7) | (1 << R8) | (1 << R9) | 312 (1 << R7) | (1 << R8) | (1 << R9) |
315 (1 << R10); 313 (1 << R10);
316 const int kAbiPreservedCpuRegCount = 7; 314 const int kAbiPreservedCpuRegCount = 7;
317 #else
318 #error Unknown ABI
319 #endif 315 #endif
320 const QRegister kAbiFirstPreservedFpuReg = Q4; 316 const QRegister kAbiFirstPreservedFpuReg = Q4;
321 const QRegister kAbiLastPreservedFpuReg = Q7; 317 const QRegister kAbiLastPreservedFpuReg = Q7;
322 const int kAbiPreservedFpuRegCount = 4; 318 const int kAbiPreservedFpuRegCount = 4;
323 319
324 const RegList kReservedCpuRegisters = (1 << SPREG) | (1 << FPREG) | (1 << TMP) | 320 const RegList kReservedCpuRegisters = (1 << SPREG) | (1 << FPREG) | (1 << TMP) |
325 (1 << PP) | (1 << THR) | (1 << PC); 321 (1 << PP) | (1 << THR) | (1 << PC);
326 // CPU registers available to Dart allocator. 322 // CPU registers available to Dart allocator.
327 const RegList kDartAvailableCpuRegs = 323 const RegList kDartAvailableCpuRegs =
328 kAllCpuRegistersList & ~kReservedCpuRegisters; 324 kAllCpuRegistersList & ~kReservedCpuRegisters;
329 // Registers available to Dart that are not preserved by runtime calls. 325 // Registers available to Dart that are not preserved by runtime calls.
330 const RegList kDartVolatileCpuRegs = 326 const RegList kDartVolatileCpuRegs =
331 kDartAvailableCpuRegs & ~kAbiPreservedCpuRegs; 327 kDartAvailableCpuRegs & ~kAbiPreservedCpuRegs;
332 #if defined(TARGET_ABI_IOS) 328 #if defined(TARGET_OS_MACOS) || TARGET_OS_IOS
333 const int kDartVolatileCpuRegCount = 6; 329 const int kDartVolatileCpuRegCount = 6;
334 #elif defined(TARGET_ABI_EABI) 330 #else
335 const int kDartVolatileCpuRegCount = 5; 331 const int kDartVolatileCpuRegCount = 5;
336 #endif 332 #endif
337 const QRegister kDartFirstVolatileFpuReg = Q0; 333 const QRegister kDartFirstVolatileFpuReg = Q0;
338 const QRegister kDartLastVolatileFpuReg = Q3; 334 const QRegister kDartLastVolatileFpuReg = Q3;
339 const int kDartVolatileFpuRegCount = 4; 335 const int kDartVolatileFpuRegCount = 4;
340 336
341 337
342 // Values for the condition field as defined in section A3.2. 338 // Values for the condition field as defined in section A3.2.
343 enum Condition { 339 enum Condition {
344 kNoCondition = -1, 340 kNoCondition = -1,
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } 757 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); }
762 758
763 private: 759 private:
764 DISALLOW_ALLOCATION(); 760 DISALLOW_ALLOCATION();
765 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); 761 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr);
766 }; 762 };
767 763
768 } // namespace dart 764 } // namespace dart
769 765
770 #endif // RUNTIME_VM_CONSTANTS_ARM_H_ 766 #endif // RUNTIME_VM_CONSTANTS_ARM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698