diff mbox

[3/3] Define macro PREFERRED_RENAME_CLASS on ARM

Message ID 4CBFE3A8.7090401@codesourcery.com
State New
Headers show

Commit Message

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

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