[llvm] r245220 - Correcting a -Woverflow warning where 0xFFFF was overflowing an implicit constant conversion.
Daniel Sanders via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 18 02:00:24 PDT 2015
Hmm. I thought I'd fixed that by making emitRI take an int32_t but that's not in the current source. I'm not sure what's happened there but I'll double check the other review nits I fixed ended up in the commit.
Thanks for fixing the warning.
> -----Original Message-----
> From: llvm-commits [mailto:llvm-commits-bounces at lists.llvm.org] On Behalf
> Of Aaron Ballman via llvm-commits
> Sent: 17 August 2015 15:26
> To: llvm-commits at lists.llvm.org
> Subject: [llvm] r245220 - Correcting a -Woverflow warning where 0xFFFF was
> overflowing an implicit constant conversion.
>
> Author: aaronballman
> Date: Mon Aug 17 09:25:57 2015
> New Revision: 245220
>
> URL: http://llvm.org/viewvc/llvm-project?rev=245220&view=rev
> Log:
> Correcting a -Woverflow warning where 0xFFFF was overflowing an implicit
> constant conversion.
>
> Modified:
> llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
>
> Modified: llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp?rev=24
> 5220&r1=245219&r2=245220&view=diff
> ==========================================================
> ====================
> --- llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp (original)
> +++ llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp Mon Aug 17
> 09:25:57 2015
> @@ -1934,7 +1934,7 @@ bool MipsAsmParser::loadImmediate(int64_
> // Traditional behaviour seems to special case this particular value. It's
> // not clear why other masks are handled differently.
> if (ImmValue == 0xffffffff) {
> - emitRI(Mips::LUi, TmpReg, 0xffff, IDLoc, Instructions);
> + emitRI(Mips::LUi, TmpReg, -1, IDLoc, Instructions);
> emitRRI(Mips::DSRL32, TmpReg, TmpReg, 0, IDLoc, Instructions);
> if (UseSrcReg)
> emitRRR(AdduOp, DstReg, TmpReg, SrcReg, IDLoc, Instructions);
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list