| 1 | /* tc-m68hc11.h -- Header file for tc-m68hc11.c. |
| 2 | Copyright (C) 1999, 2000 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 2, 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 GAS; see the file COPYING. If not, write to the Free |
| 18 | Software Foundation, 59 Temple Place - Suite 330, Boston, MA |
| 19 | 02111-1307, USA. */ |
| 20 | |
| 21 | #define TC_M68HC11 |
| 22 | #define TC_M68HC12 |
| 23 | |
| 24 | /* Define TC_M68K so that we can use the MRI mode. */ |
| 25 | #define TC_M68K |
| 26 | |
| 27 | #define TARGET_BYTES_BIG_ENDIAN 1 |
| 28 | |
| 29 | /* Motorola assembler specs does not require '.' before pseudo-ops. */ |
| 30 | #define NO_PSEUDO_DOT 1 |
| 31 | |
| 32 | #if 0 |
| 33 | /* Treat the single quote as a string delimiter. |
| 34 | ??? This does not work at all. */ |
| 35 | #define SINGLE_QUOTE_STRINGS 1 |
| 36 | #endif |
| 37 | |
| 38 | #ifndef BFD_ASSEMBLER |
| 39 | #error M68HC11 support requires BFD_ASSEMBLER |
| 40 | #endif |
| 41 | |
| 42 | /* The target BFD architecture. */ |
| 43 | #define TARGET_ARCH (m68hc11_arch ()) |
| 44 | extern enum bfd_architecture m68hc11_arch PARAMS ((void)); |
| 45 | |
| 46 | #define TARGET_MACH (m68hc11_mach ()) |
| 47 | extern int m68hc11_mach PARAMS ((void)); |
| 48 | |
| 49 | #define TARGET_FORMAT (m68hc11_arch_format ()) |
| 50 | extern const char *m68hc11_arch_format PARAMS ((void)); |
| 51 | |
| 52 | /* Specific sections: |
| 53 | - The .page0 is a data section that is mapped in [0x0000..0x00FF]. |
| 54 | Page0 accesses are faster on the M68HC11. Soft registers used by GCC-m6811 |
| 55 | are located in .page0. |
| 56 | - The .vectors is the data section that represents the interrupt |
| 57 | vectors. */ |
| 58 | #define ELF_TC_SPECIAL_SECTIONS \ |
| 59 | { ".page0", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, \ |
| 60 | { ".vectors", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, |
| 61 | |
| 62 | #define LISTING_WORD_SIZE 1 /* A word is 1 bytes */ |
| 63 | #define LISTING_LHS_WIDTH 4 /* One word on the first line */ |
| 64 | #define LISTING_LHS_WIDTH_SECOND 4 /* One word on the second line */ |
| 65 | #define LISTING_LHS_CONT_LINES 4 /* And 4 lines max */ |
| 66 | #define LISTING_HEADER "M68HC11 GAS " |
| 67 | |
| 68 | /* call md_pcrel_from_section, not md_pcrel_from */ |
| 69 | #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section(FIXP, SEC) |
| 70 | |
| 71 | /* Permit temporary numeric labels. */ |
| 72 | #define LOCAL_LABELS_FB 1 |
| 73 | |
| 74 | #define DIFF_EXPR_OK /* .-foo gets turned into PC relative relocs */ |
| 75 | |
| 76 | extern void m68hc11_init_after_args PARAMS ((void)); |
| 77 | #define tc_init_after_args m68hc11_init_after_args |
| 78 | |
| 79 | extern int m68hc11_parse_long_option PARAMS ((char *)); |
| 80 | #define md_parse_long_option m68hc11_parse_long_option |
| 81 | |
| 82 | extern void m68hc11_end_of_source PARAMS ((void)); |
| 83 | #define md_end() m68hc11_end_of_source () |
| 84 | |
| 85 | #define DWARF2_LINE_MIN_INSN_LENGTH 1 |
| 86 | |
| 87 | /* We don't need to handle .word strangely. */ |
| 88 | #define WORKING_DOT_WORD |
| 89 | |
| 90 | #define md_number_to_chars number_to_chars_bigendian |
| 91 | |
| 92 | /* Relax table to translate short relative branches (-128..127) into |
| 93 | absolute branches. */ |
| 94 | extern struct relax_type md_relax_table[]; |
| 95 | #define TC_GENERIC_RELAX_TABLE md_relax_table |
| 96 | |
| 97 | extern int m68hc11_cleanup PARAMS ((void)); |
| 98 | |
| 99 | #define md_operand(x) |
| 100 | #define md_after_pass_hook() m68hc11_cleanup() |
| 101 | #define md_cleanup() m68hc11_cleanup() |
| 102 | #define md_do_align(a,b,c,d,e) m68hc11_cleanup() |
| 103 | #define tc_frob_label(sym) do {\ |
| 104 | m68hc11_cleanup(); \ |
| 105 | S_SET_VALUE (sym, (valueT) frag_now_fix ()); \ |
| 106 | } while (0) |
| 107 | |
| 108 | #define tc_print_statistics m68hc11_print_statistics |
| 109 | extern void m68hc11_print_statistics PARAMS ((FILE *)); |