Commit b93a0fe6 by Richard Earnshaw Committed by Richard Earnshaw

arm.h (BASE_REG_CLASS): Always return LO_REGS for Thumb.

* arm.h (BASE_REG_CLASS): Always return LO_REGS for Thumb.
(MODE_BASE_REG_CLASS, case Thumb): Only return BASE_REGS if we know
that we have a SImode access, and only then if reload hasn't completed;
for all other cases, use LO_REGS.

From-SVN: r57644
parent 067bb3a7
2002-09-30 Richard Earnshaw <rearnsha@arm.com>
* arm.h (BASE_REG_CLASS): Always return LO_REGS for Thumb.
(MODE_BASE_REG_CLASS, case Thumb): Only return BASE_REGS if we know
that we have a SImode access, and only then if reload hasn't completed;
for all other cases, use LO_REGS.
2002-09-29 Richard Henderson <rth@redhat.com> 2002-09-29 Richard Henderson <rth@redhat.com>
* real.c (real_from_string): Apply sign last. Tidy exponent handling. * real.c (real_from_string): Apply sign last. Tidy exponent handling.
......
...@@ -1070,14 +1070,16 @@ enum reg_class ...@@ -1070,14 +1070,16 @@ enum reg_class
/* The class value for index registers, and the one for base regs. */ /* The class value for index registers, and the one for base regs. */
#define INDEX_REG_CLASS (TARGET_THUMB ? LO_REGS : GENERAL_REGS) #define INDEX_REG_CLASS (TARGET_THUMB ? LO_REGS : GENERAL_REGS)
#define BASE_REG_CLASS (TARGET_THUMB ? BASE_REGS : GENERAL_REGS) #define BASE_REG_CLASS (TARGET_THUMB ? LO_REGS : GENERAL_REGS)
/* For the Thumb the high registers cannot be used as base /* For the Thumb the high registers cannot be used as base registers
registers when addressing quanitities in QI or HI mode. */ when addressing quanitities in QI or HI mode; if we don't know the
mode, then we must be conservative. After reload we must also be
conservative, since we can't support SP+reg addressing, and we
can't fix up any bad substitutions. */
#define MODE_BASE_REG_CLASS(MODE) \ #define MODE_BASE_REG_CLASS(MODE) \
(TARGET_ARM ? BASE_REGS : \ (TARGET_ARM ? GENERAL_REGS : \
(((MODE) == QImode || (MODE) == HImode || (MODE) == VOIDmode) \ (((MODE) == SImode && !reload_completed) ? BASE_REGS : LO_REGS))
? LO_REGS : BASE_REGS))
/* When SMALL_REGISTER_CLASSES is nonzero, the compiler allows /* When SMALL_REGISTER_CLASSES is nonzero, the compiler allows
registers explicitly used in the rtl to be used as spill registers registers explicitly used in the rtl to be used as spill registers
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment