From patchwork Thu Oct 21 06:54:32 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [3/3] Define macro PREFERRED_RENAME_CLASS on ARM Date: Wed, 20 Oct 2010 20:54:32 -0000 From: Yao Qi X-Patchwork-Id: 68529 Message-Id: <4CBFE3A8.7090401@codesourcery.com> To: gcc-patches@gcc.gnu.org This patch is quite straight forward, define macro, which rename GENERAL_REGS to LO_REGS when target is thumb-2. 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