[llvm-commits] [PATCH] fix #13035 (Thumb LDRD/STRD with negative #0 offset is decoded as a positive #0 offset)
Jiangning Liu
jiangning.liu at arm.com
Wed Aug 1 09:27:28 PDT 2012
> -----Original Message-----
> From: rengolin at gmail.com [mailto:rengolin at gmail.com] On Behalf Of Renato
> Golin
> Sent: Thursday, August 02, 2012 12:09 AM
> To: Jiangning Liu
> Cc: llvm-commits at cs.uiuc.edu
> Subject: Re: [llvm-commits] [PATCH] fix #13035 (Thumb LDRD/STRD with
> negative #0 offset is decoded as a positive #0 offset)
>
> On 1 August 2012 16:12, Jiangning Liu <jiangning.liu at arm.com> wrote:
> > Hi,
> >
> > The patch is fix http://llvm.org/bugs/show_bug.cgi?id=13035, and the
> > solution is to use INT32_MIN to describe #-0.
>
> Hi Jiangning,
>
> In DecodeT2Imm8S4():
>
> + if (Val == 0)
> + Inst.addOperand(MCOperand::CreateImm(INT32_MIN));
>
> If 0 is the representation of #-0, what is the representation of #0?
Renato,
#0 is 0x100, because bit 'U' needs to be set for add operation in this
instruction.
ARM ARM says, add = (U == '1');
Thanks,
-Jiangning
>
> Otherwise, looks good.
>
> --
> cheers,
> --renato
>
> http://systemcall.org/
More information about the llvm-commits
mailing list