From: law Date: Mon, 26 Jan 1998 00:44:02 +0000 (+0000) Subject: * h8300.c (print_operand): Handle CONST_DOUBLE for 'e', 'f', and X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=737a5d5b52b11a51d512674674b41e189b3040d8;p=platform%2Fupstream%2Flinaro-gcc.git * h8300.c (print_operand): Handle CONST_DOUBLE for 'e', 'f', and the default case. (get_shift_alg): Fix typo. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17486 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 48aa92c..fcaa21f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Mon Jan 26 01:44:12 1998 Jeffrey A Law (law@cygnus.com) + + * h8300.c (print_operand): Handle CONST_DOUBLE for 'e', 'f', and + the default case. + (get_shift_alg): Fix typo. + Sun Jan 25 22:22:04 1998 Richard Henderson * alpha.c (alpha_expand_block_move): Copy ADDRESSOF to reg. diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c index 77cb6ce..1a33bf6 100644 --- a/gcc/config/h8300/h8300.c +++ b/gcc/config/h8300/h8300.c @@ -1,5 +1,5 @@ /* Subroutines for insn-output.c for Hitachi H8/300. - Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. Contributed by Steve Chamberlain (sac@cygnus.com), Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com). @@ -20,8 +20,8 @@ along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include #include "config.h" +#include #include "rtl.h" #include "regs.h" #include "hard-reg-set.h" @@ -52,7 +52,7 @@ int cpu_type; (either via #pragma or an attribute specification). */ int interrupt_handler; -/* True if the current fucntion is an OS Task +/* True if the current function is an OS Task (via an attribute specification). */ int os_task; @@ -1291,6 +1291,15 @@ print_operand (file, x, code) case CONST_INT: fprintf (file, "#%d", ((INTVAL (x) >> 16) & 0xffff)); break; + case CONST_DOUBLE: + { + long val; + REAL_VALUE_TYPE rv; + REAL_VALUE_FROM_CONST_DOUBLE (rv, x); + REAL_VALUE_TO_TARGET_SINGLE (rv, val); + fprintf (file, "#%d", ((val >> 16) & 0xffff)); + break; + } default: abort (); break; @@ -1312,6 +1321,15 @@ print_operand (file, x, code) case CONST_INT: fprintf (file, "#%d", INTVAL (x) & 0xffff); break; + case CONST_DOUBLE: + { + long val; + REAL_VALUE_TYPE rv; + REAL_VALUE_FROM_CONST_DOUBLE (rv, x); + REAL_VALUE_TO_TARGET_SINGLE (rv, val); + fprintf (file, "#%d", (val & 0xffff)); + break; + } default: abort (); } @@ -1427,6 +1445,15 @@ print_operand (file, x, code) fprintf (file, "#"); print_operand_address (file, x); break; + case CONST_DOUBLE: + { + long val; + REAL_VALUE_TYPE rv; + REAL_VALUE_FROM_CONST_DOUBLE (rv, x); + REAL_VALUE_TO_TARGET_SINGLE (rv, val); + fprintf (file, "#%d", val); + break; + } } } } @@ -2338,7 +2365,7 @@ get_shift_alg (cpu, shift_type, mode, count, assembler_p, switch (shift_type) { case SHIFT_ASHIFT: - *assembler_p = "mov.b\t%y0,%z0n\tmov.b\t%x0,%y0\n\tmov.b\t%w0,%x0\n\tsub.b\t%w0,%w0"; + *assembler_p = "mov.b\t%y0,%z0\n\tmov.b\t%x0,%y0\n\tmov.b\t%w0,%x0\n\tsub.b\t%w0,%w0"; *cc_valid_p = 0; return SHIFT_SPECIAL; case SHIFT_LSHIFTRT: