1 /*
2  * Copyright (C) 2011 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_X86_64_REGISTERS_X86_64_H_
18 #define ART_RUNTIME_ARCH_X86_64_REGISTERS_X86_64_H_
19 
20 #include <iosfwd>
21 
22 #include "base/macros.h"
23 
24 namespace art {
25 namespace x86_64 {
26 
27 enum Register {
28   RAX = 0,
29   RCX = 1,
30   RDX = 2,
31   RBX = 3,
32   RSP = 4,
33   RBP = 5,
34   RSI = 6,
35   RDI = 7,
36   R8  = 8,
37   R9  = 9,
38   R10 = 10,
39   R11 = 11,
40   R12 = 12,
41   R13 = 13,
42   R14 = 14,
43   R15 = 15,
44   kLastCpuRegister = 15,
45   kNumberOfCpuRegisters = 16,
46   kNoRegister = -1  // Signals an illegal register.
47 };
48 std::ostream& operator<<(std::ostream& os, const Register& rhs);
49 
50 enum FloatRegister {
51   XMM0 = 0,
52   XMM1 = 1,
53   XMM2 = 2,
54   XMM3 = 3,
55   XMM4 = 4,
56   XMM5 = 5,
57   XMM6 = 6,
58   XMM7 = 7,
59   XMM8 = 8,
60   XMM9 = 9,
61   XMM10 = 10,
62   XMM11 = 11,
63   XMM12 = 12,
64   XMM13 = 13,
65   XMM14 = 14,
66   XMM15 = 15,
67   kNumberOfFloatRegisters = 16
68 };
69 std::ostream& operator<<(std::ostream& os, const FloatRegister& rhs);
70 
71 }  // namespace x86_64
72 }  // namespace art
73 
74 #endif  // ART_RUNTIME_ARCH_X86_64_REGISTERS_X86_64_H_
75