On 23/01/15 17:15, Jakub Jelinek wrote:
On Fri, Jan 23, 2015 at 08:48:43AM -0800, Mike Stump wrote:
On Jan 23, 2015, at 3:03 AM, Tejas Belagod <tejas.bela...@arm.com> wrote:
This is an almost obvious patch to fix PR64231 as discovered by A. Pinksi and 
as proposed by Jakub.

Kinda crappy code.  The macro to use here should take the number of bits as an 
int, and wether the constant is signed or not.

   FITS (x, 32, UNSIGNED)

Except that the test is testing something different.
First of all, it is closer to FITS (x, 33, SIGNED), but
the details are different, the test as is (except for the bug on 32-bit
hosts) INTVAL (x) is in not in [ -4GB + 33, 4GB - 32 ] interval (inclusive).
Why it isn't exactly "not in [ -4GB, 4GB - 1 ]" or similar.


The value of the offset itself is a heuristic as we cannot accurately say what the distance of a symbol from the ADRP will be at compile time. So it doesn't really matter what the exact value of range is in this case.

Thanks,
Tejas.

Reply via email to