@@ -59,7 +59,7 @@ extern int arm_legitimate_address_outer_p (enum machine_mode, rtx, RTX_CODE, int
extern int thumb_legitimate_offset_p (enum machine_mode, HOST_WIDE_INT);
extern bool arm_legitimize_reload_address (rtx *, enum machine_mode, int, int,
int);
-extern rtx thumb_legitimize_reload_address (rtx *, enum machine_mode, int, int,
+extern rtx thumb1_legitimize_reload_address (rtx *, enum machine_mode, int, int,
int);
extern int thumb1_legitimate_address_p (enum machine_mode, rtx, int);
extern int arm_const_double_rtx (rtx);
@@ -6789,7 +6789,7 @@ arm_legitimize_reload_address (rtx *p,
}
rtx
-thumb_legitimize_reload_address (rtx *x_p,
+thumb1_legitimize_reload_address (rtx *x_p,
enum machine_mode mode,
int opnum, int type,
int ind_levels ATTRIBUTE_UNUSED)
@@ -1237,7 +1237,7 @@ enum reg_class
operand. If we find one, push the reload and jump to WIN. This
macro is used in only one place: `find_reloads_address' in reload.c.
- For the ARM, we wish to handle large displacements off a base
+ For ARM and Thumb2, we wish to handle large displacements off a base
register by splitting the addend across a MOV and the mem insn.
This can cut the number of reloads needed. */
#define ARM_LEGITIMIZE_RELOAD_ADDRESS(X, MODE, OPNUM, TYPE, IND, WIN) \
@@ -1256,10 +1256,9 @@ enum reg_class
/* We could probably achieve better results by defining PROMOTE_MODE to help
cope with the variances between the Thumb's signed and unsigned byte and
halfword load instructions. */
-/* ??? This should be safe for thumb2, but we may be able to do better. */
-#define THUMB_LEGITIMIZE_RELOAD_ADDRESS(X, MODE, OPNUM, TYPE, IND_L, WIN) \
+#define THUMB1_LEGITIMIZE_RELOAD_ADDRESS(X, MODE, OPNUM, TYPE, IND_L, WIN) \
do { \
- rtx new_x = thumb_legitimize_reload_address (&X, MODE, OPNUM, TYPE, IND_L); \
+ rtx new_x = thumb1_legitimize_reload_address (&X, MODE, OPNUM, TYPE, IND_L); \
if (new_x) \
{ \
X = new_x; \
@@ -1268,10 +1267,10 @@ do { \
} while (0)
#define LEGITIMIZE_RELOAD_ADDRESS(X, MODE, OPNUM, TYPE, IND_LEVELS, WIN) \
- if (TARGET_ARM) \
+ if (TARGET_32BIT) \
ARM_LEGITIMIZE_RELOAD_ADDRESS (X, MODE, OPNUM, TYPE, IND_LEVELS, WIN); \
else \
- THUMB_LEGITIMIZE_RELOAD_ADDRESS (X, MODE, OPNUM, TYPE, IND_LEVELS, WIN)
+ THUMB1_LEGITIMIZE_RELOAD_ADDRESS (X, MODE, OPNUM, TYPE, IND_LEVELS, WIN)
/* Return the maximum number of consecutive registers
needed to represent mode MODE in a register of class CLASS.