From a556fd39abf14ab516df0663c8df99ea8e81f9c5 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 3 Feb 2004 06:43:59 +0000 Subject: [PATCH] alpha.c, [...]: Use const0_rtx instead of GEN_INT (0). * config/alpha/alpha.c, config/arm/arm.c, config/c4x/c4x.c, config/fr30/fr30.md, config/frv/frv.c, config/frv/frv.md, config/h8300/h8300.c, config/ia64/ia64.c, config/ip2k/ip2k.md, config/m32r/m32r.md, config/m68hc11/m68hc11.c, config/mips/mips.md, config/mmix/mmix.c, config/mn10300/mn10300.c, config/mn10300/mn10300.md, config/ns32k/ns32k.c, config/pa/pa.md, config/pdp11/pdp11.c, config/rs6000/altivec.md, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/sh.c, config/sh/sh.h, config/sh/sh.md, config/stormy16/stormy16.c: Use const0_rtx instead of GEN_INT (0). Do the same for other constants that are readily available. From-SVN: r77161 --- gcc/ChangeLog | 15 +++++++++++++++ gcc/config/alpha/alpha.c | 6 +++--- gcc/config/arm/arm.c | 2 +- gcc/config/c4x/c4x.c | 6 +++--- gcc/config/fr30/fr30.md | 12 ++++++------ gcc/config/frv/frv.c | 2 +- gcc/config/frv/frv.md | 2 +- gcc/config/h8300/h8300.c | 8 ++++---- gcc/config/ia64/ia64.c | 8 ++++---- gcc/config/ip2k/ip2k.md | 22 +++++++++++----------- gcc/config/m32r/m32r.md | 8 ++++---- gcc/config/m68hc11/m68hc11.c | 6 +++--- gcc/config/mips/mips.md | 8 ++++---- gcc/config/mmix/mmix.c | 2 +- gcc/config/mn10300/mn10300.c | 2 +- gcc/config/mn10300/mn10300.md | 4 ++-- gcc/config/ns32k/ns32k.c | 4 ++-- gcc/config/pa/pa.md | 2 +- gcc/config/pdp11/pdp11.c | 2 +- gcc/config/rs6000/altivec.md | 2 +- gcc/config/s390/s390.c | 2 +- gcc/config/s390/s390.h | 2 +- gcc/config/s390/s390.md | 6 +++--- gcc/config/sh/sh.c | 12 ++++++------ gcc/config/sh/sh.h | 2 +- gcc/config/sh/sh.md | 8 ++++---- gcc/config/stormy16/stormy16.c | 2 +- 27 files changed, 86 insertions(+), 71 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 972ebf82675..d59d46ac911 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,18 @@ +2004-02-03 Kazu Hirata + + * config/alpha/alpha.c, config/arm/arm.c, config/c4x/c4x.c, + config/fr30/fr30.md, config/frv/frv.c, config/frv/frv.md, + config/h8300/h8300.c, config/ia64/ia64.c, config/ip2k/ip2k.md, + config/m32r/m32r.md, config/m68hc11/m68hc11.c, + config/mips/mips.md, config/mmix/mmix.c, + config/mn10300/mn10300.c, config/mn10300/mn10300.md, + config/ns32k/ns32k.c, config/pa/pa.md, config/pdp11/pdp11.c, + config/rs6000/altivec.md, config/s390/s390.c, + config/s390/s390.h, config/s390/s390.md, config/sh/sh.c, + config/sh/sh.h, config/sh/sh.md, config/stormy16/stormy16.c: + Use const0_rtx instead of GEN_INT (0). Do the same for other + constants that are readily available. + 2004-02-03 Kazu Hirata * doloop.c, optabs.c, regmove.c, sched-deps.c, diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index a630e419734..7038c3e2256 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -6100,7 +6100,7 @@ function_value (tree valtype, tree func ATTRIBUTE_UNUSED, (VOIDmode, gen_rtvec (2, gen_rtx_EXPR_LIST (VOIDmode, gen_rtx_REG (cmode, 32), - GEN_INT (0)), + const0_rtx), gen_rtx_EXPR_LIST (VOIDmode, gen_rtx_REG (cmode, 33), GEN_INT (GET_MODE_SIZE (cmode))))); } @@ -7845,7 +7845,7 @@ alpha_expand_epilogue (void) emit_insn (gen_blockage ()); FRP (emit_insn (gen_adddi3 (hard_frame_pointer_rtx, - hard_frame_pointer_rtx, GEN_INT (-1)))); + hard_frame_pointer_rtx, constm1_rtx))); } } } @@ -9685,7 +9685,7 @@ unicosmk_gen_dsib (unsigned long *imaskP) have a frame. */ FRP (emit_insn (gen_adddi3 (hard_frame_pointer_rtx, - hard_frame_pointer_rtx, GEN_INT (1)))); + hard_frame_pointer_rtx, const1_rtx))); } } diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 4cc8e2620ee..0be10946051 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -5455,7 +5455,7 @@ arm_gen_movstrqi (rtx *operands) { rtx tmp = gen_reg_rtx (SImode); - emit_insn (gen_addsi3 (dst, dst, GEN_INT (2))); + emit_insn (gen_addsi3 (dst, dst, const2_rtx)); emit_insn (gen_lshrsi3 (tmp, part_bytes_reg, GEN_INT (16))); part_bytes_reg = tmp; } diff --git a/gcc/config/c4x/c4x.c b/gcc/config/c4x/c4x.c index 3b01c50e1b2..0d06a12a9fd 100644 --- a/gcc/config/c4x/c4x.c +++ b/gcc/config/c4x/c4x.c @@ -1077,7 +1077,7 @@ c4x_expand_epilogue(void) gen_rtx_PLUS (QImode, gen_rtx_REG (QImode, AR3_REGNO), - GEN_INT(-1))))); + constm1_rtx)))); RTX_FRAME_RELATED_P (insn) = 1; /* We already have the return value and the fp, @@ -2359,8 +2359,8 @@ c4x_rptb_insert (rtx insn) { /* We can not use the rptb insn. Replace it so reorg can use the delay slots of the jump insn. */ - emit_insn_before (gen_addqi3 (count_reg, count_reg, GEN_INT (-1)), insn); - emit_insn_before (gen_cmpqi (count_reg, GEN_INT (0)), insn); + emit_insn_before (gen_addqi3 (count_reg, count_reg, constm1_rtx), insn); + emit_insn_before (gen_cmpqi (count_reg, const0_rtx), insn); emit_insn_before (gen_bge (start_label), insn); LABEL_NUSES (start_label)++; delete_insn (insn); diff --git a/gcc/config/fr30/fr30.md b/gcc/config/fr30/fr30.md index 5be9d9ae5ce..071299e1dc9 100644 --- a/gcc/config/fr30/fr30.md +++ b/gcc/config/fr30/fr30.md @@ -810,7 +810,7 @@ { rtx reg = gen_rtx_REG (SImode, 0/*COMPILER_SCRATCH_REGISTER*/); - emit_insn (gen_movsi (reg, GEN_INT (0))); + emit_insn (gen_movsi (reg, const0_rtx)); emit_insn (gen_subsi3 (reg, reg, operands[0])); emit_insn (gen_movsi (operands[0], reg)); } @@ -818,14 +818,14 @@ { rtx reg = gen_reg_rtx (SImode); - emit_insn (gen_movsi (reg, GEN_INT (0))); + emit_insn (gen_movsi (reg, const0_rtx)); emit_insn (gen_subsi3 (reg, reg, operands[0])); emit_insn (gen_movsi (operands[0], reg)); } } else { - emit_insn (gen_movsi_internal (operands[0], GEN_INT (0))); + emit_insn (gen_movsi_internal (operands[0], const0_rtx)); emit_insn (gen_subsi3 (operands[0], operands[0], operands[1])); } DONE; @@ -921,20 +921,20 @@ { rtx reg = gen_rtx_REG (SImode, 0/*COMPILER_SCRATCH_REGISTER*/); - emit_insn (gen_movsi (reg, GEN_INT (-1))); + emit_insn (gen_movsi (reg, constm1_rtx)); emit_insn (gen_xorsi3 (operands[0], operands[0], reg)); } else { rtx reg = gen_reg_rtx (SImode); - emit_insn (gen_movsi (reg, GEN_INT (-1))); + emit_insn (gen_movsi (reg, constm1_rtx)); emit_insn (gen_xorsi3 (operands[0], operands[0], reg)); } } else { - emit_insn (gen_movsi_internal (operands[0], GEN_INT (-1))); + emit_insn (gen_movsi_internal (operands[0], constm1_rtx)); emit_insn (gen_xorsi3 (operands[0], operands[1], operands[0])); } DONE; diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c index ac3a792b55c..32c2d27d6e3 100644 --- a/gcc/config/frv/frv.c +++ b/gcc/config/frv/frv.c @@ -9201,7 +9201,7 @@ frv_expand_mclracc_builtin (tree arglist) static rtx frv_expand_noargs_builtin (enum insn_code icode) { - rtx pat = GEN_FCN (icode) (GEN_INT (0)); + rtx pat = GEN_FCN (icode) (const0_rtx); if (pat) emit_insn (pat); diff --git a/gcc/config/frv/frv.md b/gcc/config/frv/frv.md index aef10bc9d43..e3c9520a1ee 100644 --- a/gcc/config/frv/frv.md +++ b/gcc/config/frv/frv.md @@ -5502,7 +5502,7 @@ /* Scale index-low by wordsize. */ scale = gen_reg_rtx (SImode); - emit_insn (gen_ashlsi3 (scale, indx, GEN_INT (2))); + emit_insn (gen_ashlsi3 (scale, indx, const2_rtx)); /* Load the address, add the start of the table back in, and jump to it. */ diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c index 1dc342681c7..bcf25ccf0ad 100644 --- a/gcc/config/h8300/h8300.c +++ b/gcc/config/h8300/h8300.c @@ -3867,7 +3867,7 @@ expand_a_rotate (enum rtx_code code, rtx operands[]) /* If the rotate amount is less than or equal to 0, we go out of the loop. */ - emit_cmp_and_jump_insns (rotate_amount, GEN_INT (0), LE, NULL_RTX, + emit_cmp_and_jump_insns (rotate_amount, const0_rtx, LE, NULL_RTX, QImode, 0, end_label); /* Initialize the loop counter. */ @@ -3876,16 +3876,16 @@ expand_a_rotate (enum rtx_code code, rtx operands[]) emit_label (start_label); /* Rotate by one bit. */ - tmp = gen_rtx_fmt_ee (code, mode, dst, GEN_INT (1)); + tmp = gen_rtx_fmt_ee (code, mode, dst, const1_rtx); emit_insn (gen_rtx_SET (mode, dst, tmp)); /* Decrement the counter by 1. */ - tmp = gen_rtx_PLUS (QImode, counter, GEN_INT (-1)); + tmp = gen_rtx_PLUS (QImode, counter, constm1_rtx); emit_insn (gen_rtx_SET (VOIDmode, counter, tmp)); /* If the loop counter is nonzero, we go back to the beginning of the loop. */ - emit_cmp_and_jump_insns (counter, GEN_INT (0), NE, NULL_RTX, QImode, 1, + emit_cmp_and_jump_insns (counter, const0_rtx, NE, NULL_RTX, QImode, 1, start_label); emit_label (end_label); diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 12b563faadb..e7ad9e71301 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -3180,9 +3180,9 @@ ia64_expand_epilogue (int sibcall_p) It is unclear how to compute that number here. */ if (current_frame_info.n_input_regs != 0) emit_insn (gen_alloc (gen_rtx_REG (DImode, fp), - GEN_INT (0), GEN_INT (0), + const0_rtx, const0_rtx, GEN_INT (current_frame_info.n_input_regs), - GEN_INT (0))); + const0_rtx)); } } @@ -7151,7 +7151,7 @@ bundling (FILE *dump, int verbose, rtx prev_head_insn, rtx tail) onto MFI because we will add nops before the insn. It simplifies subsequent code a lot. */ PATTERN (last) - = gen_bundle_selector (GEN_INT (2)); /* -> MFI */ + = gen_bundle_selector (const2_rtx); /* -> MFI */ break; } else if (recog_memoized (last) != CODE_FOR_insn_group_barrier) @@ -7177,7 +7177,7 @@ bundling (FILE *dump, int verbose, rtx prev_head_insn, rtx tail) for (i = add_cycles [INSN_UID (insn)]; i > 0; i--) { /* Insert "MII;" template. */ - ia64_emit_insn_before (gen_bundle_selector (GEN_INT (0)), + ia64_emit_insn_before (gen_bundle_selector (const0_rtx), insn); ia64_emit_insn_before (gen_nop (), insn); ia64_emit_insn_before (gen_nop (), insn); diff --git a/gcc/config/ip2k/ip2k.md b/gcc/config/ip2k/ip2k.md index 4e592e0fe1c..5e2dcf1f9e3 100644 --- a/gcc/config/ip2k/ip2k.md +++ b/gcc/config/ip2k/ip2k.md @@ -1087,7 +1087,7 @@ instructions. */ if (! nonimmediate_operand (operands[1], HImode)) operands[1] = copy_to_mode_reg (HImode, operands[1]); - emit_insn (gen_ashlhi3 (operands[0], operands[1], GEN_INT (1))); + emit_insn (gen_ashlhi3 (operands[0], operands[1], const1_rtx)); DONE; } ") @@ -3154,13 +3154,13 @@ if (INTVAL (operands[2]) == 16) { emit_insn (gen_movhi (operands[3], operands[5])); - emit_insn (gen_movhi (operands[4], GEN_INT (0))); + emit_insn (gen_movhi (operands[4], const0_rtx)); } else { operands[6] = GEN_INT (INTVAL (operands[2]) - 16); emit_insn (gen_ashlhi3 (operands[3], operands[5], operands[6])); - emit_insn (gen_movhi (operands[4], GEN_INT (0))); + emit_insn (gen_movhi (operands[4], const0_rtx)); } }") @@ -3388,18 +3388,18 @@ emit_insn (gen_movhi (operands[7], operands[11])); emit_insn (gen_movhi (operands[8], operands[12])); emit_insn (gen_movhi (operands[9], operands[13])); - emit_insn (gen_movhi (operands[10], GEN_INT (0))); + emit_insn (gen_movhi (operands[10], const0_rtx)); } else if (INTVAL (operands[2]) == 32) { emit_insn (gen_movsi (operands[3], operands[5])); - emit_insn (gen_movsi (operands[4], GEN_INT (0))); + emit_insn (gen_movsi (operands[4], const0_rtx)); } else { operands[6] = GEN_INT (INTVAL (operands[2]) - 32); emit_insn (gen_ashlsi3 (operands[3], operands[5], operands[6])); - emit_insn (gen_movsi (operands[4], GEN_INT (0))); + emit_insn (gen_movsi (operands[4], const0_rtx)); } }") @@ -3896,7 +3896,7 @@ operands[6] = GEN_INT (INTVAL (operands[2]) - 8); emit_insn (gen_lshrqi3 (operands[4], operands[5], operands[6])); } - emit_insn (gen_movqi (operands[3], GEN_INT (0))); + emit_insn (gen_movqi (operands[3], const0_rtx)); }") (define_insn "lshrhi3" ; 0 1 2 3 4 @@ -4027,7 +4027,7 @@ operands[6] = GEN_INT (INTVAL (operands[2]) - 16); emit_insn (gen_lshrhi3 (operands[4], operands[5], operands[6])); } - emit_insn (gen_movhi (operands[3], GEN_INT (0))); + emit_insn (gen_movhi (operands[3], const0_rtx)); }") ;; This occurs frequently in supporting FP among other things, @@ -4258,18 +4258,18 @@ emit_insn (gen_movhi (operands[10], operands[11])); emit_insn (gen_movhi (operands[9], operands[12])); emit_insn (gen_movhi (operands[8], operands[13])); - emit_insn (gen_movhi (operands[7], GEN_INT(0))); + emit_insn (gen_movhi (operands[7], const0_rtx)); } else if (INTVAL (operands[2]) == 32) { emit_insn (gen_movsi (operands[4], operands[5])); - emit_insn (gen_movsi (operands[3], GEN_INT (0))); + emit_insn (gen_movsi (operands[3], const0_rtx)); } else { operands[6] = GEN_INT (INTVAL (operands[2]) - 32); emit_insn (gen_lshrsi3 (operands[4], operands[5], operands[6])); - emit_insn (gen_movsi (operands[3], GEN_INT (0))); + emit_insn (gen_movsi (operands[3], const0_rtx)); } }") diff --git a/gcc/config/m32r/m32r.md b/gcc/config/m32r/m32r.md index 5932f4326a6..88801363699 100644 --- a/gcc/config/m32r/m32r.md +++ b/gcc/config/m32r/m32r.md @@ -1743,7 +1743,7 @@ rtx op1 = operands[1]; start_sequence (); - emit_insn (gen_cmp_ltusi_insn (op1, GEN_INT (1))); + emit_insn (gen_cmp_ltusi_insn (op1, const1_rtx)); emit_insn (gen_movcc_insn (op0)); operands[3] = get_insns (); end_sequence (); @@ -1797,7 +1797,7 @@ else emit_insn (gen_xorsi3 (op3, op1, op2)); - emit_insn (gen_cmp_ltusi_insn (op3, GEN_INT (1))); + emit_insn (gen_cmp_ltusi_insn (op3, const1_rtx)); emit_insn (gen_movcc_insn (op0)); operands[4] = get_insns (); end_sequence (); @@ -1932,7 +1932,7 @@ HOST_WIDE_INT value = INTVAL (op2); if (value >= 2147483647) { - emit_move_insn (op0, GEN_INT (1)); + emit_move_insn (op0, const1_rtx); DONE; } @@ -2153,7 +2153,7 @@ HOST_WIDE_INT value = INTVAL (op2); if (value >= 2147483647) { - emit_move_insn (op0, GEN_INT (1)); + emit_move_insn (op0, const1_rtx); DONE; } diff --git a/gcc/config/m68hc11/m68hc11.c b/gcc/config/m68hc11/m68hc11.c index 357c6e79dba..188c8994740 100644 --- a/gcc/config/m68hc11/m68hc11.c +++ b/gcc/config/m68hc11/m68hc11.c @@ -1690,7 +1690,7 @@ expand_prologue (void) if (size & 1) emit_insn (gen_addhi3 (stack_pointer_rtx, - stack_pointer_rtx, GEN_INT (-1))); + stack_pointer_rtx, constm1_rtx)); } /* Create the frame pointer. */ @@ -1776,7 +1776,7 @@ expand_epilogue (void) emit_move_after_reload (scratch, stack_pop_word, scratch); if (size & 1) emit_insn (gen_addhi3 (stack_pointer_rtx, - stack_pointer_rtx, GEN_INT (1))); + stack_pointer_rtx, const1_rtx)); } /* For an interrupt handler, restore ZTMP, ZREG and XYREG. */ @@ -1807,7 +1807,7 @@ expand_epilogue (void) } emit_move_after_reload (gen_rtx_MEM (HImode, gen_rtx_PLUS (HImode, addr_reg, - GEN_INT (1))), d_reg, 0); + const1_rtx)), d_reg, 0); if (return_size > HARD_REG_SIZE) emit_move_after_reload (gen_rtx_MEM (HImode, gen_rtx_PLUS (HImode, addr_reg, diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index e21e851b75b..caf88e2a71a 100644 --- a/gcc/config/mips/mips.md +++ b/gcc/config/mips/mips.md @@ -4417,7 +4417,7 @@ dsrl\t%3,%3,1\n\ HOST_WIDE_INT val = INTVAL (operands[1]); if (val < 0) - operands[2] = GEN_INT (0); + operands[2] = const0_rtx; else if (val >= 32 * 8) { int off = val & 7; @@ -4540,7 +4540,7 @@ dsrl\t%3,%3,1\n\ HOST_WIDE_INT val = INTVAL (operands[1]); if (val < 0) - operands[2] = GEN_INT (0); + operands[2] = const0_rtx; else if (val >= 32 * 4) { int off = val & 3; @@ -4839,7 +4839,7 @@ dsrl\t%3,%3,1\n\ HOST_WIDE_INT val = INTVAL (operands[1]); if (val < 0) - operands[2] = GEN_INT (0); + operands[2] = const0_rtx; else if (val >= 32 * 2) { int off = val & 1; @@ -4943,7 +4943,7 @@ dsrl\t%3,%3,1\n\ HOST_WIDE_INT val = INTVAL (operands[1]); if (val < 0) - operands[2] = GEN_INT (0); + operands[2] = const0_rtx; else { operands[1] = GEN_INT (0x7f); diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c index 46bfcea210c..4827c85402a 100644 --- a/gcc/config/mmix/mmix.c +++ b/gcc/config/mmix/mmix.c @@ -662,7 +662,7 @@ mmix_function_outgoing_value (tree valtype, tree func ATTRIBUTE_UNUSED) vec[nregs - 1] = gen_rtx_EXPR_LIST (VOIDmode, gen_rtx_REG (cmode, first_val_regnum + nregs - 1), - GEN_INT (0)); + const0_rtx); return gen_rtx_PARALLEL (VOIDmode, gen_rtvec_v (nregs, vec)); } diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c index 43a6d1030ac..f7811390d47 100644 --- a/gcc/config/mn10300/mn10300.c +++ b/gcc/config/mn10300/mn10300.c @@ -366,7 +366,7 @@ print_operand (FILE *file, rtx x, int code) case 'A': fputc ('(', file); if (GET_CODE (XEXP (x, 0)) == REG) - output_address (gen_rtx_PLUS (SImode, XEXP (x, 0), GEN_INT (0))); + output_address (gen_rtx_PLUS (SImode, XEXP (x, 0), const0_rtx)); else output_address (XEXP (x, 0)); fputc (')', file); diff --git a/gcc/config/mn10300/mn10300.md b/gcc/config/mn10300/mn10300.md index c9d9bb85803..4e8e9b77364 100644 --- a/gcc/config/mn10300/mn10300.md +++ b/gcc/config/mn10300/mn10300.md @@ -1074,7 +1074,7 @@ { rtx target = gen_reg_rtx (SImode); - emit_move_insn (target, GEN_INT (0)); + emit_move_insn (target, const0_rtx); emit_insn (gen_subsi3 (target, target, operands[1])); emit_move_insn (operands[0], target); DONE; @@ -1772,7 +1772,7 @@ emit_move_insn (index, plus_constant (operands[0], - INTVAL (operands[1]))); emit_insn (gen_cmpsi (index, operands[2])); emit_jump_insn (gen_bgtu (operands[4])); - emit_move_insn (index, gen_rtx_ASHIFT (SImode, index, GEN_INT (2))); + emit_move_insn (index, gen_rtx_ASHIFT (SImode, index, const2_rtx)); emit_move_insn (addr, gen_rtx_MEM (SImode, gen_rtx_PLUS (SImode, table, index))); if (flag_pic) diff --git a/gcc/config/ns32k/ns32k.c b/gcc/config/ns32k/ns32k.c index ff9f5a70a1e..e6e028fdd48 100644 --- a/gcc/config/ns32k/ns32k.c +++ b/gcc/config/ns32k/ns32k.c @@ -922,7 +922,7 @@ expand_block_move (rtx operands[]) else if (align == UNITS_PER_WORD) { /* insns to copy by words */ - emit_insn (gen_lshrsi3 (count_reg, bytes_rtx, GEN_INT (2))); + emit_insn (gen_lshrsi3 (count_reg, bytes_rtx, const2_rtx)); emit_insn (gen_movstrsi1 (GEN_INT (4))); if (constp) { @@ -963,7 +963,7 @@ expand_block_move (rtx operands[]) emit_label (aligned_label); /* insns to copy by words */ - emit_insn (gen_lshrsi3 (count_reg, bytes_reg, GEN_INT (2))); + emit_insn (gen_lshrsi3 (count_reg, bytes_reg, const2_rtx)); emit_insn (gen_movstrsi1 (GEN_INT (4))); /* insns to copy rest */ diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index f009f559eb4..4f060e3191e 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -4877,7 +4877,7 @@ if (intval % 2 == 0 && cint_ok_for_move (intval / 2)) { operands[2] = GEN_INT (intval / 2); - operands[3] = GEN_INT (2); + operands[3] = const2_rtx; } else if (intval % 4 == 0 && cint_ok_for_move (intval / 4)) { diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c index 2ef56c0b142..1b438d68970 100644 --- a/gcc/config/pdp11/pdp11.c +++ b/gcc/config/pdp11/pdp11.c @@ -702,7 +702,7 @@ output_move_quad (rtx *operands) } else if (GET_CODE(operands[1]) == CONST_INT) { - latehalf[1] = GEN_INT (0); + latehalf[1] = const0_rtx; } else abort(); diff --git a/gcc/config/rs6000/altivec.md b/gcc/config/rs6000/altivec.md index 73d0417771d..aa04071a894 100644 --- a/gcc/config/rs6000/altivec.md +++ b/gcc/config/rs6000/altivec.md @@ -571,7 +571,7 @@ /* Generate [-0.0, -0.0, -0.0, -0.0]. */ neg0 = gen_reg_rtx (V4SFmode); - emit_insn (gen_altivec_vspltisw_v4sf (neg0, GEN_INT (-1))); + emit_insn (gen_altivec_vspltisw_v4sf (neg0, constm1_rtx)); emit_insn (gen_altivec_vslw_v4sf (neg0, neg0, neg0)); /* Use the multiply-add. */ diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 3342b36e84d..1aafdc6492a 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -2519,7 +2519,7 @@ legitimize_pic_address (rtx orig, rtx reg) int even = INTVAL (op1) - 1; op0 = gen_rtx_PLUS (Pmode, op0, GEN_INT (even)); op0 = gen_rtx_CONST (Pmode, op0); - op1 = GEN_INT (1); + op1 = const1_rtx; } emit_move_insn (temp, op0); diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h index 8382174fa6c..7f6fa5c2fb6 100644 --- a/gcc/config/s390/s390.h +++ b/gcc/config/s390/s390.h @@ -594,7 +594,7 @@ extern int current_function_outgoing_args_size; s390_return_addr_rtx ((COUNT), DYNAMIC_CHAIN_ADDRESS ((FRAME))) /* In 31-bit mode, we need to mask off the high bit of return addresses. */ -#define MASK_RETURN_ADDR (TARGET_64BIT ? GEN_INT (-1) : GEN_INT (0x7fffffff)) +#define MASK_RETURN_ADDR (TARGET_64BIT ? constm1_rtx : GEN_INT (0x7fffffff)) /* Exception handling. */ diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index 81dad009c79..2ebee934376 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -547,7 +547,7 @@ [(set (reg 33) (compare (match_operand:HI 0 "register_operand" "d") (match_operand:HI 1 "immediate_operand" "n")))] - "s390_match_ccmode (insn, s390_tm_ccmode (GEN_INT (-1), operands[1], 1))" + "s390_match_ccmode (insn, s390_tm_ccmode (constm1_rtx, operands[1], 1))" "tml\t%0,65535" [(set_attr "op_type" "RX")]) @@ -555,7 +555,7 @@ [(set (reg 33) (compare (match_operand:QI 0 "register_operand" "d") (match_operand:QI 1 "immediate_operand" "n")))] - "s390_match_ccmode (insn, s390_tm_ccmode (GEN_INT (-1), operands[1], 1))" + "s390_match_ccmode (insn, s390_tm_ccmode (constm1_rtx, operands[1], 1))" "tml\t%0,255" [(set_attr "op_type" "RI")]) @@ -6822,7 +6822,7 @@ if (TARGET_64BIT) emit_insn (gen_ashldi3 (index, index, GEN_INT (3))); else - emit_insn (gen_ashlsi3 (index, index, GEN_INT (2))); + emit_insn (gen_ashlsi3 (index, index, const2_rtx)); emit_move_insn (base, gen_rtx_LABEL_REF (Pmode, operands[3])); diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index a3236802609..caebf93d62d 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -2427,7 +2427,7 @@ gen_shl_sext (rtx dest, rtx left_rtx, rtx size_rtx, rtx source) { operands[2] = GEN_INT (shift2 + 1); gen_shifty_op (ASHIFT, operands); - operands[2] = GEN_INT (1); + operands[2] = const1_rtx; gen_shifty_op (ASHIFTRT, operands); break; } @@ -2481,7 +2481,7 @@ gen_shl_sext (rtx dest, rtx left_rtx, rtx size_rtx, rtx source) operands[2] = kind == 7 ? GEN_INT (left + 1) : left_rtx; gen_shifty_op (ASHIFT, operands); if (kind == 7) - emit_insn (gen_ashrsi3_k (dest, dest, GEN_INT (1))); + emit_insn (gen_ashrsi3_k (dest, dest, const1_rtx)); break; default: return -1; @@ -3375,7 +3375,7 @@ gen_block_redirect (rtx jump, int addr, int need_block) return prev; /* Reorg even does nasty things with return insns that cause branches to go out of range - see find_end_label and callers. */ - return emit_insn_before (gen_block_branch_redirect (GEN_INT (0)) , jump); + return emit_insn_before (gen_block_branch_redirect (const0_rtx) , jump); } /* We can't use JUMP_LABEL here because it might be undefined when not optimizing. */ @@ -8413,14 +8413,14 @@ sh_initialize_trampoline (rtx tramp, rtx fnaddr, rtx cxt) movishori)); emit_insn (gen_rotrdi3_mextr (quad0, quad0, GEN_INT (TARGET_LITTLE_ENDIAN ? 24 : 56))); - emit_insn (gen_ashldi3_media (quad0, quad0, GEN_INT (2))); + emit_insn (gen_ashldi3_media (quad0, quad0, const2_rtx)); emit_move_insn (gen_rtx_MEM (DImode, tramp), quad0); emit_insn (gen_mshflo_w_x (gen_rtx_SUBREG (V4HImode, cxtload, 0), gen_rtx_SUBREG (V2HImode, cxt, 0), movishori)); emit_insn (gen_rotrdi3_mextr (cxtload, cxtload, GEN_INT (TARGET_LITTLE_ENDIAN ? 24 : 56))); - emit_insn (gen_ashldi3_media (cxtload, cxtload, GEN_INT (2))); + emit_insn (gen_ashldi3_media (cxtload, cxtload, const2_rtx)); if (TARGET_LITTLE_ENDIAN) { emit_insn (gen_mshflo_l_di (quad1, ptabs, cxtload)); @@ -9171,7 +9171,7 @@ sh_expand_t_scc (enum rtx_code code, rtx target) { emit_insn (gen_rtx_CLOBBER (VOIDmode, result)); emit_insn (gen_subc (result, result, result)); - emit_insn (gen_addsi3 (result, result, GEN_INT (1))); + emit_insn (gen_addsi3 (result, result, const1_rtx)); } else if (code == EQ || code == NE) emit_insn (gen_move_insn (result, GEN_INT (code == NE))); diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h index 333e967094c..b83a24eb568 100644 --- a/gcc/config/sh/sh.h +++ b/gcc/config/sh/sh.h @@ -2097,7 +2097,7 @@ struct sh_args { #define TRAMPOLINE_ADJUST_ADDRESS(TRAMP) do \ { \ if (TARGET_SHMEDIA) \ - (TRAMP) = expand_simple_binop (Pmode, PLUS, (TRAMP), GEN_INT (1), \ + (TRAMP) = expand_simple_binop (Pmode, PLUS, (TRAMP), const1_rtx, \ gen_reg_rtx (Pmode), 0, \ OPTAB_LIB_WIDEN); \ } while (0) diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index bbfc1a6cc71..73cd17d9e5c 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -4059,7 +4059,7 @@ if ((HOST_WIDE_INT) val2 < 0 && CONST_OK_FOR_I16 (val2)) { operands[1] = gen_mshflo_l_di (operands[0], operands[0], - GEN_INT (0)); + const0_rtx); break; } } @@ -9242,7 +9242,7 @@ mov.l\\t1f,r0\\n\\ emit_insn (gen_lshrsi3_k (shift_reg, shift_reg, GEN_INT (8))); qi_val = gen_rtx_SUBREG (QImode, shift_reg, 3); } - emit_insn (gen_addsi3 (addr_target, addr_target, GEN_INT (-1))); + emit_insn (gen_addsi3 (addr_target, addr_target, constm1_rtx)); emit_insn (gen_movqi (operands[0], qi_val)); } @@ -10669,7 +10669,7 @@ mov.l\\t1f,r0\\n\\ rtx scratch = gen_reg_rtx (DImode); rtx last; - emit_insn (gen_adddi3 (scratch, operands[1], GEN_INT (-1))); + emit_insn (gen_adddi3 (scratch, operands[1], constm1_rtx)); emit_insn (gen_xordi3 (scratch, operands[1], scratch)); emit_insn (gen_lshrdi3_media (scratch, scratch, const1_rtx)); emit_insn (gen_nsbdi (scratch, scratch)); @@ -10694,7 +10694,7 @@ mov.l\\t1f,r0\\n\\ emit_insn (gen_adddi3 (discratch, simplify_gen_subreg (DImode, operands[1], SImode, 0), - GEN_INT (-1))); + constm1_rtx)); emit_insn (gen_andcdi3 (discratch, simplify_gen_subreg (DImode, operands[1], SImode, 0), discratch)); diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c index b1a5b1129fb..867cd2129a2 100644 --- a/gcc/config/stormy16/stormy16.c +++ b/gcc/config/stormy16/stormy16.c @@ -1696,7 +1696,7 @@ xstormy16_expand_casesi (rtx index, rtx lower_bound, rtx range, emit_cmp_and_jump_insns (index, range, GTU, NULL_RTX, SImode, 1, default_label); int_index = gen_lowpart_common (HImode, index); - emit_insn (gen_ashlhi3 (int_index, int_index, GEN_INT (2))); + emit_insn (gen_ashlhi3 (int_index, int_index, const2_rtx)); emit_jump_insn (gen_tablejump_pcrel (int_index, table)); } -- 2.30.2