This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][ARM]Replace gen_rtx_PLUS with plus_constant

Hello all,

This patch will replace all explicit calls to gen_rtx_PLUS and GEN_INT with plus_constant.

This has been tested for arm-none-linux-gnueabi on the model.
OK for trunk?

Kind regards,
Renlin Li


2013-09-20  Renlin Li  <>

* config/arm/arm.c (arm_legitimize_reload_address): use plus_constant().
    (arm_output_mi_thunk): Likewise.
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index f9027dd..7004eef 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -7016,10 +7016,10 @@ arm_legitimize_reload_address (rtx *p,
       /* Reload the high part into a base reg; leave the low part
 	 in the mem.  */
-      *p = gen_rtx_PLUS (GET_MODE (*p),
-			 gen_rtx_PLUS (GET_MODE (*p), XEXP (*p, 0),
-				       GEN_INT (high)),
-			 GEN_INT (low));
+      *p = plus_constant (GET_MODE (*p),
+			  plus_constant (GET_MODE (*p), XEXP (*p, 0),
+					 high),
+			  low);
       push_reload (XEXP (*p, 0), NULL_RTX, &XEXP (*p, 0), NULL,
 		   MODE_BASE_REG_CLASS (mode), GET_MODE (*p),
 		   VOIDmode, 0, 0, opnum, (enum reload_type) type);
@@ -25335,7 +25335,7 @@ arm_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
 	  /* Output ".word .LTHUNKn-7-.LTHUNKPCn".  */
 	  rtx tem = XEXP (DECL_RTL (function), 0);
-	  tem = gen_rtx_PLUS (GET_MODE (tem), tem, GEN_INT (-7));
+	  tem = plus_constant (GET_MODE (tem), tem, -7);
 	  tem = gen_rtx_MINUS (GET_MODE (tem),
 			       gen_rtx_SYMBOL_REF (Pmode,

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]