From: Jeff Law Date: Mon, 7 Aug 1995 08:39:42 +0000 (+0000) Subject: * sh-dis.c (print_insn_shx): Handle new operand types F_REG_N, X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1ca31557f59ac1af1b3275086323d5cfba93feef;p=binutils-gdb.git * 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. sh3e stuff. Sanitized out for now. --- diff --git a/opcodes/.Sanitize b/opcodes/.Sanitize index a94b67b39ae..a513ce639ed 100644 --- a/opcodes/.Sanitize +++ b/opcodes/.Sanitize @@ -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 diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 4f6d6030c20..61d646d8004 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -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 + + * Makefile.in (distclean): Remove generated file config.h. + +Sat Aug 5 16:50:14 1995 Fred Fish + + * Makefile.in (distclean): Remove generated file config.h. + +Wed Aug 2 18:33:40 1995 Ian Lance Taylor + + * 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 * sparc-dis.c (HASH_SIZE, HASH_INSN): Define. diff --git a/opcodes/sh-opc.h b/opcodes/sh-opc.h index e3d989dcea1..a3baf912a87 100644 --- a/opcodes/sh-opc.h +++ b/opcodes/sh-opc.h @@ -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 #, */{"add",{A_IMM,A_REG_N},{HEX_7,REG_N,IMM_8}}, @@ -150,12 +179,24 @@ sh_opcode_info sh_table[]={ /* 0100nnnn00101010 lds ,PR */{"lds",{A_REG_N,A_PR},{HEX_4,REG_N,HEX_2,HEX_A}}, +/* start-sanitize-sh3e */ +/* 0100nnnn01011010 lds ,FPUL */{"lds",{A_REG_M,FPUL_N},{HEX_4,REG_M,HEX_5,HEX_A}}, + +/* 0100nnnn01101010 lds ,FPSCR */{"lds",{A_REG_M,FPSCR_N},{HEX_4,REG_M,HEX_6,HEX_A}}, +/* end-sanitize-sh3e + /* 0100nnnn00000110 lds.l @+,MACH*/{"lds.l",{A_INC_N,A_MACH},{HEX_4,REG_N,HEX_0,HEX_6}}, /* 0100nnnn00010110 lds.l @+,MACL*/{"lds.l",{A_INC_N,A_MACL},{HEX_4,REG_N,HEX_1,HEX_6}}, /* 0100nnnn00100110 lds.l @+,PR */{"lds.l",{A_INC_N,A_PR},{HEX_4,REG_N,HEX_2,HEX_6}}, +/* start-sanitize-sh3e */ +/* 0100nnnn01010110 lds.l @+,FPUL*/{"lds.l",{A_INC_M,FPUL_N},{HEX_4,REG_M,HEX_5,HEX_6}}, + +/* 0100nnnn01100110 lds.l @+,FPSCR*/{"lds.l",{A_INC_M,FPSCR_N},{HEX_4,REG_M,HEX_6,HEX_6}}, +/* end-sanitize-sh3e */ + /* 0100nnnnmmmm1111 mac.w @+,@+*/{"mac.w",{A_INC_M,A_INC_N},{HEX_4,REG_N,REG_M,HEX_F}}, /* 1110nnnni8*1.... mov #, */{"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 ,*/{"shad",{ A_REG_M,A_REG_N},{HEX_4,REG_N,REG_M,HEX_C}}, /* 0100nnnnmmmm1101 shld ,*/{"shld",{ A_REG_M,A_REG_N},{HEX_4,REG_N,REG_M,HEX_D}}, -/* end-sanitize-sh3 */ + /* 0100nnnn00100000 shal */{"shal",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_0}}, /* 0100nnnn00100001 shar */{"shar",{A_REG_N},{HEX_4,REG_N,HEX_2,HEX_1}}, @@ -309,12 +349,24 @@ sh_opcode_info sh_table[]={ /* 0000nnnn00101010 sts PR, */{"sts",{A_PR,A_REG_N},{HEX_0,REG_N,HEX_2,HEX_A}}, +/* start-sanitize-sh3e */ +/* 0100nnnn01011010 sts FPUL, */{"sts",{FPUL_M,A_REG_N},{HEX_4,REG_N,HEX_5,HEX_A}}, + +/* 0100nnnn01101010 sts FPSCR, */{"sts",{FPSCR_M,A_REG_N},{HEX_4,REG_N,HEX_6,HEX_A}}, +/* end-sanitize-sh3e */ + /* 0100nnnn00000010 sts.l MACH,@-*/{"sts.l",{A_MACH,A_DEC_N},{HEX_4,REG_N,HEX_0,HEX_2}}, /* 0100nnnn00010010 sts.l MACL,@-*/{"sts.l",{A_MACL,A_DEC_N},{HEX_4,REG_N,HEX_1,HEX_2}}, /* 0100nnnn00100010 sts.l PR,@- */{"sts.l",{A_PR,A_DEC_N},{HEX_4,REG_N,HEX_2,HEX_2}}, +/* start-sanitize-sh3e */ +/* 0100nnnn01010110 sts.l FPUL,@-*/{"sts.l",{FPUL_M,A_DEC_M},{HEX_4,REG_N,HEX_5,HEX_6}}, + +/* 0100nnnn01100110 sts.l FPSCR,@-*/{"sts.l",{FPSCR_M,A_DEC_N},{HEX_4,REG_N,HEX_6,HEX_6}}, +/* end-sanitize-sh3e */ + /* 0011nnnnmmmm1000 sub , */{"sub",{ A_REG_M,A_REG_N},{HEX_3,REG_N,REG_M,HEX_8}}, /* 0011nnnnmmmm1010 subc ,*/{"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 @+,@+*/{"mac.l",{A_INC_M,A_INC_N},{HEX_0,REG_N,REG_M,HEX_F}}, /* 0000nnnn00100011 braf */{"braf",{A_REG_N},{HEX_0,REG_N,HEX_2,HEX_3}}, /* 0000nnnn00000011 bsrf */{"bsrf",{A_REG_N},{HEX_0,REG_N,HEX_0,HEX_3}}, -0}; +/* start-sanitize-sh3e */ +/* 1111nnnn01011101 fabs */{"fabs",{F_REG_N},{HEX_F,REG_N,HEX_5,HEX_D}}, +/* 1111nnnnmmmm0000 fadd ,*/{"fadd",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_0}}, +/* 1111nnnnmmmm0100 fcmp/eq ,*/{"fcmp/eq",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_4}}, +/* 1111nnnnmmmm0101 fcmp/gt ,*/{"fcmp/gt",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_5}}, +/* 1111nnnnmmmm0011 fdiv ,*/{"fdiv",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_3}}, +/* 1111nnnn10001101 fldi0 */{"fldi0",{F_REG_N},{HEX_F,REG_N,HEX_8,HEX_D}}, +/* 1111nnnn10011101 fldi1 */{"fldi1",{F_REG_N},{HEX_F,REG_N,HEX_9,HEX_D}}, +/* 1111nnnn00011101 flds ,FPUL*/{"flds",{F_REG_N,FPUL_M},{HEX_F,REG_N,HEX_1,HEX_D}}, +/* 1111nnnn00101101 float FPUL,*/{"float",{FPUL_M,F_REG_N},{HEX_F,REG_N,HEX_2,HEX_D}}, +/* 1111nnnnmmmm1110 fmac ,*/{"fmac",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_E}}, +/* 1111nnnnmmmm1100 fmov ,*/{"fmov",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_C}}, +/* 1111nnnnmmmm1000 fmov.s @,*/{"fmov.s",{A_IND_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_8}}, +/* 1111nnnnmmmm1010 fmov.s ,@*/{"fmov.s",{F_REG_M,A_IND_N},{HEX_F,REG_N,REG_M,HEX_A}}, +/* 1111nnnnmmmm1001 fmov.s @+,*/{"fmov.s",{A_INC_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_9}}, +/* 1111nnnnmmmm1011 fmov.s ,@-*/{"fmov.s",{F_REG_M,A_DEC_N},{HEX_F,REG_N,REG_M,HEX_B}}, +/* 1111nnnnmmmm0110 fmov.s @(R0,),*/{"fmov.s",{A_IND_R0_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_6}}, +/* 1111nnnnmmmm0111 fmov.s ,@(R0,)*/{"fmov.s",{F_REG_M,A_IND_R0_REG_N},{HEX_F,REG_N,REG_M,HEX_7}}, +/* 1111nnnnmmmm0010 fmul ,*/{"fmul",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_2}}, +/* 1111nnnn01001101 fneg */{"fneg",{F_REG_N},{HEX_F,REG_N,HEX_4,HEX_D}}, +/* 1111nnnn01101101 fsqrt */{"fsqrt",{F_REG_N},{HEX_F,REG_N,HEX_6,HEX_D}}, +/* 1111nnnn00001101 fsts FPUL,*/{"fsts",{FPUL_M,F_REG_N},{HEX_F,REG_N,HEX_0,HEX_D}}, +/* 1111nnnnmmmm0001 fsub ,*/{"fsub",{F_REG_M,F_REG_N},{HEX_F,REG_N,REG_M,HEX_1}}, +/* 1111nnnn00111101 ftrc ,FPUL*/{"ftrc",{F_REG_N,FPUL_N},{HEX_F,REG_N,HEX_3,HEX_D}}, +/* 1111nnnn01111101 ftst/nan */{"ftst/nan",{F_REG_N},{HEX_F,REG_N,HEX_7,HEX_D}}, +/* end-sanitize-sh3e */ +{ 0 } +}; + #endif