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