* sh-dis.c (print_insn_shx): Handle new operand types F_REG_N,
authorJeff Law <law@redhat.com>
Mon, 7 Aug 1995 08:39:42 +0000 (08:39 +0000)
committerJeff Law <law@redhat.com>
Mon, 7 Aug 1995 08:39:42 +0000 (08:39 +0000)
        F_REG_M, FPSCR_M, FPSCR_N, FPUL_M and FPUL_N.
        * sh-opc.h (sh_arg_type): Add new operand types.
        (sh_table): Add new opcodes from SH3E Floating Point ISA.

sh3e stuff.  Sanitized out for now.

opcodes/.Sanitize
opcodes/ChangeLog
opcodes/sh-opc.h

index a94b67b..a513ce6 100644 (file)
@@ -104,6 +104,27 @@ else
        done
 fi
 
+sh3e_files="ChangeLog sh-dis.c sh-opc.h"
+if ( echo $* | grep keep\-sh3e > /dev/null ) ; then
+       if [ -n "${verbose}" ] ; then
+               echo Keeping sh3e stuff in $sh3e_files.
+       fi
+else
+       if [ -n "${verbose}" ]; then
+               echo -n Cleaning sh3e in `pwd`:
+       fi
+       for f in $sh3e_files ; do
+               if [ -n "${verbose}" ] ; then
+                       echo -n " " $f
+               fi
+               sed -e '/start\-sanitize\-sh3e/,/end\-sanitize\-sh3e/d' -e '/ xl /d' < $f > new
+               if [ -n "${safe}" ] ; then
+                       mv $f .Recover
+               fi
+               mv new $f
+       done
+fi
+
 rce_files="configure.in configure"
 if ( echo $* | grep keep\-rce > /dev/null ) ; then
        for i in $rce_files ; do
index 4f6d603..61d646d 100644 (file)
@@ -1,3 +1,35 @@
+start-sanitize-sh3e
+Mon Aug  7 02:21:40 1995  Jeff Law  (law@snake.cs.utah.edu)
+
+       * sh-dis.c (print_insn_shx): Handle new operand types F_REG_N,
+       F_REG_M, FPSCR_M, FPSCR_N, FPUL_M and FPUL_N.
+       * sh-opc.h (sh_arg_type): Add new operand types.
+       (sh_table): Add new opcodes from SH3E Floating Point ISA.
+
+end-sanitize-sh3e
+Sat Aug  5 16:50:14 1995  Fred Fish  <fnf@cygnus.com>
+
+       * Makefile.in (distclean): Remove generated file config.h.
+
+Sat Aug  5 16:50:14 1995  Fred Fish  <fnf@cygnus.com>
+
+       * Makefile.in (distclean): Remove generated file config.h.
+
+Wed Aug  2 18:33:40 1995  Ian Lance Taylor  <ian@cygnus.com>
+
+       * m68k-opc.c: New file, holding tables from include/opcode/m68k.h.
+       Clean up tables.
+       * m68k-dis.c: Remove BREAK_UP_BIG_DECL stuff.
+       (opcode): Remove.
+       (print_insn_m68k): Change d to be const.  Use m68k_numopcodes
+       rather than numopcodes.  Use m68k_opcodes rather than removed
+       opcode function.  Don't check F_ALIAS.
+       (print_insn_arg): Change first parameter to be const char *.
+       * Makefile.in (ALL_MACHINES): Add m68k-opc.o.
+       (m68k-opc.o): New target.
+       * configure.in: Build m68k-opc.o for bfd_m68k_arch.
+       * configure: Rebuild.
+
 Wed Aug  2 08:23:38 1995  Doug Evans  <dje@canuck.cygnus.com>
 
        * sparc-dis.c (HASH_SIZE, HASH_INSN): Define.
index e3d989d..a3baf91 100644 (file)
@@ -1,3 +1,20 @@
+/* Definitions for SH opcodes.
+   Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+
 typedef enum {
        HEX_0,
        HEX_1,
@@ -30,6 +47,7 @@ typedef enum {
        IMM_8BY2,
        IMM_8BY4
 } sh_nibble_type;
+
 typedef enum {
        A_END,
        A_BDISP12,
@@ -56,15 +74,26 @@ typedef enum {
        A_REG_M,
        A_REG_N,
        A_SR,
-       A_VBR
+       A_VBR,
+/* start-sanitize-sh3e */
+       F_REG_N,
+       F_REG_M,
+       FPUL_N,
+       FPUL_M,
+       FPSCR_N,
+       FPSCR_M
+/* end-sanitize-sh3e */
 } sh_arg_type;
+
 typedef struct {
-char *name;
-sh_arg_type arg[3];
-sh_nibble_type nibbles[4];
+  char *name;
+  sh_arg_type arg[3];
+  sh_nibble_type nibbles[4];
 } sh_opcode_info;
+
 #ifdef DEFINE_TABLE
