old-cross-binutils/gas/config/tc-microblaze.h
Nick Clifton 7ba29e2a41 Add support for Xilinx MicroBlaze processor.
* bfd/Makefile.am: Add cpu-microblaze.{lo,c}, elf32-microblaze.{lo,c}.
        * bfd/Makefile.in: Same.
        * bfd/archures.c: Add bfd_arch_microblaze.
        * bfd/bfd-in2.h: Regenerate.
        * bfd/config.bfd: Add microblaze target.
        * bfd/configure: Add bfd_elf32_microblaze_vec target.
        * bfd/configure.in: Same.
        * bfd/cpu-microblaze.c: New.
        * bfd/elf32-microblaze.c: New.
        * bfd/libbfd-in.h: Add prototype _bfd_dwarf2_fixup_section_debug_loc().
        * bfd/libbfd.h: Regenerate.
        * bfd/reloc.c: Add MICROBLAZE relocations.
        * bfd/section.c: Add struct relax_table and relax_count to section.
        * bfd/targets.c: Add bfd_elf32_microblaze_vec.
        * binutils/MAINTAINERS: Add self as maintainer.
        * binutils/readelf.c: Include elf/microblaze.h, add EM_MICROBLAZE &
        EM_MICROBLAZE_OLD to guess_is_rela(), dump_relocations(),
        get_machine_name().
        * config.sub: Add microblaze target.
        * configure: Same.
        * configure.ac: Same.
        * gas/Makefile.am: add microblaze to CPU_TYPES, config/tc-microblaze.c to
        TARGET_CPU_CFILES, config/tc-microblaze.h to TARGET_CPU_HFILES, add
        DEP_microblaze_elf target.
        * gas/Makefile.in: Same.
        * gas/config/tc-microblaze.c: Add MicroBlaze assembler.
        * gas/config/tc-microblaze.h: Add header for tc-microblaze.c.
        * gas/configure: Add microblaze target.
        * gas/configure.in: Same.
        * gas/configure.tgt: Same.
        * gas/doc/Makefile.am: Add c-microblaze.texi to CPU_DOCS.
        * gas/doc/Makefile.in: Same.
        * gas/doc/all.texi: Set MICROBLAZE.
        * gas/doc/as.texinfo: Add MicroBlaze doc links.
        * gas/doc/c-microblaze.texi: New MicroBlaze docs.
        * include/dis-asm.h: Decl print_insn_microblaze().
        * include/elf/common.h: Define EM_MICROBLAZE & EM_MICROBLAZE_OLD.
        * include/elf/microblaze.h: New reloc definitions.
        * ld/Makefile.am: Add eelf32mb_linux.o, eelf32microblaze.o to
        ALL_EMULATIONS, targets.
        * ld/Makefile.in: Same.
        * ld/configure.tgt: Add microblaze*-linux*, microblaze* targets.
        * ld/emulparams/elf32mb_linux.sh: New.
        * ld/emulparams/elf32microblaze.sh. New.
        * ld/scripttempl/elfmicroblaze.sc: New.
        * opcodes/Makefile.am: Add microblaze-opc.h to HFILES, microblaze-dis.c to
        CFILES, microblaze-dis.lo to ALL_MACHINES, targets.
        * opcodes/Makefile.in: Same.
        * opcodes/configure: Add bfd_microblaze_arch target.
        * opcodes/configure.in: Same.
        * opcodes/disassemble.c: Define ARCH_microblaze, return
        print_insn_microblaze().
        * opcodes/microblaze-dis.c: New MicroBlaze disassembler.
        * opcodes/microblaze-opc.h: New MicroBlaze opcode definitions.
        * opcodes/microblaze-opcm.h: New MicroBlaze opcode types.
2009-08-06 17:38:04 +00:00

114 lines
4.1 KiB
C

