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

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: Fix int32_t ==> int for the result of BitVector find_first() and find_next() 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
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));
Eric Holk 2016/02/08 19:37:10 Again, is this the sort of place fixme should be u
Jim Stichnoth 2016/02/09 19:33:39 This would be especially hard to represent in RegN
Eric Holk 2016/02/10 01:11:30 That makes sense.
+ 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

Powered by Google App Engine
This is Rietveld 408576698