h8300-protos.h: Update the prototype of output_a_shift.

* 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.

From-SVN: r49310
This commit is contained in:
Kazu Hirata 2002-01-29 05:10:13 +00:00 committed by Kazu Hirata
parent a11d9dfc0a
commit 1a27522615
4 changed files with 27 additions and 27 deletions

View file

@ -1,3 +1,12 @@
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

View file

@ -26,7 +26,7 @@ Boston, MA 02111-1307, USA. */
/* 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));

View file

@ -2431,8 +2431,7 @@ get_shift_alg (shift_type, shift_mode, count, info)
/* 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;
@ -2517,18 +2516,15 @@ output_a_shift (insn, operands)
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)
@ -2542,8 +2538,8 @@ output_a_shift (insn, operands)
{
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
@ -2552,18 +2548,15 @@ output_a_shift (insn, operands)
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)
@ -2579,10 +2572,8 @@ output_a_shift (insn, operands)
sprintf (insn_buf, "and\t#%d,%%s0\n\tand\t#%d,%%t0",
mask & 255, mask >> 8);
break;
case SImode:
abort ();
default:
break;
abort ();
}
}
else

View file

@ -1837,7 +1837,7 @@
(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")])
@ -1871,7 +1871,7 @@
(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")])
@ -1908,7 +1908,7 @@
(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")])