Home | History | Annotate | Download | only in config
      1 /* tc-or1k.h -- Header file for tc-or1k.c.
      2    Copyright (C) 2001-2016 Free Software Foundation, Inc.
      3 
      4    This file is part of GAS, the GNU Assembler.
      5 
      6    GAS is free software; you can redistribute it and/or modify
      7    it under the terms of the GNU General Public License as published by
      8    the Free Software Foundation; either version 3, or (at your option)
      9    any later version.
     10 
     11    GAS is distributed in the hope that it will be useful,
     12    but WITHOUT ANY WARRANTY; without even the implied warranty of
     13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     14    GNU General Public License for more details.
     15 
     16    You should have received a copy of the GNU General Public License
     17    along with this program; if not, see <http://www.gnu.org/licenses/> */
     18 
     19 #define TC_OR1K
     20 
     21 #define LISTING_HEADER "Or1k GAS "
     22 
     23 /* The target BFD architecture.  */
     24 #define TARGET_ARCH bfd_arch_or1k
     25 
     26 extern unsigned long or1k_machine;
     27 #define TARGET_MACH (or1k_machine)
     28 
     29 #define TARGET_FORMAT           "elf32-or1k"
     30 #define TARGET_BYTES_BIG_ENDIAN 1
     31 
     32 extern const char or1k_comment_chars [];
     33 #define tc_comment_chars or1k_comment_chars
     34 
     35 /* Permit temporary numeric labels.  */
     36 #define LOCAL_LABELS_FB 1
     37 
     38 #define DIFF_EXPR_OK    1       /* .-foo gets turned into PC relative relocs.  */
     39 
     40 /* We don't need to handle .word strangely.  */
     41 #define WORKING_DOT_WORD
     42 
     43 /* Values passed to md_apply_fix don't include the symbol value.  */
     44 #define MD_APPLY_SYM_VALUE(FIX) 0
     45 
     46 #define md_apply_fix or1k_apply_fix
     47 extern void or1k_apply_fix (struct fix *, valueT *, segT);
     48 
     49 extern bfd_boolean or1k_fix_adjustable (struct fix *);
     50 #define tc_fix_adjustable(FIX) or1k_fix_adjustable (FIX)
     51 
     52 /* Call md_pcrel_from_section(), not md_pcrel_from().  */
     53 extern long md_pcrel_from_section (struct fix *, segT);
     54 #define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from_section (FIX, SEC)
     55 
     56 /* For 8 vs 16 vs 32 bit branch selection.  */
     57 extern const struct relax_type md_relax_table[];
     58 #define TC_GENERIC_RELAX_TABLE md_relax_table
     59 
     60 #define elf_tc_final_processing or1k_elf_final_processing
     61 void or1k_elf_final_processing (void);
     62 
     63 /* Enable cfi directives.  */
     64 #define TARGET_USE_CFIPOP 1
     65 
     66 /* Stack grows to lower addresses and wants 4 byte boundary.  */
     67 #define DWARF2_CIE_DATA_ALIGNMENT -4
     68 
     69 /* Define the column that represents the PC.  */
     70 #define DWARF2_DEFAULT_RETURN_COLUMN 9
     71 
     72 /* or1k instructions are 4 bytes long.  */
     73 #define DWARF2_LINE_MIN_INSN_LENGTH     4
     74 
     75 #define tc_cfi_frame_initial_instructions \
     76     or1k_cfi_frame_initial_instructions
     77 extern void or1k_cfi_frame_initial_instructions (void);
     78