Home | History | Annotate | Line # | Download | only in config
      1   1.1  christos /* tc-bfin.h - header file for tc-bfin.c
      2  1.10  christos    Copyright (C) 2005-2025 Free Software Foundation, Inc.
      3   1.1  christos 
      4   1.1  christos    This file is part of GAS, the GNU Assembler.
      5   1.1  christos 
      6   1.1  christos    GAS is free software; you can redistribute it and/or modify
      7   1.1  christos    it under the terms of the GNU General Public License as published by
      8   1.1  christos    the Free Software Foundation; either version 3, or (at your option)
      9   1.1  christos    any later version.
     10   1.1  christos 
     11   1.1  christos    GAS is distributed in the hope that it will be useful,
     12   1.1  christos    but WITHOUT ANY WARRANTY; without even the implied warranty of
     13   1.1  christos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     14   1.1  christos    GNU General Public License for more details.
     15   1.1  christos 
     16   1.1  christos    You should have received a copy of the GNU General Public License
     17   1.1  christos    along with GAS; see the file COPYING.  If not, write to the Free
     18   1.1  christos    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
     19   1.1  christos    02110-1301, USA.  */
     20   1.1  christos 
     21   1.1  christos #define TC_BFIN 1
     22   1.1  christos #define TC_ADI_BFIN 1
     23   1.1  christos 
     24   1.1  christos #define TARGET_BYTES_BIG_ENDIAN 0
     25   1.1  christos 
     26   1.1  christos #define TARGET_ARCH		bfd_arch_bfin
     27   1.1  christos 
     28   1.1  christos /*
     29   1.1  christos  * Define the target format macro here.   The value for this should be
     30   1.1  christos  * "elf32-bfin", not "elf32-little-bfin".  Since the BFD source file
     31   1.1  christos  * elf32-bfin.c defines TARGET_LITTLE_NAME to be "elf32-little-bfin",
     32   1.1  christos  * we must use this value, until this is corrected and BFD is rebuilt.  */
     33   1.1  christos #ifdef OBJ_ELF
     34   1.1  christos #define TARGET_FORMAT		"elf32-bfin"
     35   1.1  christos #endif
     36   1.1  christos 
     37   1.1  christos #define LISTING_HEADER "BFIN GAS "
     38   1.1  christos 
     39   1.1  christos #define WORKING_DOT_WORD
     40   1.1  christos 
     41   1.8  christos extern bool bfin_start_label (char *);
     42   1.1  christos 
     43   1.1  christos #define md_number_to_chars	number_to_chars_littleendian
     44   1.1  christos #define md_convert_frag(b,s,f)	as_fatal ("bfin convert_frag\n");
     45   1.1  christos 
     46   1.1  christos /* Allow for [, ], etc.  */
     47  1.10  christos #define LEX_BR (LEX_BEGIN_NAME | LEX_END_NAME)
     48   1.1  christos 
     49   1.1  christos #define TC_EOL_IN_INSN(PTR) (bfin_eol_in_insn(PTR) ? 1 : 0)
     50   1.8  christos extern bool bfin_eol_in_insn (char *);
     51   1.1  christos 
     52   1.1  christos /* Almost all instructions of Blackfin contain an = character.  */
     53   1.8  christos #define TC_EQUAL_IN_INSN(C, NAME) (NAME[0] != '.' || NAME[1] != 0)
     54   1.1  christos 
     55   1.1  christos #define NOP_OPCODE 0x0000
     56   1.1  christos 
     57   1.1  christos #define LOCAL_LABELS_FB 1
     58   1.1  christos 
     59   1.1  christos #define DOUBLESLASH_LINE_COMMENTS
     60   1.1  christos 
     61   1.3  christos #define TC_START_LABEL(STR, NUL_CHAR, NEXT_CHAR)	\
     62   1.3  christos   (NEXT_CHAR == ':' && bfin_start_label (STR))
     63   1.1  christos #define tc_fix_adjustable(FIX) bfin_fix_adjustable (FIX)
     64   1.8  christos extern bool bfin_fix_adjustable (struct fix *);
     65   1.1  christos 
     66   1.1  christos #define TC_FORCE_RELOCATION(FIX) bfin_force_relocation (FIX)
     67   1.1  christos extern int bfin_force_relocation (struct fix *);
     68   1.1  christos 
     69   1.1  christos /* Call md_pcrel_from_section(), not md_pcrel_from().  */
     70   1.1  christos #define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from_section (FIX, SEC)
     71   1.1  christos 
     72   1.1  christos /* Values passed to md_apply_fix3 don't include symbol values.  */
     73   1.1  christos #define MD_APPLY_SYM_VALUE(FIX) 0
     74   1.1  christos 
     75   1.1  christos /* This target is buggy, and sets fix size too large.  */
     76   1.1  christos #define TC_FX_SIZE_SLACK(FIX) 2
     77   1.1  christos 
     78   1.1  christos extern unsigned int bfin_anomaly_checks;
     79   1.1  christos 
     80   1.1  christos /* Anomaly checking */
     81   1.1  christos #define AC_05000074 0x00000001
     82   1.1  christos #define ENABLE_AC_05000074 (bfin_anomaly_checks & AC_05000074)
     83   1.1  christos 
     84   1.1  christos /* end of tc-bfin.h */
     85