[PATCH] Fix signed overflow in encoder for ARM adr instruction

Mihail Popa mihail.popa at gmail.com
Tue Aug 13 06:37:46 PDT 2013


This cast:



On Tue, Aug 13, 2013 at 2:14 PM, Renato Golin <renato.golin at linaro.org>wrote:

> On 13 August 2013 10:05, Mihail Popa <mihail.popa at gmail.com> wrote:
>
>> As such it is possible to add or subtract a 32-bit unsigned number.
>>
>
> But, immediate values are up to 12-bits long, why is 32-bit not enough?
>
>
> The cast to int32_t is undefined and triggers incorrect encoding. Keeping
>> the original
>> int64_t type is safe, as all subsequent casts are to uint32_t.
>>
>
> Which cast?
>
> I could be wrong, but this sounds like you're fixing a problem in the
> wrong place...
>
> cheers,
> --renato
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130813/c51e55eb/attachment.html>


More information about the llvm-commits mailing list