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

Unified Diff: src/IceRegistersX8632.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/IceRegistersX8632.h
diff --git a/src/IceRegistersX8632.h b/src/IceRegistersX8632.h
index 5d71aa70a7612564922d319ae6eb4f906645b23c..bb614e0c905bff72733a57d42778aed2272e82ff 100644
--- a/src/IceRegistersX8632.h
+++ b/src/IceRegistersX8632.h
@@ -80,10 +80,10 @@ public:
Encoded_Not_X87STReg = -1
};
- static inline X87STRegister getEncodedSTReg(int32_t RegNum) {
- assert(Encoded_X87ST_First <= RegNum);
- assert(RegNum <= Encoded_X87ST_Last);
- return X87STRegister(RegNum);
+ static inline X87STRegister getEncodedSTReg(uint32_t X87RegNum) {
+ assert(int(Encoded_X87ST_First) <= int(X87RegNum));
Eric Holk 2016/02/08 19:37:10 Why cast both of these to int? Where they both uns
Jim Stichnoth 2016/02/09 19:33:39 The int() cast is because otherwise g++ warns that
Eric Holk 2016/02/10 01:11:30 Ah, okay. That makes sense.
+ assert(X87RegNum <= Encoded_X87ST_Last);
+ return X87STRegister(X87RegNum);
}
};

Powered by Google App Engine
This is Rietveld 408576698