mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 08:13:37 +08:00
b8891f8d62
This patch series is a new binutils port for C-SKY processors, including support for both the V1 and V2 processor variants. V1 is derived from the MCore architecture while V2 is substantially different, with mixed 16- and 32-bit instructions, a larger register set, a different (but overlapping) ABI, etc. There is support for bare-metal ELF targets and Linux with both glibc and uClibc. This code is being contributed jointly by C-SKY Microsystems and Mentor Graphics. C-SKY is responsible for the technical content and has proposed Lifang Xia and Yunhai Shang as port maintainers. (Note that C-SKY does have a corporate copyright assignment on file with the FSF.) Mentor Graphics' role has been cleaning up the code, adding documentation and additional test cases, etc, to address issues we anticipated reviewers would complain about. bfd * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES): Add C-SKY. (BFD32_BACKENDS, BFD_BACKENDS_CFILES): Likewise. * Makefile.in: Regenerated. * archures.c (enum bfd_architecture): Add bfd_arch_csky and related bfd_mach defines. (bfd_csky_arch): Declare. (bfd_archures_list): Add C-SKY. * bfd-in.h (elf32_csky_build_stubs): Declare. (elf32_csky_size_stubs): Declare. (elf32_csky_next_input_section: Declare. (elf32_csky_setup_section_lists): Declare. * bfd-in2.h: Regenerated. * config.bfd: Add C-SKY. * configure.ac: Likewise. * configure: Regenerated. * cpu-csky.c: New file. * elf-bfd.h (enum elf_target_id): Add C-SKY. * elf32-csky.c: New file. * libbfd.h: Regenerated. * reloc.c: Add C-SKY relocations. * targets.c (csky_elf32_be_vec, csky_elf32_le_vec): Declare. (_bfd_target_vector): Add C-SKY target vector entries. binutils* readelf.c: Include elf/csky.h. (guess_is_rela): Handle EM_CSKY. (dump_relocations): Likewise. (get_machine_name): Likewise. (is_32bit_abs_reloc): Likewise. include * dis-asm.h (csky_symbol_is_valid): Declare. * opcode/csky.h: New file. opcodes * Makefile.am (TARGET_LIBOPCODES_CFILES): Add csky-dis.c. * Makefile.in: Regenerated. * configure.ac: Add C-SKY. * configure: Regenerated. * csky-dis.c: New file. * csky-opc.h: New file. * disassemble.c (ARCH_csky): Define. (disassembler, disassemble_init_for_target): Add case for ARCH_csky. * disassemble.h (print_insn_csky, csky_get_disassembler): Declare. gas * Makefile.am (TARGET_CPU_CFILES): Add entry for C-SKY. (TARGET_CPU_HFILES, TARGET_ENV_HFILES): Likewise. * Makefile.in: Regenerated. * config/tc-csky.c: New file. * config/tc-csky.h: New file. * config/te-csky_abiv1.h: New file. * config/te-csky_abiv1_linux.h: New file. * config/te-csky_abiv2.h: New file. * config/te-csky_abiv2_linux.h: New file. * configure.tgt: Add C-SKY. * doc/Makefile.am (CPU_DOCS): Add entry for C-SKY. * doc/Makefile.in: Regenerated. * doc/all.texi: Set CSKY feature. * doc/as.texi (Overview): Add C-SKY options. (Machine Dependencies): Likewise. * doc/c-csky.texi: New file. * testsuite/gas/csky/*: New test cases. ld * Makefile.am (ALL_EMULATION_SOURCES): Add C-SKY emulations. (ecskyelf.c, ecskyelf_linux.c): New rules. * Makefile.in: Regenerated. * configure.tgt: Add C-SKY. * emulparams/cskyelf.sh: New file. * emulparams/cskyelf_linux.sh: New file. * emultempl/cskyelf.em: New file. * gen-doc.texi: Add C-SKY. * ld.texi: Likewise. (Options specific to C-SKY targets): New section. * testsuite/ld-csky/*: New tests.
107 lines
5.7 KiB
C
107 lines
5.7 KiB
C
/* Header only used inside opcodes library for disassemble.
|
|
|
|
Copyright (C) 2017-2018 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 3, 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., 51 Franklin Street - Fifth Floor,
|
|
Boston, MA 02110-1301, USA. */
|
|
|
|
#ifndef DISASSEMBLE_H
|
|
#define DISASSEMBLE_H
|
|
#include "dis-asm.h"
|
|
|
|
extern int print_insn_aarch64 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_alpha (bfd_vma, disassemble_info *);
|
|
extern int print_insn_avr (bfd_vma, disassemble_info *);
|
|
extern int print_insn_bfin (bfd_vma, disassemble_info *);
|
|
extern int print_insn_big_arm (bfd_vma, disassemble_info *);
|
|
extern int print_insn_big_mips (bfd_vma, disassemble_info *);
|
|
extern int print_insn_big_nios2 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_big_powerpc (bfd_vma, disassemble_info *);
|
|
extern int print_insn_big_score (bfd_vma, disassemble_info *);
|
|
extern int print_insn_cr16 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_crx (bfd_vma, disassemble_info *);
|
|
extern int print_insn_csky (bfd_vma, disassemble_info *);
|
|
extern int print_insn_d10v (bfd_vma, disassemble_info *);
|
|
extern int print_insn_d30v (bfd_vma, disassemble_info *);
|
|
extern int print_insn_dlx (bfd_vma, disassemble_info *);
|
|
extern int print_insn_epiphany (bfd_vma, disassemble_info *);
|
|
extern int print_insn_fr30 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_frv (bfd_vma, disassemble_info *);
|
|
extern int print_insn_ft32 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_h8300 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_h8300h (bfd_vma, disassemble_info *);
|
|
extern int print_insn_h8300s (bfd_vma, disassemble_info *);
|
|
extern int print_insn_hppa (bfd_vma, disassemble_info *);
|
|
extern int print_insn_i386 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_i386_att (bfd_vma, disassemble_info *);
|
|
extern int print_insn_i386_intel (bfd_vma, disassemble_info *);
|
|
extern int print_insn_ia64 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_ip2k (bfd_vma, disassemble_info *);
|
|
extern int print_insn_iq2000 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_little_nios2 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_riscv (bfd_vma, disassemble_info *);
|
|
extern int print_insn_little_arm (bfd_vma, disassemble_info *);
|
|
extern int print_insn_little_mips (bfd_vma, disassemble_info *);
|
|
extern int print_insn_little_powerpc (bfd_vma, disassemble_info *);
|
|
extern int print_insn_little_score (bfd_vma, disassemble_info *);
|
|
extern int print_insn_lm32 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_m32r (bfd_vma, disassemble_info *);
|
|
extern int print_insn_m68hc11 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_m68hc12 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_m9s12x (bfd_vma, disassemble_info *);
|
|
extern int print_insn_m9s12xg (bfd_vma, disassemble_info *);
|
|
extern int print_insn_s12z (bfd_vma, disassemble_info *);
|
|
extern int print_insn_m68k (bfd_vma, disassemble_info *);
|
|
extern int print_insn_mcore (bfd_vma, disassemble_info *);
|
|
extern int print_insn_metag (bfd_vma, disassemble_info *);
|
|
extern int print_insn_microblaze (bfd_vma, disassemble_info *);
|
|
extern int print_insn_mmix (bfd_vma, disassemble_info *);
|
|
extern int print_insn_mn10200 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_mn10300 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_moxie (bfd_vma, disassemble_info *);
|
|
extern int print_insn_msp430 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_mt (bfd_vma, disassemble_info *);
|
|
extern int print_insn_nds32 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_nfp (bfd_vma, disassemble_info *);
|
|
extern int print_insn_ns32k (bfd_vma, disassemble_info *);
|
|
extern int print_insn_or1k (bfd_vma, disassemble_info *);
|
|
extern int print_insn_pdp11 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_pj (bfd_vma, disassemble_info *);
|
|
extern int print_insn_pru (bfd_vma, disassemble_info *);
|
|
extern int print_insn_s390 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_spu (bfd_vma, disassemble_info *);
|
|
extern int print_insn_tic30 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_tic4x (bfd_vma, disassemble_info *);
|
|
extern int print_insn_tic54x (bfd_vma, disassemble_info *);
|
|
extern int print_insn_tic6x (bfd_vma, disassemble_info *);
|
|
extern int print_insn_tic80 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_tilegx (bfd_vma, disassemble_info *);
|
|
extern int print_insn_tilepro (bfd_vma, disassemble_info *);
|
|
extern int print_insn_v850 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_vax (bfd_vma, disassemble_info *);
|
|
extern int print_insn_visium (bfd_vma, disassemble_info *);
|
|
extern int print_insn_wasm32 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_xc16x (bfd_vma, disassemble_info *);
|
|
extern int print_insn_xgate (bfd_vma, disassemble_info *);
|
|
extern int print_insn_xstormy16 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_xtensa (bfd_vma, disassemble_info *);
|
|
extern int print_insn_z80 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_z8001 (bfd_vma, disassemble_info *);
|
|
extern int print_insn_z8002 (bfd_vma, disassemble_info *);
|
|
|
|
extern disassembler_ftype csky_get_disassembler (bfd *);
|
|
extern disassembler_ftype rl78_get_disassembler (bfd *);
|
|
#endif /* DISASSEMBLE_H */
|