diff options
author | Kazu Hirata <kazu@hxi.com> | 2001-11-14 14:28:06 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2001-11-14 14:28:06 +0000 |
commit | a77b1dbce6273d7618085c60ab4bdc4579420c39 (patch) | |
tree | dacb101f81b7295af7bbf22a0e4addff571f4f8c /gcc | |
parent | 49d801d3dba0c2ed5038253a447ca2cdff549754 (diff) | |
download | gcc-a77b1dbce6273d7618085c60ab4bdc4579420c39.zip gcc-a77b1dbce6273d7618085c60ab4bdc4579420c39.tar.gz gcc-a77b1dbce6273d7618085c60ab4bdc4579420c39.tar.bz2 |
h8300.c (get_shift_alg): Reorganize the code that deals with 7-bit shifts in HImode.
* config/h8300/h8300.c (get_shift_alg): Reorganize the code
that deals with 7-bit shifts in HImode.
From-SVN: r47014
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/h8300/h8300.c | 35 |
2 files changed, 17 insertions, 23 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d22a17a..59761d3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-11-14 Kazu Hirata <kazu@hxi.com> + + * config/h8300/h8300.c (get_shift_alg): Reorganize the code + that deals with 7-bit shifts in HImode. + Wed Nov 14 14:17:05 CET 2001 Jan Hubicka <jh@suse.cz> * dbxout.c (dbxout_symbol_location): Update call of alter_subreg. diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c index f978392..ea9c74d 100644 --- a/gcc/config/h8300/h8300.c +++ b/gcc/config/h8300/h8300.c @@ -2420,32 +2420,21 @@ get_shift_alg (shift_type, shift_mode, count, info) case HIshift: if (count == 7) { - if (shift_type == SHIFT_ASHIFT && TARGET_H8300) - { - info->special = "shar.b\t%t0\n\tmov.b\t%s0,%t0\n\trotxr.b\t%t0\n\trotr.b\t%s0\n\tand.b\t#0x80,%s0"; - goto end; - } - - if (shift_type == SHIFT_ASHIFT && TARGET_H8300H) - { - info->special = "shar.b\t%t0\n\tmov.b\t%s0,%t0\n\trotxr.w\t%T0\n\tand.b\t#0x80,%s0"; - goto end; - } - - if (shift_type == SHIFT_LSHIFTRT && TARGET_H8300) + switch (shift_type) { - info->special = "shal.b\t%s0\n\tmov.b\t%t0,%s0\n\trotxl.b\t%s0\n\trotl.b\t%t0\n\tand.b\t#0x01,%t0"; + case SHIFT_ASHIFT: + if (TARGET_H8300) + info->special = "shar.b\t%t0\n\tmov.b\t%s0,%t0\n\trotxr.b\t%t0\n\trotr.b\t%s0\n\tand.b\t#0x80,%s0"; + else + info->special = "shar.b\t%t0\n\tmov.b\t%s0,%t0\n\trotxr.w\t%T0\n\tand.b\t#0x80,%s0"; goto end; - } - - if (shift_type == SHIFT_LSHIFTRT && TARGET_H8300H) - { - info->special = "shal.b\t%s0\n\tmov.b\t%t0,%s0\n\trotxl.w\t%T0\n\tand.b\t#0x01,%t0"; + case SHIFT_LSHIFTRT: + if (TARGET_H8300) + info->special = "shal.b\t%s0\n\tmov.b\t%t0,%s0\n\trotxl.b\t%s0\n\trotl.b\t%t0\n\tand.b\t#0x01,%t0"; + else + info->special = "shal.b\t%s0\n\tmov.b\t%t0,%s0\n\trotxl.w\t%T0\n\tand.b\t#0x01,%t0"; goto end; - } - - if (shift_type == SHIFT_ASHIFTRT) - { + case SHIFT_ASHIFTRT: info->special = "shal.b\t%s0\n\tmov.b\t%t0,%s0\n\trotxl.b\t%s0\n\tsubx\t%t0,%t0"; goto end; } |