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

Unified Diff: src/IceRegistersX8632.h

Issue 595093002: Handle "inplace" ops and unary ops w/ assembler (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: format Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceInstX8632.cpp ('k') | src/assembler_ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceRegistersX8632.h
diff --git a/src/IceRegistersX8632.h b/src/IceRegistersX8632.h
index 3aa8178df8dff011a194d915a0b8f973eda194e3..cbbcfc93044efe0b4b2f49a0756935f99a32da29 100644
--- a/src/IceRegistersX8632.h
+++ b/src/IceRegistersX8632.h
@@ -16,6 +16,7 @@
#include "IceDefs.h"
#include "IceInstX8632.def"
+#include "IceTypes.h"
namespace Ice {
@@ -83,6 +84,13 @@ static inline ByteRegister getEncodedByteReg(int32_t RegNum) {
return ByteRegister(RegNum - Reg_GPR_First);
}
+static inline GPRRegister getEncodedByteRegOrGPR(Type Ty, int32_t RegNum) {
+ if (Ty == IceType_i8 || Ty == IceType_i1)
+ return GPRRegister(getEncodedByteReg(RegNum));
+ else
+ return getEncodedGPR(RegNum);
+}
+
} // end of namespace RegX8632
} // end of namespace Ice
« no previous file with comments | « src/IceInstX8632.cpp ('k') | src/assembler_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698