Back to index

cell-binutils  2.17cvs20070401
tc-z80.h
Go to the documentation of this file.
00001 /* this is tc-z80.h
00002    Copyright 2005 Free Software Foundation, Inc.
00003 
00004    Contributed by Arnold Metselaar <arnold_m@operamail.com>
00005 
00006    This file is part of GAS, the GNU Assembler.
00007 
00008    GAS is free software; you can redistribute it and/or modify
00009    it under the terms of .the GNU General Public License as published by
00010    the Free Software Foundation; either version 2, or (at your option)
00011    any later version.
00012 
00013    GAS is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016    GNU General Public License for more details.
00017 
00018    You should have received a copy of the GNU General Public License
00019    along with GAS; see the file COPYING.  If not, write to the Free
00020    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
00021    02110-1301, USA.  */
00022 
00023 #ifndef TC_Z80
00024 #define TC_Z80
00025 
00026 #define TARGET_ARCH   bfd_arch_z80
00027 #define BFD_ARCH      TARGET_ARCH
00028 #define COFF_MAGIC    0x5A80
00029 #define TARGET_MACH   0
00030 #define TARGET_BYTES_BIG_ENDIAN  0
00031 
00032 /* If you define this macro, GAS will warn about the
00033    use of nonstandard escape sequences in a string.  */
00034 #define ONLY_STANDARD_ESCAPES
00035 
00036 /* GAS will call this function for any expression that can not be
00037    recognized.  When the function is called, `input_line_pointer'
00038    will point to the start of the expression.  */
00039 #define md_operand(x)
00040 
00041 /* This should just call either `number_to_chars_bigendian' or
00042    `number_to_chars_littleendian', whichever is appropriate.  On
00043    targets like the MIPS which support options to change the
00044    endianness, which function to call is a runtime decision.  On
00045    other targets, `md_number_to_chars' can be a simple macro.  */
00046 #define md_number_to_chars number_to_chars_littleendian
00047 
00048 #define TC_COUNT_RELOC(x) 1
00049 
00050 #define TC_COFF_FIX2RTYPE(fixP) tc_coff_fix2rtype (fixP)
00051 #define md_convert_frag(b,s,f)   as_fatal ("convert_frag called\n")
00052 #define md_estimate_size_before_relax(f,s) \
00053   (as_fatal (_("estimate_size_before_relax called")), 1)
00054 
00055 /* Define some functions to be called by generic code.  */
00056 #define md_end               z80_md_end
00057 #define md_start_line_hook() { if (z80_start_line_hook ()) continue; }
00058 #define TC_CONS_FIX_NEW z80_cons_fix_new
00059 
00060 extern void z80_md_end (void);
00061 extern int z80_start_line_hook (void);
00062 extern void z80_cons_fix_new (fragS *, int, int, expressionS *);
00063 
00064 #define WORKING_DOT_WORD
00065 
00066 /* If you define this macro, it means that `tc_gen_reloc' may return
00067    multiple relocation entries for a single fixup.  In this case, the
00068    return value of `tc_gen_reloc' is a pointer to a null terminated
00069    array.  */
00070 #undef RELOC_EXPANSION_POSSIBLE
00071 
00072 /* No shared lib support, so we don't need to ensure
00073    externally visible symbols can be overridden.  */
00074 #define EXTERN_FORCE_RELOC 0
00075 
00076 /* Values passed to md_apply_fix3 don't include the symbol value.  */
00077 #define MD_APPLY_SYM_VALUE(FIX) 0
00078 
00079 #define LISTING_WORD_SIZE 2
00080 
00081 /* A single '=' is accepted as a comparison operator.  */
00082 #define O_SINGLE_EQ O_eq
00083 
00084 /* A '$' is used to refer to the current location or as a hex. prefix.  */
00085 #define DOLLAR_DOT
00086 #define DOLLAR_AMBIGU                1
00087 #define LOCAL_LABELS_FB              1
00088 #define LITERAL_PREFIXPERCENT_BIN
00089 #define NUMBERS_WITH_SUFFIX          1
00090 #define NO_PSEUDO_DOT                1
00091 /* We allow single quotes to delimit character constants as
00092    well, but it is cleaner to handle that in tc-z80.c.  */
00093 #define SINGLE_QUOTE_STRINGS
00094 #define NO_STRING_ESCAPES
00095 
00096 /* An `.lcomm' directive with no explicit alignment parameter will
00097    use this macro to set P2VAR to the alignment that a request for
00098    SIZE bytes will have.  The alignment is expressed as a power of
00099    two.  If no alignment should take place, the macro definition
00100    should do nothing.  Some targets define a `.bss' directive that is
00101    also affected by this macro.  The default definition will set
00102    P2VAR to the truncated power of two of sizes up to eight bytes.  */
00103 #define TC_IMPLICIT_LCOMM_ALIGNMENT(SIZE, P2VAR) (P2VAR) = 0
00104 
00105 #endif