[PATCH] [clang][MIPS] Removing __SIZEOF_INT128__ macro for MIPS64
Sagar.Thakur at imgtec.com
Thu Dec 4 00:33:28 PST 2014
Comment at: lib/Frontend/InitPreprocessor.cpp:665
@@ -664,2 +664,3 @@
TI.getTypeWidth(TI.getWIntType()), TI, Builder);
- if (TI.hasInt128Type())
+ if (TI.hasInt128Type() && !(TI.getTriple().getArch() == llvm::Triple::mips64el
+ || TI.getTriple().getArch() == llvm::Triple::mips64))
> atanasyan wrote:
> > sagar wrote:
> > > atanasyan wrote:
> > > > sagar wrote:
> > > > > atanasyan wrote:
> > > > > > I would add a comment describes that it is a temporary workaround while MIPS has no fully supported 128-bit integers and we do not want to get an error from limit.h.
> > > > > Hi @atanasyan,
> > > > >
> > > > > Should I add a comment and submit a new patch ?
> > > > I think it is not necessary now, because this patch has been committed already.
> > > Hi @atanasyan,
> > >
> > > I don't see this patch commited in the clang repository ?
> > My bad, I interpreted your question incorrectly. Add the comment to the patch and commit it. It is not necessary to send the patch for review again.
> Wait, why not just override Mips64TargetInfoBase:: hasInt128Type to be false?
@majnemer : When we override Mips64TargetInfoBase:: hasInt128Type to be false, we get an error message "int128 is not supported on this target" from standard header files like limits.h because these files are using `__int128` type and suffix i128. Here, we only want to remove `__SIZEOF_INT128__` macro for mips64 and misp64el because 128-bit operations are not yet supported on MIPS64. This change is temporary, until we implement 128-bit operations for MIPS64.
More information about the cfe-commits