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

Unified Diff: src/IceInstX86Base.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/IceInstX8664.cpp ('k') | src/IceInstX86BaseImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInstX86Base.h
diff --git a/src/IceInstX86Base.h b/src/IceInstX86Base.h
index 5cfdfa6ee6ce18db7f784eda4e6e95695ea515cf..42e1558e2dba170b7ddc31241f04015fb9ac46f7 100644
--- a/src/IceInstX86Base.h
+++ b/src/IceInstX86Base.h
@@ -499,15 +499,15 @@ template <typename TraitsType> struct InstImpl {
const Operand *Src2Op,
const GPREmitterShiftD &Emitter);
- template <typename DReg_t, typename SReg_t, DReg_t (*destEnc)(int32_t),
- SReg_t (*srcEnc)(int32_t)>
+ template <typename DReg_t, typename SReg_t, DReg_t (*destEnc)(RegNumT),
+ SReg_t (*srcEnc)(RegNumT)>
static void emitIASCastRegOp(const Cfg *Func, Type DestTy,
const Variable *Dest, Type SrcTy,
const Operand *Src,
const CastEmitterRegOp<DReg_t, SReg_t> &Emitter);
- template <typename DReg_t, typename SReg_t, DReg_t (*destEnc)(int32_t),
- SReg_t (*srcEnc)(int32_t)>
+ template <typename DReg_t, typename SReg_t, DReg_t (*destEnc)(RegNumT),
+ SReg_t (*srcEnc)(RegNumT)>
static void
emitIASThreeOpImmOps(const Cfg *Func, Type DispatchTy, const Variable *Dest,
const Operand *Src0, const Operand *Src1,
@@ -1045,8 +1045,8 @@ template <typename TraitsType> struct InstImpl {
// mov ch, ebp ==> not redundant due to different base registers
// mov ecx, ecx ==> redundant, and dangerous in x86-64. i64 zexting
// is handled by Inst86Zext.
- const int32_t SrcReg = SrcVar->getRegNum();
- const int32_t DestReg = this->Dest->getRegNum();
+ const auto SrcReg = SrcVar->getRegNum();
+ const auto DestReg = this->Dest->getRegNum();
return (Traits::getEncoding(SrcReg) ==
Traits::getEncoding(DestReg)) &&
(Traits::getBaseReg(SrcReg) == Traits::getBaseReg(DestReg));
« no previous file with comments | « src/IceInstX8664.cpp ('k') | src/IceInstX86BaseImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698