tc-m68k.h revision 1.1
1/* This file is tc-m68k.h 2 3 Copyright (C) 1987-1992, 1995 Free Software Foundation, Inc. 4 5 This file is part of GAS, the GNU Assembler. 6 7 GAS is free software; you can redistribute it and/or modify 8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation; either version 2, or (at your option) 10 any later version. 11 12 GAS is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with GAS; see the file COPYING. If not, write to 19 the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 20 21#define TC_M68K 1 22 23#define TARGET_BYTES_BIG_ENDIAN 1 24 25#ifdef OBJ_AOUT 26#ifdef TE_SUN3 27#define TARGET_FORMAT "a.out-sunos-big" 28#else 29#ifdef TE_NetBSD 30#define TARGET_FORMAT "a.out-m68k-netbsd" 31#else 32#define TARGET_FORMAT "a.out-zero-big" 33#endif 34#endif 35#endif 36 37#ifdef OBJ_ELF 38#define TARGET_FORMAT "elf32-m68k" 39#endif 40 41#ifdef TE_APOLLO 42#define COFF_MAGIC APOLLOM68KMAGIC 43#define COFF_AOUTHDR_MAGIC APOLLO_COFF_VERSION_NUMBER 44#undef OBJ_COFF_OMIT_OPTIONAL_HEADER 45#endif 46 47#ifdef TE_LYNX 48#define TARGET_FORMAT "coff-m68k-lynx" 49#endif 50 51#ifndef COFF_MAGIC 52#define COFF_MAGIC MC68MAGIC 53#endif 54#define BFD_ARCH bfd_arch_m68k /* for non-BFD_ASSEMBLER */ 55#define TARGET_ARCH bfd_arch_m68k /* BFD_ASSEMBLER */ 56#define COFF_FLAGS F_AR32W 57#define TC_COUNT_RELOC(x) ((x)->fx_addsy||(x)->fx_subsy) 58 59#define TC_COFF_FIX2RTYPE(fixP) tc_coff_fix2rtype(fixP) 60#define TC_COFF_SIZEMACHDEP(frag) tc_coff_sizemachdep(frag) 61extern int tc_coff_sizemachdep PARAMS ((struct frag *)); 62#ifdef TE_SUN3 63/* This variable contains the value to write out at the beginning of 64 the a.out file. The 2<<16 means that this is a 68020 file instead 65 of an old-style 68000 file */ 66 67#define DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE (2<<16|OMAGIC); /* Magic byte for file header */ 68#endif /* TE_SUN3 */ 69 70#ifndef AOUT_MACHTYPE 71#define AOUT_MACHTYPE m68k_aout_machtype 72extern int m68k_aout_machtype; 73#endif 74 75#define tc_crawl_symbol_chain(a) {;} /* not used */ 76#define tc_headers_hook(a) {;} /* not used */ 77#define tc_aout_pre_write_hook(x) {;} /* not used */ 78 79#define LISTING_WORD_SIZE 2 /* A word is 2 bytes */ 80#define LISTING_LHS_WIDTH 2 /* One word on the first line */ 81#define LISTING_LHS_WIDTH_SECOND 2 /* One word on the second line */ 82#define LISTING_LHS_CONT_LINES 4/* And 4 lines max */ 83#define LISTING_HEADER "68K GAS " 84 85/* Copied from write.c */ 86#define M68K_AIM_KLUDGE(aim, this_state,this_type) \ 87 if (aim==0 && this_state== 4) { /* hard encoded from tc-m68k.c */ \ 88 aim=this_type->rlx_forward+1; /* Force relaxation into word mode */ \ 89 } 90 91#ifndef REGISTER_PREFIX 92#define REGISTER_PREFIX '%' 93#endif 94 95#if !defined (REGISTER_PREFIX_OPTIONAL) 96#if defined (M68KCOFF) || defined (OBJ_ELF) 97#define LOCAL_LABEL(name) (name[0] == '.' \ 98 && (name[1] == 'L' || name[1] == '.')) 99#define FAKE_LABEL_NAME ".L0\001" 100#define REGISTER_PREFIX_OPTIONAL 0 101#else 102#define REGISTER_PREFIX_OPTIONAL 1 103#endif 104#endif /* not def REGISTER_PREFIX and not def OPTIONAL_REGISTER_PREFIX */ 105 106#ifdef TE_DELTA 107/* On the Delta, `%' can occur within a label name. I'm assuming it 108 can't be used as the initial character. If that's not true, more 109 work will be needed to fix this up. */ 110#define LEX_PCT 1 111/* On the Delta, dots are not required before pseudo-ops. */ 112#define NO_PSEUDO_DOT 113#endif 114 115#ifdef BFD_ASSEMBLER 116#define tc_frob_symbol(sym,punt) \ 117 if (S_GET_SEGMENT (sym) == reg_section) punt = 1 118#endif 119 120#define DIFF_EXPR_OK 121 122extern void m68k_init_after_args PARAMS ((void)); 123#define tc_init_after_args m68k_init_after_args 124 125extern int m68k_parse_long_option PARAMS ((char *)); 126#define md_parse_long_option m68k_parse_long_option 127 128#define md_operand(x) 129 130#define TARGET_WORD_SIZE 32 131#define TARGET_ARCH bfd_arch_m68k 132 133extern struct relax_type md_relax_table[]; 134#define TC_GENERIC_RELAX_TABLE md_relax_table 135 136/* end of tc-m68k.h */ 137