Patchwork [3/3] Define macro PREFERRED_RENAME_CLASS on ARM

login
register
mail settings
Submitter Yao Qi
Date Oct. 21, 2010, 6:54 a.m.
Message ID <4CBFE3A8.7090401@codesourcery.com>
Download mbox | patch
Permalink /patch/68529/
State New
Headers show

Comments

Yao Qi - Oct. 21, 2010, 6:54 a.m.
This patch is quite straight forward, define macro, which rename
GENERAL_REGS to LO_REGS when target is thumb-2.

Patch

gcc/
        * config/arm/arm.h (PREFERRED_RENAME_CLASS): New macro.

diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 55442f5..d3f7376 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -1306,6 +1306,11 @@  enum reg_class
 #define TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P \
   arm_small_register_classes_for_mode_p 
 
+#define PREFERRED_RENAME_CLASS(CLASS)          \
+  (TARGET_THUMB2 ? ((CLASS) == GENERAL_REGS    \
+   ? LO_REGS : (CLASS))                                \
+  : (CLASS))
+
 /* Given an rtx X being reloaded into a reg required to be
    in class CLASS, return the class of reg to actually use.
    In general this is just CLASS, but for the Thumb core registers and