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

Unified Diff: src/IceRegistersMIPS32.h

Issue 1676123002: Subzero: Use a proper RegNumT type instead of int32_t/SizeT. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Make it possible to do "auto NewReg = RegNumT::NoRegister;" Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceRegistersARM32.h ('k') | src/IceRegistersX8632.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceRegistersMIPS32.h
diff --git a/src/IceRegistersMIPS32.h b/src/IceRegistersMIPS32.h
index 89c4d8925da229eb9bfb6bb07674f9fe53c38068..a7072841ed14e9c92964c8cb36cc108b260219f5 100644
--- a/src/IceRegistersMIPS32.h
+++ b/src/IceRegistersMIPS32.h
@@ -53,12 +53,13 @@ enum GPRRegister {
// TODO(jvoung): Floating point and vector registers...
// Need to model overlap and difference in encoding too.
-static inline GPRRegister getEncodedGPR(int32_t RegNum) {
- assert(Reg_GPR_First <= RegNum && RegNum <= Reg_GPR_Last);
+static inline GPRRegister getEncodedGPR(RegNumT RegNum) {
+ assert(int(Reg_GPR_First) <= int(RegNum));
+ assert(unsigned(RegNum) <= Reg_GPR_Last);
return GPRRegister(RegNum - Reg_GPR_First);
}
-const char *getRegName(int32_t RegNum);
+const char *getRegName(RegNumT RegNum);
} // end of namespace RegMIPS32
« no previous file with comments | « src/IceRegistersARM32.h ('k') | src/IceRegistersX8632.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698