diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2002-02-08 05:51:04 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2002-02-08 05:51:04 +0000 |
commit | d28847ce8eb6da33e8bc2905fe0b08631360a764 (patch) | |
tree | 473f46355faa44f31d5b66c6843a456c981c5aa0 /opcodes/sh64-opc.h | |
parent | fbca6ad9f37cba55a02e4df8a925b638426ed87e (diff) | |
download | gdb-d28847ce8eb6da33e8bc2905fe0b08631360a764.zip gdb-d28847ce8eb6da33e8bc2905fe0b08631360a764.tar.gz gdb-d28847ce8eb6da33e8bc2905fe0b08631360a764.tar.bz2 |
Contribute sh64-elf.
2001-10-08 Nick Clifton <nickc@cambridge.redhat.com>
* sh64-opc.c: Regenerate.
2001-03-13 DJ Delorie <dj@redhat.com>
* sh64-opc.h: Rename A_RESV_Fx to A_REUSE_PREV so that its
purpose is more obvious.
* sh64-opc.c (shmedia_table): Ditto.
* sh64-dis.c (initialize_shmedia_opcode_mask_table): Ditto.
(print_insn_shmedia): Ditto.
2001-03-12 DJ Delorie <dj@redhat.com>
* sh64-opc.c: Adjust comments to reflect reality: replace bits
3:0 with zeros (not "reserved"), replace "rrrrrr" with
"gggggg" for two-operand floating point opcodes. Remove
"fsina".
2001-01-08 Hans-Peter Nilsson <hpn@cygnus.com>
* sh64-dis.c (print_insn_shmedia) <failing read_memory_func>:
Correct printing of .byte:s. Return number of printed bytes or
-1; never 0.
(print_insn_sh64x) <not CRT_SH5_ISA16>: Ditto. Print as .byte:s
to next four-byte-alignment if insn or data is not aligned.
2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
* sh64-dis.c: Update comments and fix comment formatting.
(initialize_shmedia_opcode_mask_table) <case A_IMMM>:
Abort instead of setting length to 0.
(crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
crange_bsearch_cmpl, sh64_get_contents_type,
sh64_address_in_cranges): Move to bfd/elf32-sh64.c.
2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
* sh64-opc.c: Remove #if 0:d entries for instructions not found in
SH-5/ST50-023-04: fcosa.s, fsrra.s and prefo.
2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
* sh64-dis.c (print_insn_shmedia): Display MOVI/SHORI-formed
address with same prefix as SHcompact.
In the disassembler, use a .cranges section for linked executables.
* sh64-dis.c (SAVED_MOVI_R, SAVED_MOVI_IMM): Move to head of file
and update for using structure in info->private_data.
(struct sh64_disassemble_info): New.
(is_shmedia_p): Delete.
(crange_qsort_cmpb): New function.
(crange_qsort_cmpl, crange_bsearch_cmpb): New functions.
(crange_bsearch_cmpl, sh64_address_in_cranges): New functions.
(init_sh64_disasm_info, sh64_get_contents_type_disasm): New functions.
(sh64_get_contents_type, sh64_address_is_shmedia): New functions.
(print_insn_shmedia): Correct displaying of address after MOVI/SHORI
pair. Display addresses for linked executables only.
(print_insn_sh64x_media): Initialize info->private_data by calling
init_sh64_disasm_info.
(print_insn_sh64x): Ditto. Find out type of contents by calling
sh64_contents_type_disasm. Display data regions using ".long" and
".byte" similar to unrecognized opcodes.
2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
* sh64-dis.c (is_shmedia_p): Check info->section and look for ISA
information in section flags before considering symbols. Don't
assume an info->mach setting of bfd_mach_sh5 means SHmedia code.
* configure.in (bfd_sh_arch): Check presence of sh64 insns by
matching $target $canon_targets instead of looking at the
now-removed -DINCLUDE_SHMEDIA in $targ_cflags.
* configure: Regenerate.
2000-11-25 Hans-Peter Nilsson <hpn@cygnus.com>
* sh64-opc.c (shmedia_creg_table): New.
* sh64-opc.h (shmedia_creg_info): New type.
(shmedia_creg_table): Declare.
* sh64-dis.c (creg_name): New function.
(print_insn_shmedia): Use it.
* disassemble.c (disassembler) [ARCH_sh, INCLUDE_SHMEDIA]: Map
bfd_mach_sh5 to print_insn_sh64 if big-endian and to
print_insn_sh64l if little-endian.
* sh64-dis.c (print_insn_shmedia): Make r unsigned.
(print_insn_sh64l): New.
(print_insn_sh64x): New.
(print_insn_sh64x_media): New.
(print_insn_sh64): Break out code to print_insn_sh64x and
print_insn_sh64x_media.
2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
* sh64-opc.h: New file
* sh64-opc.c: New file
* sh64-dis.c: New file
* Makefile.am: Add sh64 targets.
(HFILES): Add sh64-opc.h.
(CFILES): Add sh64-opc.c and sh64-dis.c.
(ALL_MACHINES): Add sh64 files.
* Makefile.in: Regenerate.
* configure.in: Add support for sh64 to bfd_sh_arch.
* configure: Regenerate.
* disassemble.c [ARCH_all] (INCLUDE_SHMEDIA): Define.
(disassembler) [ARCH_sh, INCLUDE_SHMEDIA]: Map bfd_mach_sh5 to
print_insn_sh64.
* sh-dis.c (print_insn_shx): Handle bfd_mach_sh5 as arch_sh4.
* po/POTFILES.in: Regenerate.
* po/opcodes.pot: Regenerate.
Diffstat (limited to 'opcodes/sh64-opc.h')
-rw-r--r-- | opcodes/sh64-opc.h | 139 |
1 files changed, 139 insertions, 0 deletions
diff --git a/opcodes/sh64-opc.h b/opcodes/sh64-opc.h new file mode 100644 index 0000000..2ed6c11 --- /dev/null +++ b/opcodes/sh64-opc.h @@ -0,0 +1,139 @@ +/* Declarations for SH64 opcodes. + Copyright (C) 2000, 2001 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. */ + +#ifndef _SH64_OPC_INCLUDED_H +#define _SH64_OPC_INCLUDED_H + +typedef enum +{ + /* A placeholder. */ + OFFSET_NONE = 0, + + /* Bit number for where to insert operand. */ + OFFSET_4 = 4, + OFFSET_9 = 9, + OFFSET_10 = 10, + OFFSET_20 = 20 +} shmedia_nibble_type; + +typedef enum { + /* First a placeholder. */ + A_NONE = 0, + + /* Registers. */ + A_GREG_M, + A_GREG_N, + A_GREG_D, + A_FREG_G, + A_FREG_H, + A_FREG_F, + A_DREG_G, + A_DREG_H, + A_DREG_F, + A_FVREG_G, + A_FVREG_H, + A_FVREG_F, + A_FMREG_G, + A_FMREG_H, + A_FMREG_F, + A_FPREG_G, + A_FPREG_H, + A_FPREG_F, + A_TREG_A, + A_TREG_B, + A_CREG_K, + A_CREG_J, + + /* This one is only used in a shmedia_get_operand. */ + A_IMMM, + + /* Copy of previous register. */ + A_REUSE_PREV, + + /* Unsigned 5-bit operand. */ + A_IMMU5, + + /* Signed 6-bit operand. */ + A_IMMS6, + + /* Signed operand, 6 bits << 5. */ + A_IMMS6BY32, + + /* Unsigned 6-bit operand. */ + A_IMMU6, + + /* Signed 10-bit operand. */ + A_IMMS10, + + /* Signed operand, 10 bits << 0. */ + A_IMMS10BY1, + + /* Signed operand, 10 bits << 1. */ + A_IMMS10BY2, + + /* Signed operand, 10 bits << 2. */ + A_IMMS10BY4, + + /* Signed operand, 10 bits << 3. */ + A_IMMS10BY8, + + /* Signed 16-bit operand. */ + A_IMMS16, + + /* Unsigned 16-bit operand. */ + A_IMMU16, + + /* PC-relative signed operand, 16 bits << 2, for PTA and PTB insns. */ + A_PCIMMS16BY4, + + /* PC relative signed operand, 16 bits << 2, for PT insns. Also adjusts + the opcode to be PTA or PTB. */ + A_PCIMMS16BY4_PT, +} shmedia_arg_type; + +typedef struct { + char *name; + shmedia_arg_type arg[4]; + shmedia_nibble_type nibbles[4]; + unsigned long opcode_base; +} shmedia_opcode_info; + +extern const shmedia_opcode_info shmedia_table[]; + +typedef struct { + int cregno; + char *name; +} shmedia_creg_info; + +extern const shmedia_creg_info shmedia_creg_table[]; + +#define SHMEDIA_LIKELY_BIT 0x00000200 +#define SHMEDIA_PT_OPC 0xe8000000 +#define SHMEDIA_PTB_BIT 0x04000000 +#define SHMEDIA_PTA_OPC 0xe8000000 +#define SHMEDIA_PTB_OPC 0xec000000 + +/* Note that this is ptrel/u. "Or" in SHMEDIA_LIKELY_BIT for ptrel/l. */ +#define SHMEDIA_PTREL_OPC 0x6bf50000 +#define SHMEDIA_MOVI_OPC 0xcc000000 +#define SHMEDIA_SHORI_OPC 0xc8000000 +#define SHMEDIA_ADDI_OPC 0xd0000000 +#define SHMEDIA_ADD_OPC 0x00090000 +#define SHMEDIA_NOP_OPC 0x6ff0fff0 +#define SHMEDIA_TEMP_REG 25 + +#endif /* _SH64_OPC_INCLUDED_H */ |