diff options
author | Kazu Hirata <kazu@hxi.com> | 2001-01-09 20:02:35 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2001-01-09 20:02:35 +0000 |
commit | 9789584bd16c6e26cb9ba3aeb6eab4ad3fcd30fc (patch) | |
tree | d31d6b7cfe65ed651d8634b67c8f354a2d461c91 /gcc | |
parent | 00dba523ac47a86a2778a59dc610f1b60d8995f8 (diff) | |
download | gcc-9789584bd16c6e26cb9ba3aeb6eab4ad3fcd30fc.zip gcc-9789584bd16c6e26cb9ba3aeb6eab4ad3fcd30fc.tar.gz gcc-9789584bd16c6e26cb9ba3aeb6eab4ad3fcd30fc.tar.bz2 |
h8300.c (get_shift_alg): Remove an argument cpu.
2001-01-09 Kazu Hirata <kazu@hxi.com>
* config/h8300/h8300.c (get_shift_alg): Remove an argument cpu.
Change an argument mode of machine_mode to shift_mode of
shift_mode. Remove an extra error check.
(emit_a_shift): Adopt to the new calling prototype of
get_shift_alg.
From-SVN: r38839
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/h8300/h8300.c | 48 |
2 files changed, 20 insertions, 36 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 01a368b..94d8ca4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2001-01-09 Kazu Hirata <kazu@hxi.com> + + * config/h8300/h8300.c (get_shift_alg): Remove an argument cpu. + Change an argument mode of machine_mode to shift_mode of + shift_mode. Remove an extra error check. + (emit_a_shift): Adopt to the new calling prototype of + get_shift_alg. + 2001-01-09 Nick Clifton <nickc@redhat.com> * config/rs6000/rs6000.c (rs6000_sysv_varargs_p): Delete. diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c index d34903b..0f88433 100644 --- a/gcc/config/h8300/h8300.c +++ b/gcc/config/h8300/h8300.c @@ -1961,8 +1961,8 @@ static const char *const rotate_two[3][3] = } }; -static enum shift_alg get_shift_alg PARAMS ((enum attr_cpu, enum shift_type, - enum machine_mode, int, +static enum shift_alg get_shift_alg PARAMS ((enum shift_type, + enum shift_mode, int, const char **, const char **, int *)); @@ -1980,47 +1980,23 @@ static enum shift_alg get_shift_alg PARAMS ((enum attr_cpu, enum shift_type, 1,2,3,4 will be inlined (1,2 for SI). */ static enum shift_alg -get_shift_alg (cpu, shift_type, mode, count, assembler_p, +get_shift_alg (shift_type, shift_mode, count, assembler_p, assembler2_p, cc_valid_p) - enum attr_cpu cpu; enum shift_type shift_type; - enum machine_mode mode; + enum shift_mode shift_mode; int count; const char **assembler_p; const char **assembler2_p; int *cc_valid_p; { - enum shift_mode shift_mode; - - /* We don't handle negative shifts or shifts greater than the word size, - they should have been handled already. */ - - if (count < 0 || (unsigned int) count > GET_MODE_BITSIZE (mode)) - abort (); - - switch (mode) - { - case QImode: - shift_mode = QIshift; - break; - case HImode: - shift_mode = HIshift; - break; - case SImode: - shift_mode = SIshift; - break; - default: - abort (); - } - /* Assume either SHIFT_LOOP or SHIFT_INLINE. It is up to the caller to know that looping clobbers cc. */ - *assembler_p = shift_one[cpu][shift_type][shift_mode].assembler; + *assembler_p = shift_one[cpu_type][shift_type][shift_mode].assembler; if (TARGET_H8300S) *assembler2_p = shift_two[shift_type][shift_mode].assembler; else *assembler2_p = NULL; - *cc_valid_p = shift_one[cpu][shift_type][shift_mode].cc_valid; + *cc_valid_p = shift_one[cpu_type][shift_type][shift_mode].cc_valid; /* Now look for cases we want to optimize. */ @@ -2050,7 +2026,7 @@ get_shift_alg (cpu, shift_type, mode, count, assembler_p, return SHIFT_LOOP; /* Other shifts by 5, 6, or 7 bits use SHIFT_ROT_AND. */ - *assembler_p = rotate_one[cpu][shift_type][shift_mode]; + *assembler_p = rotate_one[cpu_type][shift_type][shift_mode]; if (TARGET_H8300S) *assembler2_p = rotate_two[shift_type][shift_mode]; *cc_valid_p = 0; @@ -2239,7 +2215,7 @@ get_shift_alg (cpu, shift_type, mode, count, assembler_p, } else if (shift_type != SHIFT_ASHIFTRT) { - *assembler_p = rotate_one[cpu][shift_type][shift_mode]; + *assembler_p = rotate_one[cpu_type][shift_type][shift_mode]; if (TARGET_H8300S) *assembler2_p = rotate_two[shift_type][shift_mode]; else @@ -2428,7 +2404,7 @@ get_shift_alg (cpu, shift_type, mode, count, assembler_p, } else { - *assembler_p = rotate_one[cpu][shift_type][shift_mode]; + *assembler_p = rotate_one[cpu_type][shift_type][shift_mode]; if (TARGET_H8300S) *assembler2_p = rotate_two[shift_type][shift_mode]; else @@ -2461,7 +2437,7 @@ get_shift_alg (cpu, shift_type, mode, count, assembler_p, } else { - *assembler_p = rotate_one[cpu][shift_type][shift_mode]; + *assembler_p = rotate_one[cpu_type][shift_type][shift_mode]; if (TARGET_H8300S) *assembler2_p = rotate_two[shift_type][shift_mode]; else @@ -2537,7 +2513,7 @@ emit_a_shift (insn, operands) fprintf (asm_out_file, "\tble .Lle%d\n", loopend_lab); /* Get the assembler code to do one shift. */ - get_shift_alg (cpu_type, shift_type, mode, 1, &assembler, + get_shift_alg (shift_type, shift_mode, 1, &assembler, &assembler2, &cc_valid); fprintf (asm_out_file, ".Llt%d:\n", loopend_lab); @@ -2562,7 +2538,7 @@ emit_a_shift (insn, operands) else if ((unsigned int) n > GET_MODE_BITSIZE (mode)) n = GET_MODE_BITSIZE (mode); - alg = get_shift_alg (cpu_type, shift_type, mode, n, &assembler, + alg = get_shift_alg (shift_type, shift_mode, n, &assembler, &assembler2, &cc_valid); switch (alg) |