1 /*
2  * Copyright (C) 2009 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef ART_RUNTIME_ARCH_ARM_REGISTERS_ARM_H_
18 #define ART_RUNTIME_ARCH_ARM_REGISTERS_ARM_H_
19 
20 #include <iosfwd>
21 
22 #include "base/macros.h"
23 
24 namespace art HIDDEN {
25 namespace arm {
26 
27 // Values for registers.
28 enum Register {
29   R0  =  0,
30   R1  =  1,
31   R2  =  2,
32   R3  =  3,
33   R4  =  4,
34   R5  =  5,
35   R6  =  6,
36   R7  =  7,
37   R8  =  8,
38   R9  =  9,
39   R10 = 10,
40   R11 = 11,
41   R12 = 12,
42   R13 = 13,
43   R14 = 14,
44   R15 = 15,
45   MR  = 8,  // ART Marking Register
46   TR  = 9,  // ART Thread Register
47   FP  = 11,
48   IP  = 12,
49   SP  = 13,
50   LR  = 14,
51   PC  = 15,
52   kNumberOfCoreRegisters = 16,
53   kNoRegister = -1,
54 };
55 std::ostream& operator<<(std::ostream& os, const Register& rhs);
56 
57 
58 // Values for single-precision floating point registers.
59 enum SRegister {
60   S0  =  0,
61   S1  =  1,
62   S2  =  2,
63   S3  =  3,
64   S4  =  4,
65   S5  =  5,
66   S6  =  6,
67   S7  =  7,
68   S8  =  8,
69   S9  =  9,
70   S10 = 10,
71   S11 = 11,
72   S12 = 12,
73   S13 = 13,
74   S14 = 14,
75   S15 = 15,
76   S16 = 16,
77   S17 = 17,
78   S18 = 18,
79   S19 = 19,
80   S20 = 20,
81   S21 = 21,
82   S22 = 22,
83   S23 = 23,
84   S24 = 24,
85   S25 = 25,
86   S26 = 26,
87   S27 = 27,
88   S28 = 28,
89   S29 = 29,
90   S30 = 30,
91   S31 = 31,
92   kNumberOfSRegisters = 32,
93   kNoSRegister = -1,
94 };
95 std::ostream& operator<<(std::ostream& os, const SRegister& rhs);
96 
97 }  // namespace arm
98 }  // namespace art
99 
100 #endif  // ART_RUNTIME_ARCH_ARM_REGISTERS_ARM_H_
101