aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/arm/arm.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/arm/arm.c')
-rw-r--r--gcc/config/arm/arm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 43a832e..946f308 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -9127,7 +9127,8 @@ thumb1_size_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer)
if (satisfies_constraint_J (SET_SRC (x))
|| satisfies_constraint_K (SET_SRC (x))
/* Too big an immediate for a 2-byte mov, using MOVT. */
- || (UINTVAL (SET_SRC (x)) >= 256
+ || (CONST_INT_P (SET_SRC (x))
+ && UINTVAL (SET_SRC (x)) >= 256
&& TARGET_HAVE_MOVT
&& satisfies_constraint_j (SET_SRC (x)))
/* thumb1_movdi_insn. */