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