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

Side by Side Diff: src/IceRegistersX8632.h

Issue 1260163003: Subzero. Removes references to %ah. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 4 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/IceRegistersX8632.h - Register information ---*- C++ -*-===// 1 //===- subzero/src/IceRegistersX8632.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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 assert(Reg_GPR_First <= RegNum && RegNum <= Reg_GPR_Last); 81 assert(Reg_GPR_First <= RegNum && RegNum <= Reg_GPR_Last);
82 return GPRRegister(RegNum - Reg_GPR_First); 82 return GPRRegister(RegNum - Reg_GPR_First);
83 } 83 }
84 84
85 static inline XmmRegister getEncodedXmm(int32_t RegNum) { 85 static inline XmmRegister getEncodedXmm(int32_t RegNum) {
86 assert(Reg_XMM_First <= RegNum && RegNum <= Reg_XMM_Last); 86 assert(Reg_XMM_First <= RegNum && RegNum <= Reg_XMM_Last);
87 return XmmRegister(RegNum - Reg_XMM_First); 87 return XmmRegister(RegNum - Reg_XMM_First);
88 } 88 }
89 89
90 static inline ByteRegister getEncodedByteReg(int32_t RegNum) { 90 static inline ByteRegister getEncodedByteReg(int32_t RegNum) {
91 assert(RegNum == Reg_ah || (Reg_GPR_First <= RegNum && RegNum <= Reg_ebx)); 91 assert(Reg_GPR_First <= RegNum && RegNum <= Reg_ebx);
Jim Stichnoth 2015/07/28 15:58:23 I must have missed this before, but now that it's
John 2015/07/28 18:21:16 Nothing that a simple :%s/assert(\([^&]\+\) && \(
92 if (RegNum == Reg_ah)
93 return Encoded_Reg_ah;
94 return ByteRegister(RegNum - Reg_GPR_First); 92 return ByteRegister(RegNum - Reg_GPR_First);
95 } 93 }
96 94
97 static inline GPRRegister getEncodedByteRegOrGPR(Type Ty, int32_t RegNum) { 95 static inline GPRRegister getEncodedByteRegOrGPR(Type Ty, int32_t RegNum) {
98 if (isByteSizedType(Ty)) 96 if (isByteSizedType(Ty))
99 return GPRRegister(getEncodedByteReg(RegNum)); 97 return GPRRegister(getEncodedByteReg(RegNum));
100 else 98 else
101 return getEncodedGPR(RegNum); 99 return getEncodedGPR(RegNum);
102 } 100 }
103 101
104 static inline X87STRegister getEncodedSTReg(int32_t RegNum) { 102 static inline X87STRegister getEncodedSTReg(int32_t RegNum) {
105 assert(Encoded_X87ST_First <= RegNum && RegNum <= Encoded_X87ST_Last); 103 assert(Encoded_X87ST_First <= RegNum && RegNum <= Encoded_X87ST_Last);
106 return X87STRegister(RegNum); 104 return X87STRegister(RegNum);
107 } 105 }
108 }; 106 };
109 107
110 } // end of namespace Ice 108 } // end of namespace Ice
111 109
112 #endif // SUBZERO_SRC_ICEREGISTERSX8632_H 110 #endif // SUBZERO_SRC_ICEREGISTERSX8632_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698