99c513f6ac
* configure.ac (rl78-*-*) New case. * configure: Regenerate. [bfd] * Makefile.am (ALL_MACHINES): Add cpu-rl78.lo. (ALL_MACHINES_CFILES): Add cpu-rl78.c. (BFD32_BACKENDS): Add elf32-rl78.lo. (BFD32_BACKENDS_CFILES): Add elf32-rl78.c. (Makefile.in): Regenerate. * archures.c (bfd_architecture): Define bfd_arch_rl78. (bfd_archures_list): Add bfd_rl78_arch. * config.bfd: Add rl78-*-elf. * configure.in: Add bfd_elf32_rl78_vec. * reloc.c (bfd_reloc_code_type): Add BFD_RELOC_RL78_* relocations. * targets.c (bfd_target_vector): Add bfd_elf32_rl78_vec. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * libbfd.h: Regenerate. * cpu-rl78.c: New file. * elf32-rl78.c: New file. [binutils] * readelf.c: Include elf/rl78.h (guess_is_rela): Handle EM_RL78. (dump_relocations): Likewise. (get_machine_name): Likewise. (is_32bit_abs_reloc): Likewise. * NEWS: Mention addition of RL78 support. * MAINTAINERS: Add myself as RL78 port maintainer. [gas] * Makefile.am (TARGET_CPU_CFILES): Add tc-rl78.c. (TARGET_CPU_HFILES): Add rc-rl78.h. (EXTRA_DIST): Add rl78-parse.c and rl78-parse.y. (rl78-parse.c, rl78-parse.h, rl78-parse.o, rl78-defs.h): New rules. * Makefile.in: Regenerate. * configure.in: Add rl78 case. * configure: Regenerate. * configure.tgt: Add rl78 case. * config/rl78-defs.h: New file. * config/rl78-parse.y: New file. * config/tc-rl78.c: New file. * config/tc-rl78.h: New file. * NEWS: Add Renesas RL78. * doc/Makefile.am (c-rl78.texi): New. * doc/Makefile.in: Likewise. * doc/all.texi: Enable it. * doc/as.texi: Add it. [include] * dis-asm.h (print_insn_rl78): Declare. [include/elf] * common.h (EM_RL78, EM_78K0R): New. * rl78.h: New. [include/opcode] * rl78.h: New file. [ld] * Makefile.am (ALL_EMULATION_SOURCES): Add eelf32rl78.c. (+eelf32rl78.c): New rule. * Makefile.in: Regenerate. * configure.tgt: Add rl78-*-* case. * emulparams/elf32rl78.sh: New file. * NEWS: Mention addition of Renesas RL78 support. [opcodes] * Makefile.am (TARGET_LIBOPCODES_CFILES): Add rl78-decode.c and rl78-dis.c. (MAINTAINERCLEANFILES): Add rl78-decode.c. (rl78-decode.c): New rule, built from rl78-decode.opc and opc2c. * Makefile.in: Regenerate. * configure.in: Add bfd_rl78_arch case. * configure: Regenerate. * disassemble.c: Define ARCH_rl78. (disassembler): Add ARCH_rl78 case. * rl78-decode.c: New file. * rl78-decode.opc: New file. * rl78-dis.c: New file.
75 lines
2.3 KiB
C
75 lines
2.3 KiB
C
/* tc-rl78.h - header file for Renesas RL78
|
|
Copyright 2011
|
|
Free Software Foundation, Inc.
|
|
|
|
This file is part of GAS, the GNU Assembler.
|
|
|
|
GAS 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.
|
|
|
|
GAS 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 GAS; see the file COPYING. If not, write to the Free
|
|
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
|
|
02110-1301, USA. */
|
|
|
|
#define TC_RL78
|
|
|
|
extern int target_little_endian;
|
|
|
|
#define LISTING_HEADER "RL78 GAS LE"
|
|
#define LISTING_LHS_WIDTH 8
|
|
#define LISTING_WORD_SIZE 1
|
|
|
|
#define TARGET_ARCH bfd_arch_rl78
|
|
|
|
#define TARGET_BYTES_BIG_ENDIAN 0
|
|
|
|
#define TARGET_FORMAT "elf32-rl78"
|
|
|
|
/* We don't need to handle .word strangely. */
|
|
#define WORKING_DOT_WORD
|
|
|
|
/* Permit temporary numeric labels. */
|
|
#define LOCAL_LABELS_FB 1
|
|
/* But make sure that the binutils treat them as locals. */
|
|
#define LOCAL_LABEL_PREFIX '.'
|
|
|
|
/* Allow classic-style constants. */
|
|
#define NUMBERS_WITH_SUFFIX 1
|
|
|
|
/* .-foo gets turned into PC relative relocs. */
|
|
#define DIFF_EXPR_OK
|
|
|
|
#define md_end rl78_md_end
|
|
extern void rl78_md_end (void);
|
|
|
|
#define TC_FRAG_TYPE struct rl78_bytesT *
|
|
#define TC_FRAG_INIT rl78_frag_init
|
|
extern void rl78_frag_init (fragS *);
|
|
|
|
/* Call md_pcrel_from_section(), not md_pcrel_from(). */
|
|
#define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section (FIXP, SEC)
|
|
extern long md_pcrel_from_section (struct fix *, segT);
|
|
|
|
/* RL78 doesn't have a 32 bit PCREL relocations. */
|
|
#define TC_FORCE_RELOCATION_SUB_LOCAL(FIX, SEG) 1
|
|
|
|
#define TC_VALIDATE_FIX_SUB(FIX, SEG) \
|
|
rl78_validate_fix_sub (FIX)
|
|
extern int rl78_validate_fix_sub (struct fix *);
|
|
|
|
#define TC_CONS_FIX_NEW(FRAG, WHERE, NBYTES, EXP) \
|
|
rl78_cons_fix_new (FRAG, WHERE, NBYTES, EXP)
|
|
extern void rl78_cons_fix_new (fragS *, int, int, expressionS *);
|
|
|
|
#define tc_fix_adjustable(x) 0
|
|
|
|
#define RELOC_EXPANSION_POSSIBLE 1
|
|
#define MAX_RELOC_EXPANSION 8
|