-sh_opcode_info sh_table[]={
+
+sh_opcode_info sh_table[] = {
 
 /* 0111nnnni8*1.... add #<imm>,<REG_N>  */{"add",{A_IMM,A_REG_N},{HEX_7,REG_N,IMM_8}},
 
@@ -150,12 +179,24 @@ sh_opcode_info sh_table[]={
 
 /* 0100nnnn00101010 lds <REG_N>,PR      */{"lds",{A_REG_N,A_PR},{HEX_4,REG_N,HEX_2,HEX_A}},
 
+/* start-sanitize-sh3e */
+/* 0100nnnn01011010 lds <REG_N>,FPUL    */{"lds",{A_REG_M,FPUL_N},{HEX_4,REG_M,HEX_5,HEX_A}},
+
+/* 0100nnnn01101010 lds <REG_M>,FPSCR   */{"lds",{A_REG_M,FPSCR_N},{HEX_4,REG_M,HEX_6,HEX_A}},
+/* end-sanitize-sh3e
+
 /* 0100nnnn00000110 lds.l @<REG_N>+,MACH*/{"lds.l",{A_INC_N,A_MACH},{HEX_4,REG_N,HEX_0,HEX_6}},
 
 /* 0100nnnn00010110 lds.l @<REG_N>+,MACL*/{"lds.l",{A_INC_N,A_MACL},{HEX_4,REG_N,HEX_1,HEX_6}},
 
 /* 0100nnnn00100110 lds.l @<REG_N>+,PR  */{"lds.l",{A_INC_N,A_PR},{HEX_4,REG_N,HEX_2,HEX_6}},
 
+/* start-sanitize-sh3e */
+/* 0100nnnn01010110 lds.l @<REG_M>+,FPUL*/{"lds.l",{A_INC_M,FPUL_N},{HEX_4,REG_M,HEX_5,HEX_6}},
+
+/* 0100nnnn01100110 lds.l @<REG_M>+,FPSCR*/{"lds.l",{A_INC_M,FPSCR_N},{HEX_4,REG_M,HEX_6,HEX_6}},
+/* end-sanitize-sh3e */
+
 /* 0100nnnnmmmm1111 mac.w @<REG_M>+,@<REG_N>+*/{"mac.w",{A_INC_M,A_INC_N},{HEX_4,REG_N,REG_M,HEX_F}},
 
 /* 1110nnnni8*1.... mov #<imm>,<REG_N>  */{"mov",{A_IMM,A_REG_N},{HEX_E,REG_N,IMM_8}},
@@ -264,11 +305,10 @@ sh_opcode_info sh_table[]={
 
 /* 0000000000011000 sett                */{"sett",{0},{HEX_0,HEX_0,HEX_1,HEX_8}},
 
-/* start-sanitize-sh3 */
 /* 0100nnnnmmmm1100 shad <REG_M>,<REG_N>*/{"shad",{ A_REG_M,A_REG_N},{HEX_4,REG_N,REG_M,HEX_C}},
 
 /* 0100nnnnmmmm1101 shld <REG_M>,<REG_N>*/{"shld",{ A_REG_M,A_REG_N},{HEX_4,REG_N,REG_M,HEX_D}},
-/* end-sanitize-sh3 */
+
 /* 0100nnnn00100000 shal <REG_N>        */{"shal",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_0}},
 
 /* 0100nnnn00100001 shar <REG_N>        */{"shar",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_1}},
@@ -309,12 +349,24 @@ sh_opcode_info sh_table[]={
 
 /* 0000nnnn00101010 sts PR,<REG_N>      */{"sts",{A_PR,A_REG_N},{HEX_0,REG_N,HEX_2,HEX_A}},
 
+/* start-sanitize-sh3e */
+/* 0100nnnn01011010 sts FPUL,<REG_N>    */{"sts",{FPUL_M,A_REG_N},{HEX_4,REG_N,HEX_5,HEX_A}},
+
+/* 0100nnnn01101010 sts FPSCR,<REG_N>   */{"sts",{FPSCR_M,A_REG_N},{HEX_4,REG_N,HEX_6,HEX_A}},
+/* end-sanitize-sh3e */
+
 /* 0100nnnn00000010 sts.l MACH,@-<REG_N>*/{"sts.l",{A_MACH,A_DEC_N},{HEX_4,REG_N,HEX_0,HEX_2}},
 
 /* 0100nnnn00010010 sts.l MACL,@-<REG_N>*/{"sts.l",{A_MACL,A_DEC_N},{HEX_4,REG_N,HEX_1,HEX_2}},
 
 /* 0100nnnn00100010 sts.l PR,@-<REG_N>  */{"sts.l",{A_PR,A_DEC_N},{HEX_4,REG_N,HEX_2,HEX_2}},
 
+/* start-sanitize-sh3e */
+/* 0100nnnn01010110 sts.l FPUL,@-<REG_N>*/{"sts.l",{FPUL_M,A_DEC_M},{HEX_4,REG_N,HEX_5,HEX_6}},
+
+/* 0100nnnn01100110 sts.l FPSCR,@-<REG_N>*/{"sts.l",{FPSCR_M,A_DEC_N},{HEX_4,REG_N,HEX_6,HEX_6}},
+/* end-sanitize-sh3e */
+
 /* 0011nnnnmmmm1000 sub <REG_M>,<REG_N> */{"sub",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_8}},
 
 /* 0011nnnnmmmm1010 subc <REG_M>,<REG_N>*/{"subc",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_A}},
@@ -354,5 +406,33 @@ sh_opcode_info sh_table[]={
 /* 0000nnnnmmmm1111 mac.l @<REG_M>+,@<REG_N>+*/{"mac.l",{A_INC_M,A_INC_N},{HEX_0,REG_N,REG_M,HEX_F}},
 /* 0000nnnn00100011 braf <REG_N>       */{"braf",{A_REG_N},{HEX_0,REG_N,HEX_2,HEX_3}},
 /* 0000nnnn00000011 bsrf <REG_N>       */{"bsrf",{A_REG_N},{HEX_0,REG_N,HEX_0,HEX_3}},
-0};
+/* start-sanitize-sh3e */
+/* 1111nnnn01011101 fabs <F_REG_N>     */{"fabs",{F_REG_N},{HEX_F,REG_N,HEX_5,HEX_D}},
+/* 1111nnnnmmmm0000 fadd <F_REG_M>,<F_REG_N>*/{"fadd",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_0}},
+/* 1111nnnnmmmm0100 fcmp/eq <F_REG_M>,<F_REG_N>*/{"fcmp/eq",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_4}},
+/* 1111nnnnmmmm0101 fcmp/gt <F_REG_M>,<F_REG_N>*/{"fcmp/gt",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_5}},
+/* 1111nnnnmmmm0011 fdiv <F_REG_M>,<F_REG_N>*/{"fdiv",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_3}},
+/* 1111nnnn10001101 fldi0 <F_REG_N>    */{"fldi0",{F_REG_N},{HEX_F,REG_N,HEX_8,HEX_D}},
+/* 1111nnnn10011101 fldi1 <F_REG_N>    */{"fldi1",{F_REG_N},{HEX_F,REG_N,HEX_9,HEX_D}},
+/* 1111nnnn00011101 flds <F_REG_M>,FPUL*/{"flds",{F_REG_N,FPUL_M},{HEX_F,REG_N,HEX_1,HEX_D}},
+/* 1111nnnn00101101 float FPUL,<F_REG_N>*/{"float",{FPUL_M,F_REG_N},{HEX_F,REG_N,HEX_2,HEX_D}},
+/* 1111nnnnmmmm1110 fmac <F_REG_M>,<F_REG_N>*/{"fmac",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_E}},
+/* 1111nnnnmmmm1100 fmov <F_REG_M>,<F_REG_N>*/{"fmov",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_C}},
+/* 1111nnnnmmmm1000 fmov.s @<REG_M>,<F_REG_N>*/{"fmov.s",{A_IND_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_8}},
+/* 1111nnnnmmmm1010 fmov.s <F_REG_M>,@<REG_N>*/{"fmov.s",{F_REG_M,A_IND_N},{HEX_F,REG_N,REG_M,HEX_A}},
+/* 1111nnnnmmmm1001 fmov.s @<REG_M>+,<F_REG_N>*/{"fmov.s",{A_INC_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_9}},
+/* 1111nnnnmmmm1011 fmov.s <F_REG_M>,@-<REG_N>*/{"fmov.s",{F_REG_M,A_DEC_N},{HEX_F,REG_N,REG_M,HEX_B}},
+/* 1111nnnnmmmm0110 fmov.s @(R0,<REG_M>),<F_REG_N>*/{"fmov.s",{A_IND_R0_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_6}},
+/* 1111nnnnmmmm0111 fmov.s <F_REG_M>,@(R0,<REG_N>)*/{"fmov.s",{F_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}},
+/* 1111nnnnmmmm0010 fmul <F_REG_M>,<F_REG_N>*/{"fmul",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_2}},
+/* 1111nnnn01001101 fneg <F_REG_N>     */{"fneg",{F_REG_N},{HEX_F,REG_N,HEX_4,HEX_D}},
+/* 1111nnnn01101101 fsqrt <F_REG_N>    */{"fsqrt",{F_REG_N},{HEX_F,REG_N,HEX_6,HEX_D}},
+/* 1111nnnn00001101 fsts FPUL,<F_REG_N>*/{"fsts",{FPUL_M,F_REG_N},{HEX_F,REG_N,HEX_0,HEX_D}},
+/* 1111nnnnmmmm0001 fsub <F_REG_M>,<F_REG_N>*/{"fsub",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_1}},
+/* 1111nnnn00111101 ftrc <F_REG_M>,FPUL*/{"ftrc",{F_REG_N,FPUL_N},{HEX_F,REG_N,HEX_3,HEX_D}},
+/* 1111nnnn01111101 ftst/nan <F_REG_N>     */{"ftst/nan",{F_REG_N},{HEX_F,REG_N,HEX_7,HEX_D}},
+/* end-sanitize-sh3e */
+{ 0 } 
+};
+
 #endif