This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[AArch64] Classify FRAME_POINTER_REGNUM and ARG_POINTER_REGNUM as POINTER_REGS.



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.shawcroft@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;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]