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

Side by Side Diff: src/IceRegistersMIPS32.h

Issue 2316933002: [SubZero] Implement GP to/from FP moves for MIPS (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rebase to master Created 4 years, 3 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
« no previous file with comments | « src/IceInstMIPS32.cpp ('k') | src/IceTargetLoweringMIPS32.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // TODO(jvoung): Floating point and vector registers... 65 // TODO(jvoung): Floating point and vector registers...
66 // Need to model overlap and difference in encoding too. 66 // Need to model overlap and difference in encoding too.
67 67
68 static inline GPRRegister getEncodedGPR(RegNumT RegNum) { 68 static inline GPRRegister getEncodedGPR(RegNumT RegNum) {
69 assert(int(Reg_GPR_First) <= int(RegNum)); 69 assert(int(Reg_GPR_First) <= int(RegNum));
70 assert(unsigned(RegNum) <= Reg_GPR_Last); 70 assert(unsigned(RegNum) <= Reg_GPR_Last);
71 return GPRRegister(RegNum - Reg_GPR_First); 71 return GPRRegister(RegNum - Reg_GPR_First);
72 } 72 }
73 73
74 static inline bool isGPRReg(RegNumT RegNum) { 74 static inline bool isGPRReg(RegNumT RegNum) {
75 return (int(Reg_GPR_First) <= int(RegNum)) && 75 bool IsGPR = ((int(Reg_GPR_First) <= int(RegNum)) &&
76 (unsigned(RegNum) <= Reg_GPR_Last); 76 (unsigned(RegNum) <= Reg_GPR_Last)) ||
77 ((int(Reg_I64PAIR_First) <= int(RegNum)) &&
78 (unsigned(RegNum) <= Reg_I64PAIR_Last));
79 return IsGPR;
77 } 80 }
78 81
79 static inline FPRRegister getEncodedFPR(RegNumT RegNum) { 82 static inline FPRRegister getEncodedFPR(RegNumT RegNum) {
80 assert(int(Reg_FPR_First) <= int(RegNum)); 83 assert(int(Reg_FPR_First) <= int(RegNum));
81 assert(unsigned(RegNum) <= Reg_FPR_Last); 84 assert(unsigned(RegNum) <= Reg_FPR_Last);
82 return FPRRegister(RegNum - Reg_FPR_First); 85 return FPRRegister(RegNum - Reg_FPR_First);
83 } 86 }
84 87
85 static inline bool isFPRReg(RegNumT RegNum) { 88 static inline bool isFPRReg(RegNumT RegNum) {
86 return (int(Reg_FPR_First) <= int(RegNum)) && 89 return (int(Reg_FPR_First) <= int(RegNum)) &&
(...skipping 30 matching lines...) Expand all
117 120
118 } // end of namespace RegMIPS32 121 } // end of namespace RegMIPS32
119 122
120 // Extend enum RegClass with MIPS32-specific register classes (if any). 123 // Extend enum RegClass with MIPS32-specific register classes (if any).
121 enum RegClassMIPS32 : uint8_t { RCMIPS32_NUM = RC_Target }; 124 enum RegClassMIPS32 : uint8_t { RCMIPS32_NUM = RC_Target };
122 125
123 } // end of namespace MIPS32 126 } // end of namespace MIPS32
124 } // end of namespace Ice 127 } // end of namespace Ice
125 128
126 #endif // SUBZERO_SRC_ICEREGISTERSMIPS32_H 129 #endif // SUBZERO_SRC_ICEREGISTERSMIPS32_H
OLDNEW
« no previous file with comments | « src/IceInstMIPS32.cpp ('k') | src/IceTargetLoweringMIPS32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698