Hi,
This is an almost obvious patch to fix PR64231 as discovered by A.
Pinksi and as proposed by Jakub.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64231
Regressions happy. OK to commit?
Thanks,
Tejas.
ChangeLog:
gcc/
2015-01-23 Tejas Belagod <tejas.bela...@arm.com>
Andrew Pinski <pins...@gcc.gnu.org>
Jakub Jelinek <ja...@gcc.gnu.org>
PR target/64231
* config/aarch64/aarch64.c (aarch64_classify_symbol): Fix large
integer typing for small model. Use IN_RANGE.
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index dd49fcd..b790bc6 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -7083,8 +7083,8 @@ aarch64_classify_symbol (rtx x, rtx offset,
/* Same reasoning as the tiny code model, but the offset cap here is
4G. */
if (SYMBOL_REF_WEAK (x)
- || INTVAL (offset) < (HOST_WIDE_INT) -4294967263
- || INTVAL (offset) > (HOST_WIDE_INT) 4294967264)
+ || !IN_RANGE (INTVAL (offset), HOST_WIDE_INT_C (-4294967263),
+ HOST_WIDE_INT_C (4294967264)))
return SYMBOL_FORCE_TO_MEM;
return SYMBOL_SMALL_ABSOLUTE;