/* tc-microblaze.h -- Header file for tc-microblaze.c.
Copyright 2009 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. */
#ifndef TC_MICROBLAZE
#define TC_MICROBLAZE 1
#define TARGET_ARCH bfd_arch_microblaze
/* Used to initialise target_big_endian. */
#define TARGET_BYTES_BIG_ENDIAN 1
#define IGNORE_NONSTANDARD_ESCAPES
#define TC_RELOC_MANGLE(a,b,c) tc_reloc_mangle (a, b, c)
/* We need to handle expressions of type "symbol op symbol" and create
relocs for such expressions as -relax in linker can change the value
of such expressions */
#define TC_CONS_FIX_NEW cons_fix_new_microblaze
#define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) parse_cons_expression_microblaze (EXP, NBYTES)
extern void parse_cons_expression_microblaze PARAMS ((expressionS *, int));
#define TC_FORCE_RELOCATION_SECTION(FIXP,SEG) 1
#define UNDEFINED_DIFFERENCE_OK 1
#define TC_FORCE_RELOCATION_LOCAL(FIX) \
(!(FIX)->fx_pcrel \
|| (FIX)->fx_r_type == BFD_RELOC_MICROBLAZE_64_GOT \
|| (FIX)->fx_r_type == BFD_RELOC_MICROBLAZE_64_PLT \
|| (FIX)->fx_r_type == BFD_RELOC_MICROBLAZE_64_GOTOFF \
|| (FIX)->fx_r_type == BFD_RELOC_MICROBLAZE_32_GOTOFF \
|| TC_FORCE_RELOCATION (FIX))
#define tc_fix_adjustable(X) tc_microblaze_fix_adjustable(X)
extern int tc_microblaze_fix_adjustable (struct fix *);
extern const struct relax_type md_relax_table[];
#define TC_GENERIC_RELAX_TABLE md_relax_table
/* We don't need to handle .word strangely. */
#define WORKING_DOT_WORD
#define LISTING_HEADER "Xilinx MicroBlaze GAS Listing"
#define LISTING_LHS_CONT_LINES 4
#define NEED_FX_R_TYPE 1
/* We want local label support. */
#define LOCAL_LABELS_FB 1
/* Want the section information too... */
#define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section (FIXP, SEC)
#define MD_APPLY_FIX3 /* We want the segment as well. */
/* We set the fx_done field appropriately in md_apply_fix. */
#define TC_HANDLES_FX_DONE
#ifdef OBJ_ELF
#define TARGET_FORMAT (target_big_endian ? "elf32-microblaze" : "elf32-microblaze-little")
#define ELF_TC_SPECIAL_SECTIONS \
{ ".sdata", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, \
{ ".sbss", SHT_NOBITS, SHF_ALLOC + SHF_WRITE }, \
{ ".sdata2", SHT_PROGBITS, SHF_ALLOC }, \
{ ".sbss2", SHT_PROGBITS, SHF_ALLOC }, \
/* Other special sections not generated by the assembler: .reginfo,
.liblist, .conflict, .gptab, .got, .dynamic, .rel.dyn. */
#endif /* OBJ_ELF */
#ifndef TARGET_FORMAT
# error No target format specified.
#endif
#include "write.h" /* For definition of fixS */
extern void md_begin (void);
extern void md_assemble (char *);
extern symbolS * md_undefined_symbol (char *);
extern char * md_atof (int, char *, int *);
extern int md_parse_option (int, char *);
extern void md_show_usage (FILE *);
extern void md_convert_frag (bfd *, segT, fragS *);
extern void md_operand (expressionS *);
extern int md_estimate_size_before_relax (fragS *, segT);
extern void md_number_to_chars (char *, valueT, int);
extern valueT md_section_align (segT, valueT);
extern long md_pcrel_from_section (fixS *, segT);
extern arelent * tc_gen_reloc (asection *, fixS *);
extern void cons_fix_new_microblaze (fragS *, int, int, expressionS *);
extern void md_apply_fix3 (fixS *, valueT *, segT);
#define EXTERN_FORCE_RELOC -1
#endif /* TC_MICROBLAZE */