From: Kazu Hirata Date: Wed, 14 Nov 2001 14:28:06 +0000 (+0000) Subject: h8300.c (get_shift_alg): Reorganize the code that deals with 7-bit shifts in HImode. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a77b1dbce6273d7618085c60ab4bdc4579420c39;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d22a17a9257..59761d3f514 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-11-14 Kazu Hirata + + * 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 * 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 f9783927ab0..ea9c74dc8fe 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; }