/* tc-bfin.h - header file for tc-bfin.c
|
/* tc-bfin.h - header file for tc-bfin.c
|
Copyright 2005, 2007
|
Copyright 2005, 2007
|
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
|
|
This file is part of GAS, the GNU Assembler.
|
This file is part of GAS, the GNU Assembler.
|
|
|
GAS is free software; you can redistribute it and/or modify
|
GAS is free software; you can redistribute it and/or modify
|
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
the Free Software Foundation; either version 3, or (at your option)
|
the Free Software Foundation; either version 3, or (at your option)
|
any later version.
|
any later version.
|
|
|
GAS is distributed in the hope that it will be useful,
|
GAS is distributed in the hope that it will be useful,
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
GNU General Public License for more details.
|
GNU General Public License for more details.
|
|
|
You should have received a copy of the GNU General Public License
|
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
|
along with GAS; see the file COPYING. If not, write to the Free
|
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
|
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
|
02110-1301, USA. */
|
02110-1301, USA. */
|
|
|
#define TC_BFIN 1
|
#define TC_BFIN 1
|
#define TC_ADI_BFIN 1
|
#define TC_ADI_BFIN 1
|
|
|
#define TARGET_BYTES_BIG_ENDIAN 0
|
#define TARGET_BYTES_BIG_ENDIAN 0
|
|
|
#define TARGET_ARCH bfd_arch_bfin
|
#define TARGET_ARCH bfd_arch_bfin
|
|
|
/*
|
/*
|
* Define the target format macro here. The value for this should be
|
* Define the target format macro here. The value for this should be
|
* "elf32-bfin", not "elf32-little-bfin". Since the BFD source file
|
* "elf32-bfin", not "elf32-little-bfin". Since the BFD source file
|
* elf32-bfin.c defines TARGET_LITTLE_NAME to be "elf32-little-bfin",
|
* elf32-bfin.c defines TARGET_LITTLE_NAME to be "elf32-little-bfin",
|
* we must use this value, until this is corrected and BFD is rebuilt. */
|
* we must use this value, until this is corrected and BFD is rebuilt. */
|
#ifdef OBJ_ELF
|
#ifdef OBJ_ELF
|
#define TARGET_FORMAT "elf32-bfin"
|
#define TARGET_FORMAT "elf32-bfin"
|
#endif
|
#endif
|
|
|
#define LISTING_HEADER "BFIN GAS "
|
#define LISTING_HEADER "BFIN GAS "
|
|
|
#define WORKING_DOT_WORD
|
#define WORKING_DOT_WORD
|
|
|
extern void bfin_start_line_hook PARAMS ((void));
|
extern void bfin_start_line_hook PARAMS ((void));
|
extern bfd_boolean bfin_start_label PARAMS ((char *));
|
extern bfd_boolean bfin_start_label PARAMS ((char *));
|
|
|
#define md_start_line_hook() bfin_start_line_hook()
|
#define md_start_line_hook() bfin_start_line_hook()
|
#define md_number_to_chars number_to_chars_littleendian
|
#define md_number_to_chars number_to_chars_littleendian
|
#define md_convert_frag(b,s,f) as_fatal ("bfin convert_frag\n");
|
#define md_convert_frag(b,s,f) as_fatal ("bfin convert_frag\n");
|
|
|
/* Allow for [, ], etc. */
|
/* Allow for [, ], etc. */
|
#define LEX_BR 6
|
#define LEX_BR 6
|
|
|
#define TC_EOL_IN_INSN(PTR) (bfin_eol_in_insn(PTR) ? 1 : 0)
|
#define TC_EOL_IN_INSN(PTR) (bfin_eol_in_insn(PTR) ? 1 : 0)
|
extern bfd_boolean bfin_eol_in_insn PARAMS ((char *));
|
extern bfd_boolean bfin_eol_in_insn PARAMS ((char *));
|
|
|
/* Almost all instructions of Blackfin contain an = character. */
|
/* Almost all instructions of Blackfin contain an = character. */
|
#define TC_EQUAL_IN_INSN(C, NAME) 1
|
#define TC_EQUAL_IN_INSN(C, NAME) 1
|
|
|
#define NOP_OPCODE 0x0000
|
#define NOP_OPCODE 0x0000
|
|
|
#define LOCAL_LABELS_FB 1
|
#define LOCAL_LABELS_FB 1
|
|
|
#define DOUBLESLASH_LINE_COMMENTS
|
#define DOUBLESLASH_LINE_COMMENTS
|
|
|
#define TC_START_LABEL(ch ,ptr) (ch == ':' && bfin_start_label (ptr))
|
#define TC_START_LABEL(ch ,ptr) (ch == ':' && bfin_start_label (ptr))
|
#define tc_fix_adjustable(FIX) bfin_fix_adjustable (FIX)
|
#define tc_fix_adjustable(FIX) bfin_fix_adjustable (FIX)
|
extern bfd_boolean bfin_fix_adjustable PARAMS ((struct fix *));
|
extern bfd_boolean bfin_fix_adjustable PARAMS ((struct fix *));
|
|
|
#define TC_FORCE_RELOCATION(FIX) bfin_force_relocation (FIX)
|
#define TC_FORCE_RELOCATION(FIX) bfin_force_relocation (FIX)
|
extern int bfin_force_relocation PARAMS ((struct fix *));
|
extern int bfin_force_relocation PARAMS ((struct fix *));
|
|
|
/* Call md_pcrel_from_section(), not md_pcrel_from(). */
|
/* Call md_pcrel_from_section(), not md_pcrel_from(). */
|
#define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from_section (FIX, SEC)
|
#define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from_section (FIX, SEC)
|
extern long md_pcrel_from_section PARAMS ((struct fix *, segT));
|
extern long md_pcrel_from_section PARAMS ((struct fix *, segT));
|
|
|
/* Values passed to md_apply_fix3 don't include symbol values. */
|
/* Values passed to md_apply_fix3 don't include symbol values. */
|
#define MD_APPLY_SYM_VALUE(FIX) 0
|
#define MD_APPLY_SYM_VALUE(FIX) 0
|
|
|
/* This target is buggy, and sets fix size too large. */
|
/* This target is buggy, and sets fix size too large. */
|
#define TC_FX_SIZE_SLACK(FIX) 2
|
#define TC_FX_SIZE_SLACK(FIX) 2
|
|
|
/* end of tc-bfin.h */
|
/* end of tc-bfin.h */
|
|
|