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

Side by Side Diff: src/IceRegistersMIPS32.h

Issue 1548363002: Subzero. Code organization. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 11 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 //===- subzero/src/IceRegistersMIPS32.h - Register information --*- C++ -*-===// 1 //===- subzero/src/IceRegistersMIPS32.h - Register information --*- C++ -*-===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
11 /// \brief Declares the registers and their encodings for MIPS32. 11 /// \brief Declares the registers and their encodings for MIPS32.
12 /// 12 ///
13 //===----------------------------------------------------------------------===// 13 //===----------------------------------------------------------------------===//
14 14
15 #ifndef SUBZERO_SRC_ICEREGISTERSMIPS32_H 15 #ifndef SUBZERO_SRC_ICEREGISTERSMIPS32_H
16 #define SUBZERO_SRC_ICEREGISTERSMIPS32_H 16 #define SUBZERO_SRC_ICEREGISTERSMIPS32_H
17 17
18 #include "IceDefs.h" 18 #include "IceDefs.h"
19 #include "IceInstMIPS32.def" 19 #include "IceInstMIPS32.def"
20 #include "IceOperand.h" // RC_Target 20 #include "IceOperand.h" // RC_Target
21 #include "IceTypes.h" 21 #include "IceTypes.h"
22 22
23 namespace Ice { 23 namespace Ice {
24 24 namespace MIPS32 {
25 namespace RegMIPS32 { 25 namespace RegMIPS32 {
26 26
27 /// An enum of every register. The enum value may not match the encoding 27 /// An enum of every register. The enum value may not match the encoding
28 /// used to binary encode register operands in instructions. 28 /// used to binary encode register operands in instructions.
29 enum AllRegisters { 29 enum AllRegisters {
30 #define X(val, encode, name, scratch, preserved, stackptr, frameptr, isInt, \ 30 #define X(val, encode, name, scratch, preserved, stackptr, frameptr, isInt, \
31 isI64Pair, isFP32, isFP64, isVec128, alias_init) \ 31 isI64Pair, isFP32, isFP64, isVec128, alias_init) \
32 val, 32 val,
33 REGMIPS32_TABLE 33 REGMIPS32_TABLE
34 #undef X 34 #undef X
(...skipping 21 matching lines...) Expand all
56 static inline GPRRegister getEncodedGPR(int32_t RegNum) { 56 static inline GPRRegister getEncodedGPR(int32_t RegNum) {
57 assert(Reg_GPR_First <= RegNum && RegNum <= Reg_GPR_Last); 57 assert(Reg_GPR_First <= RegNum && RegNum <= Reg_GPR_Last);
58 return GPRRegister(RegNum - Reg_GPR_First); 58 return GPRRegister(RegNum - Reg_GPR_First);
59 } 59 }
60 60
61 } // end of namespace RegMIPS32 61 } // end of namespace RegMIPS32
62 62
63 // Extend enum RegClass with MIPS32-specific register classes (if any). 63 // Extend enum RegClass with MIPS32-specific register classes (if any).
64 enum RegClassMIPS32 : uint8_t { RCMIPS32_NUM = RC_Target }; 64 enum RegClassMIPS32 : uint8_t { RCMIPS32_NUM = RC_Target };
65 65
66 } // end of namespace MIPS32
66 } // end of namespace Ice 67 } // end of namespace Ice
67 68
68 #endif // SUBZERO_SRC_ICEREGISTERSMIPS32_H 69 #endif // SUBZERO_SRC_ICEREGISTERSMIPS32_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698