2002-01-29 Kazu Hirata <kazu@hxi.com>
+ * config/h8300/h8300-protos.h: Update the prototype of
+ output_a_shift.
+ * config/h8300/h8300.c (output_a_shift): Remove an unused
+ argument 'insn'. Remove redundant code.
+ * config/h8300/h8300.md: Adust to the new prototype of
+ output_a_shift.
+
+2002-01-29 Kazu Hirata <kazu@hxi.com>
+
* config/h8300/h8300-protos.h: Update the prototypes of
emit_a_rotate and expand_a_rotate.
* config/h8300/h8300.c (emit_a_rotate): Change the type of the
/* Declarations for functions used in insn-output.c. */
#ifdef RTX_CODE
-extern const char *output_a_shift PARAMS ((rtx, rtx *));
+extern const char *output_a_shift PARAMS ((rtx *));
extern const char *emit_a_rotate PARAMS ((enum rtx_code, rtx *));
extern const char *output_simode_bld PARAMS ((int, rtx[]));
extern void print_operand_address PARAMS ((FILE *, rtx));
/* Emit the assembler code for doing shifts. */
const char *
-output_a_shift (insn, operands)
- rtx insn ATTRIBUTE_UNUSED;
+output_a_shift (operands)
rtx *operands;
{
static int loopend_lab;
n = info.remainder;
/* Emit two bit shifts first. */
- while (n > 1 && info.shift2 != NULL)
+ if (info.shift2 != NULL)
{
- output_asm_insn (info.shift2, operands);
- n -= 2;
+ for (; n > 1; n -= 2)
+ output_asm_insn (info.shift2, operands);
}
/* Now emit one bit shifts for any residual. */
- while (n > 0)
- {
- output_asm_insn (info.shift1, operands);
- n -= 1;
- }
+ for (; n > 0; n--)
+ output_asm_insn (info.shift1, operands);
/* Keep track of CC. */
if (info.cc_valid_p)
{
int m = GET_MODE_BITSIZE (mode) - n;
int mask = (shift_type == SHIFT_ASHIFT
- ? ((1 << (GET_MODE_BITSIZE (mode) - n)) - 1) << n
- : (1 << (GET_MODE_BITSIZE (mode) - n)) - 1);
+ ? ((1 << m) - 1) << n
+ : (1 << m) - 1);
char insn_buf[200];
/* Not all possibilities of rotate are supported. They shouldn't
abort ();
/* Emit two bit rotates first. */
- while (m > 1 && info.shift2 != NULL)
+ if (info.shift2 != NULL)
{
- output_asm_insn (info.shift2, operands);
- m -= 2;
+ for (; m > 1; m -= 2)
+ output_asm_insn (info.shift2, operands);
}
/* Now single bit rotates for any residual. */
- while (m > 0)
- {
- output_asm_insn (info.shift1, operands);
- m -= 1;
- }
+ for (; m > 0; m--)
+ output_asm_insn (info.shift1, operands);
/* Now mask off the high bits. */
if (TARGET_H8300)
sprintf (insn_buf, "and\t#%d,%%s0\n\tand\t#%d,%%t0",
mask & 255, mask >> 8);
break;
- case SImode:
- abort ();
default:
- break;
+ abort ();
}
}
else
(match_operand:QI 2 "nonmemory_operand" "KM,rn")]))
(clobber (match_scratch:QI 4 "=X,&r"))]
""
- "* return output_a_shift (insn, operands);"
+ "* return output_a_shift (operands);"
[(set_attr "length" "20")
(set_attr "cc" "clobber")])
(match_operand:QI 2 "nonmemory_operand" "KM,rn")]))
(clobber (match_scratch:QI 4 "=X,&r"))]
""
- "* return output_a_shift (insn, operands);"
+ "* return output_a_shift (operands);"
[(set_attr "length" "20")
(set_attr "cc" "clobber")])
(match_operand:QI 2 "nonmemory_operand" "K,rn")]))
(clobber (match_scratch:QI 4 "=X,&r"))]
""
- "* return output_a_shift (insn, operands);"
+ "* return output_a_shift (operands);"
[(set_attr "length" "20")
(set_attr "cc" "clobber")])
\f