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

Renato Golin renato.golin at linaro.org
Tue Aug 13 06:14:28 PDT 2013


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/ac158ec9/attachment.html>


More information about the llvm-commits mailing list