Symbol classification logic intended to force symbols to memory in large memory model is triggering in appropriately for all memory models, this results in an unnecessary level of indirection in generated code.

Regressed aarch64-none-elf, committed.

/Marcus

2014-01-30  Marcus Shawcroft  <marcus.shawcr...@arm.com>

        * config/aarch64/aarch64.c (aarch64_classify_symbol): Fix logic
        for SYMBOL_REF in large memory model.
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index d3c5cbc..16c51a8 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -5400,9 +5400,8 @@ aarch64_classify_symbol (rtx x,
 
   if (GET_CODE (x) == SYMBOL_REF)
     {
-      if (aarch64_cmodel == AARCH64_CMODEL_LARGE
-	  || CONSTANT_POOL_ADDRESS_P (x))
-	return SYMBOL_FORCE_TO_MEM;
+      if (aarch64_cmodel == AARCH64_CMODEL_LARGE)
+	  return SYMBOL_FORCE_TO_MEM;
 
       if (aarch64_tls_symbol_p (x))
 	return aarch64_classify_tls_symbol (x);

Reply via email to