The existing aarch64 implementation of REGNO_REGCLASS classifies the soft frame and arg registers as CORE_REGS. However either could be eliminated against FP or SP, in case of the latter CORE_REGS is too narrow. This patch changes the classification to POINTER_REGS a superset of CORE_REGS that includes SP.

Regressed aarch64-none-elf, committed.

/Marcus

2013-10-16  Marcus Shawcroft  <marcus.shawcr...@arm.com>

        * config/aarch64/aarch64.c (aarch64_regno_regclass): Classify
        FRAME_POINTER_REGNUM and ARG_POINTER_REGNUM as POINTER_REGS.
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index f6f587a..da3962f 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -3904,7 +3904,7 @@ aarch64_regno_regclass (unsigned regno)
 
   if (regno == FRAME_POINTER_REGNUM
       || regno == ARG_POINTER_REGNUM)
-    return CORE_REGS;
+    return POINTER_REGS;
 
   if (FP_REGNUM_P (regno))
     return FP_LO_REGNUM_P (regno) ?  FP_LO_REGS : FP_REGS;

Reply via email to