1*3d8817e4Smiod /* tc-m68hc11.h -- Header file for tc-m68hc11.c.
2*3d8817e4Smiod    Copyright 1999, 2000, 2001, 2002, 2003, 2005
3*3d8817e4Smiod    Free Software Foundation, Inc.
4*3d8817e4Smiod 
5*3d8817e4Smiod    This file is part of GAS, the GNU Assembler.
6*3d8817e4Smiod 
7*3d8817e4Smiod    GAS is free software; you can redistribute it and/or modify
8*3d8817e4Smiod    it under the terms of the GNU General Public License as published by
9*3d8817e4Smiod    the Free Software Foundation; either version 2, or (at your option)
10*3d8817e4Smiod    any later version.
11*3d8817e4Smiod 
12*3d8817e4Smiod    GAS is distributed in the hope that it will be useful,
13*3d8817e4Smiod    but WITHOUT ANY WARRANTY; without even the implied warranty of
14*3d8817e4Smiod    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15*3d8817e4Smiod    GNU General Public License for more details.
16*3d8817e4Smiod 
17*3d8817e4Smiod    You should have received a copy of the GNU General Public License
18*3d8817e4Smiod    along with GAS; see the file COPYING.  If not, write to the Free
19*3d8817e4Smiod    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
20*3d8817e4Smiod    02110-1301, USA.  */
21*3d8817e4Smiod 
22*3d8817e4Smiod #define TC_M68HC11
23*3d8817e4Smiod #define TC_M68HC12
24*3d8817e4Smiod 
25*3d8817e4Smiod struct fix;
26*3d8817e4Smiod 
27*3d8817e4Smiod /* Define TC_M68K so that we can use the MRI mode.  */
28*3d8817e4Smiod #define TC_M68K
29*3d8817e4Smiod 
30*3d8817e4Smiod #define TARGET_BYTES_BIG_ENDIAN 1
31*3d8817e4Smiod 
32*3d8817e4Smiod /* Motorola assembler specs does not require '.' before pseudo-ops.  */
33*3d8817e4Smiod #define NO_PSEUDO_DOT 1
34*3d8817e4Smiod 
35*3d8817e4Smiod /* The target BFD architecture.  */
36*3d8817e4Smiod #define TARGET_ARCH (m68hc11_arch ())
37*3d8817e4Smiod extern enum bfd_architecture m68hc11_arch (void);
38*3d8817e4Smiod 
39*3d8817e4Smiod #define TARGET_MACH (m68hc11_mach ())
40*3d8817e4Smiod extern int m68hc11_mach (void);
41*3d8817e4Smiod 
42*3d8817e4Smiod #define TARGET_FORMAT (m68hc11_arch_format ())
43*3d8817e4Smiod extern const char *m68hc11_arch_format (void);
44*3d8817e4Smiod 
45*3d8817e4Smiod #define LISTING_WORD_SIZE 1	/* A word is 1 bytes */
46*3d8817e4Smiod #define LISTING_LHS_WIDTH 4	/* One word on the first line */
47*3d8817e4Smiod #define LISTING_LHS_WIDTH_SECOND 4	/* One word on the second line */
48*3d8817e4Smiod #define LISTING_LHS_CONT_LINES 4	/* And 4 lines max */
49*3d8817e4Smiod #define LISTING_HEADER m68hc11_listing_header ()
50*3d8817e4Smiod extern const char *m68hc11_listing_header (void);
51*3d8817e4Smiod 
52*3d8817e4Smiod /* Permit temporary numeric labels.  */
53*3d8817e4Smiod #define LOCAL_LABELS_FB 1
54*3d8817e4Smiod 
55*3d8817e4Smiod #define tc_init_after_args m68hc11_init_after_args
56*3d8817e4Smiod extern void m68hc11_init_after_args (void);
57*3d8817e4Smiod 
58*3d8817e4Smiod #define md_parse_long_option m68hc11_parse_long_option
59*3d8817e4Smiod extern int m68hc11_parse_long_option (char *);
60*3d8817e4Smiod 
61*3d8817e4Smiod #define DWARF2_LINE_MIN_INSN_LENGTH 1
62*3d8817e4Smiod 
63*3d8817e4Smiod /* Use 32-bit address to represent a symbol address so that we can
64*3d8817e4Smiod    represent them with their page number.  */
65*3d8817e4Smiod #define DWARF2_ADDR_SIZE(bfd) 4
66*3d8817e4Smiod 
67*3d8817e4Smiod /* We don't need to handle .word strangely.  */
68*3d8817e4Smiod #define WORKING_DOT_WORD
69*3d8817e4Smiod 
70*3d8817e4Smiod #define md_number_to_chars           number_to_chars_bigendian
71*3d8817e4Smiod 
72*3d8817e4Smiod /* Relax table to translate short relative branches (-128..127) into
73*3d8817e4Smiod    absolute branches.  */
74*3d8817e4Smiod #define TC_GENERIC_RELAX_TABLE md_relax_table
75*3d8817e4Smiod extern struct relax_type md_relax_table[];
76*3d8817e4Smiod 
77*3d8817e4Smiod /* GAS only handles relaxations for pc-relative data targeting addresses
78*3d8817e4Smiod    in the same segment, so we have to handle the rest on our own.  */
79*3d8817e4Smiod #define md_relax_frag(SEG, FRAGP, STRETCH)		\
80*3d8817e4Smiod  ((FRAGP)->fr_symbol != NULL				\
81*3d8817e4Smiod   && S_GET_SEGMENT ((FRAGP)->fr_symbol) == (SEG)	\
82*3d8817e4Smiod   ? relax_frag (SEG, FRAGP, STRETCH)			\
83*3d8817e4Smiod   : m68hc11_relax_frag (SEG, FRAGP, STRETCH))
84*3d8817e4Smiod extern long m68hc11_relax_frag (segT, fragS*, long);
85*3d8817e4Smiod 
86*3d8817e4Smiod #define TC_HANDLES_FX_DONE
87*3d8817e4Smiod 
88*3d8817e4Smiod #define DIFF_EXPR_OK		/* .-foo gets turned into PC relative relocs */
89*3d8817e4Smiod 
90*3d8817e4Smiod /* Values passed to md_apply_fix don't include the symbol value.  */
91*3d8817e4Smiod #define MD_APPLY_SYM_VALUE(FIX) 0
92*3d8817e4Smiod 
93*3d8817e4Smiod /* No shared lib support, so we don't need to ensure externally
94*3d8817e4Smiod    visible symbols can be overridden.  */
95*3d8817e4Smiod #define EXTERN_FORCE_RELOC 0
96*3d8817e4Smiod 
97*3d8817e4Smiod #define TC_FORCE_RELOCATION(fix) tc_m68hc11_force_relocation (fix)
98*3d8817e4Smiod extern int tc_m68hc11_force_relocation (struct fix *);
99*3d8817e4Smiod 
100*3d8817e4Smiod #define tc_fix_adjustable(X) tc_m68hc11_fix_adjustable(X)
101*3d8817e4Smiod extern int tc_m68hc11_fix_adjustable (struct fix *);
102*3d8817e4Smiod 
103*3d8817e4Smiod #define md_operand(x)
104*3d8817e4Smiod 
105*3d8817e4Smiod #define elf_tc_final_processing	m68hc11_elf_final_processing
106*3d8817e4Smiod extern void m68hc11_elf_final_processing (void);
107*3d8817e4Smiod 
108*3d8817e4Smiod #define tc_print_statistics(FILE) m68hc11_print_statistics (FILE)
109*3d8817e4Smiod extern void m68hc11_print_statistics (FILE *);
110