1207753Smm/* tc-s12z.h -- Header file for tc-s12z.c. 2207753Smm Copyright (C) 1999-2022 Free Software Foundation, Inc. 3207753Smm 4207753Smm This file is part of GAS, the GNU Assembler. 5207753Smm 6207753Smm GAS is free software; you can redistribute it and/or modify 7207753Smm it under the terms of the GNU General Public License as published by 8207753Smm the Free Software Foundation; either version 3, or (at your option) 9207753Smm any later version. 10207753Smm 11207753Smm GAS is distributed in the hope that it will be useful, 12207753Smm but WITHOUT ANY WARRANTY; without even the implied warranty of 13207753Smm MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14207753Smm GNU General Public License for more details. 15207753Smm 16207753Smm You should have received a copy of the GNU General Public License 17207753Smm along with GAS; see the file COPYING. If not, write to the Free 18207753Smm Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 19207753Smm 02110-1301, USA. */ 20207753Smm 21207753Smmstruct fix; 22207753Smm 23207753Smm#define TARGET_BYTES_BIG_ENDIAN 1 24207753Smm 25207753Smm/* Motorola assembler specs does not require '.' before pseudo-ops. */ 26207753Smm#define NO_PSEUDO_DOT 1 27207753Smm 28207753Smm/* The target BFD architecture. */ 29207753Smm#define TARGET_ARCH (s12z_arch ()) 30207753Smmextern enum bfd_architecture s12z_arch (void); 31207753Smm 32207753Smm#define TARGET_MACH (s12z_mach ()) 33207753Smmextern int s12z_mach (void); 34207753Smm 35207753Smm#define TARGET_FORMAT (s12z_arch_format ()) 36207753Smmextern const char *s12z_arch_format (void); 37207753Smm 38207753Smm#define LISTING_WORD_SIZE 1 /* A word is 1 bytes */ 39207753Smm#define LISTING_LHS_WIDTH 4 /* One word on the first line */ 40207753Smm#define LISTING_LHS_WIDTH_SECOND 4 /* One word on the second line */ 41207753Smm#define LISTING_LHS_CONT_LINES 4 /* And 4 lines max */ 42207753Smm#define LISTING_HEADER s12z_listing_header () 43207753Smmextern const char *s12z_listing_header (void); 44207753Smm 45207753Smm/* Permit temporary numeric labels. */ 46207753Smm#define LOCAL_LABELS_FB 1 47207753Smm 48207753Smm#define tc_init_after_args s12z_init_after_args 49207753Smmextern void s12z_init_after_args (void); 50207753Smm 51207753Smm#define md_parse_long_option s12z_parse_long_option 52207753Smmextern int s12z_parse_long_option (char *); 53207753Smm 54207753Smm#define DWARF2_LINE_MIN_INSN_LENGTH 1 55207753Smm 56207753Smm/* Use 32-bit address to represent a symbol address so that we can 57207753Smm represent them with their page number. */ 58207753Smm#define DWARF2_ADDR_SIZE(bfd) 4 59207753Smm 60207753Smm/* We don't need to handle .word strangely. */ 61207753Smm#define WORKING_DOT_WORD 62207753Smm 63207753Smm#define md_number_to_chars number_to_chars_bigendian 64207753Smm 65207753Smm/* Relax table to translate short relative branches (-128..127) into 66207753Smm absolute branches. */ 67207753Smm#define TC_GENERIC_RELAX_TABLE md_relax_table 68207753Smmextern struct relax_type md_relax_table[]; 69207753Smm 70207753Smm/* GAS only handles relaxations for pc-relative data targeting addresses 71207753Smm in the same segment, so we have to handle the rest on our own. */ 72207753Smm#define md_relax_frag(SEG, FRAGP, STRETCH) \ 73207753Smm ((FRAGP)->fr_symbol != NULL \ 74207753Smm && S_GET_SEGMENT ((FRAGP)->fr_symbol) == (SEG) \ 75207753Smm ? relax_frag (SEG, FRAGP, STRETCH) \ 76207753Smm : s12z_relax_frag (SEG, FRAGP, STRETCH)) 77207753Smmextern long s12z_relax_frag (segT, fragS*, long); 78207753Smm 79207753Smm#define TC_HANDLES_FX_DONE 80207753Smm 81207753Smm#define DIFF_EXPR_OK /* .-foo gets turned into PC relative relocs */ 82207753Smm 83207753Smm/* Values passed to md_apply_fix don't include the symbol value. */ 84207753Smm#define MD_APPLY_SYM_VALUE(FIX) 0 85207753Smm 86207753Smm/* No shared lib support, so we don't need to ensure externally 87207753Smm visible symbols can be overridden. */ 88207753Smm#define EXTERN_FORCE_RELOC 0 89207753Smm 90207753Smm#define TC_FORCE_RELOCATION(fix) tc_s12z_force_relocation (fix) 91207753Smmextern int tc_s12z_force_relocation (struct fix *); 92207753Smm 93207753Smm#define tc_fix_adjustable(X) tc_s12z_fix_adjustable(X) 94207753Smmextern bool tc_s12z_fix_adjustable (struct fix *); 95207753Smm 96207753Smm#define md_operand(x) 97207753Smm 98207753Smm#define elf_tc_final_processing s12z_elf_final_processing 99207753Smmextern void s12z_elf_final_processing (void); 100207753Smm 101207753Smm#define tc_print_statistics(FILE) s12z_print_statistics (FILE) 102207753Smmextern void s12z_print_statistics (FILE *); 103207753Smm