From: kazu Date: Tue, 7 Jan 2003 04:34:30 +0000 (+0000) Subject: * config/h8300/h8300.c (final_prescan_insn): Constify uid. X-Git-Tag: upstream/4.9.2~82577 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=407921a5ce278eefee64d0d9a25bf97158bc9597;p=platform%2Fupstream%2Flinaro-gcc.git * config/h8300/h8300.c (final_prescan_insn): Constify uid. (output_logical_op): Constify intval and det. (compute_logical_length): Likewise. (compute_logical_cc): Likewise. (output_a_shift): Constify mask. (h8300_encode_label): Constify len. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60979 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a8d9d24..6b0f9fb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,14 @@ 2003-01-06 Kazu Hirata + * config/h8300/h8300.c (final_prescan_insn): Constify uid. + (output_logical_op): Constify intval and det. + (compute_logical_length): Likewise. + (compute_logical_cc): Likewise. + (output_a_shift): Constify mask. + (h8300_encode_label): Constify len. + +2003-01-06 Kazu Hirata + * config/h8300/h8300.c (h8300_expand_prologue): Remove fsize. (h8300_expand_epilogue): Likewise. diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c index 0fa5403..3f2a358 100644 --- a/gcc/config/h8300/h8300.c +++ b/gcc/config/h8300/h8300.c @@ -1609,7 +1609,7 @@ final_prescan_insn (insn, operand, num_operands) /* This holds the last insn address. */ static int last_insn_address = 0; - int uid = INSN_UID (insn); + const int uid = INSN_UID (insn); if (TARGET_RTL_DUMP) { @@ -2055,12 +2055,12 @@ output_logical_op (mode, operands) /* Figure out the logical op that we need to perform. */ enum rtx_code code = GET_CODE (operands[3]); /* Pretend that every byte is affected if both operands are registers. */ - unsigned HOST_WIDE_INT intval = + const unsigned HOST_WIDE_INT intval = (unsigned HOST_WIDE_INT) ((GET_CODE (operands[2]) == CONST_INT) ? INTVAL (operands[2]) : 0x55555555); /* The determinant of the algorithm. If we perform an AND, 0 affects a bit. Otherwise, 1 affects a bit. */ - unsigned HOST_WIDE_INT det = (code != AND) ? intval : ~intval; + const unsigned HOST_WIDE_INT det = (code != AND) ? intval : ~intval; /* The name of an insn. */ const char *opname; char insn_buf[100]; @@ -2208,12 +2208,12 @@ compute_logical_op_length (mode, operands) /* Figure out the logical op that we need to perform. */ enum rtx_code code = GET_CODE (operands[3]); /* Pretend that every byte is affected if both operands are registers. */ - unsigned HOST_WIDE_INT intval = + const unsigned HOST_WIDE_INT intval = (unsigned HOST_WIDE_INT) ((GET_CODE (operands[2]) == CONST_INT) ? INTVAL (operands[2]) : 0x55555555); /* The determinant of the algorithm. If we perform an AND, 0 affects a bit. Otherwise, 1 affects a bit. */ - unsigned HOST_WIDE_INT det = (code != AND) ? intval : ~intval; + const unsigned HOST_WIDE_INT det = (code != AND) ? intval : ~intval; /* Insn length. */ unsigned int length = 0; @@ -2330,12 +2330,12 @@ compute_logical_op_cc (mode, operands) /* Figure out the logical op that we need to perform. */ enum rtx_code code = GET_CODE (operands[3]); /* Pretend that every byte is affected if both operands are registers. */ - unsigned HOST_WIDE_INT intval = + const unsigned HOST_WIDE_INT intval = (unsigned HOST_WIDE_INT) ((GET_CODE (operands[2]) == CONST_INT) ? INTVAL (operands[2]) : 0x55555555); /* The determinant of the algorithm. If we perform an AND, 0 affects a bit. Otherwise, 1 affects a bit. */ - unsigned HOST_WIDE_INT det = (code != AND) ? intval : ~intval; + const unsigned HOST_WIDE_INT det = (code != AND) ? intval : ~intval; /* Condition code. */ enum attr_cc cc = CC_CLOBBER; @@ -3245,9 +3245,9 @@ output_a_shift (operands) case SHIFT_ROT_AND: { int m = GET_MODE_BITSIZE (mode) - n; - int mask = (shift_type == SHIFT_ASHIFT - ? ((1 << m) - 1) << n - : (1 << m) - 1); + const int mask = (shift_type == SHIFT_ASHIFT + ? ((1 << m) - 1) << n + : (1 << m) - 1); char insn_buf[200]; /* Not all possibilities of rotate are supported. They shouldn't @@ -3912,7 +3912,7 @@ h8300_encode_label (decl) tree decl; { const char *str = XSTR (XEXP (DECL_RTL (decl), 0), 0); - int len = strlen (str); + const int len = strlen (str); char *newstr = alloca (len + 2); newstr[0] = '&';