Back to index

cell-binutils  2.17cvs20070401
tc-alpha.h
Go to the documentation of this file.
00001 /* This file is tc-alpha.h
00002    Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
00003    2005, 2006
00004    Free Software Foundation, Inc.
00005    Written by Ken Raeburn <raeburn@cygnus.com>.
00006 
00007    This file is part of GAS, the GNU Assembler.
00008 
00009    GAS is free software; you can redistribute it and/or modify
00010    it under the terms of the GNU General Public License as published by
00011    the Free Software Foundation; either version 2, or (at your option)
00012    any later version.
00013 
00014    GAS is distributed in the hope that it will be useful,
00015    but WITHOUT ANY WARRANTY; without even the implied warranty of
00016    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017    GNU General Public License for more details.
00018 
00019    You should have received a copy of the GNU General Public License
00020    along with GAS; see the file COPYING.  If not, write to the Free
00021    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
00022    02110-1301, USA.  */
00023 
00024 #define TC_ALPHA
00025 
00026 #define TARGET_BYTES_BIG_ENDIAN 0
00027 
00028 #define WORKING_DOT_WORD
00029 
00030 #define TARGET_ARCH                bfd_arch_alpha
00031 
00032 #ifdef TE_FreeBSD
00033 #define ELF_TARGET_FORMAT   "elf64-alpha-freebsd"
00034 #endif
00035 #ifndef ELF_TARGET_FORMAT
00036 #define ELF_TARGET_FORMAT   "elf64-alpha"
00037 #endif
00038 
00039 #define TARGET_FORMAT (OUTPUT_FLAVOR == bfd_target_ecoff_flavour      \
00040                      ? "ecoff-littlealpha"                            \
00041                      : OUTPUT_FLAVOR == bfd_target_elf_flavour \
00042                      ? ELF_TARGET_FORMAT                       \
00043                      : OUTPUT_FLAVOR == bfd_target_evax_flavour       \
00044                      ? "vms-alpha"                             \
00045                      : "unknown-format")
00046 
00047 #define NEED_LITERAL_POOL
00048 #define REPEAT_CONS_EXPRESSIONS
00049 
00050 struct fix;
00051 struct alpha_reloc_tag;
00052 
00053 extern int alpha_force_relocation (struct fix *);
00054 extern int alpha_fix_adjustable   (struct fix *);
00055 
00056 extern unsigned long alpha_gprmask, alpha_fprmask;
00057 extern valueT alpha_gp_value;
00058 
00059 #define TC_FORCE_RELOCATION(FIX)   alpha_force_relocation (FIX)
00060 #define tc_fix_adjustable(FIX)            alpha_fix_adjustable (FIX)
00061 #define RELOC_REQUIRES_SYMBOL
00062 
00063 /* Values passed to md_apply_fix don't include the symbol value.  */
00064 #define MD_APPLY_SYM_VALUE(FIX) 0
00065 
00066 #define md_convert_frag(b,s,f)            as_fatal ("alpha convert_frag\n")
00067 #define md_estimate_size_before_relax(f,s) \
00068                      (as_fatal ("estimate_size_before_relax called"),1)
00069 #define md_operand(x)
00070 
00071 #ifdef OBJ_EVAX
00072 
00073 /* This field keeps the symbols position in the link section.  */
00074 #define OBJ_SYMFIELD_TYPE valueT
00075 
00076 #define TC_CONS_FIX_NEW(FRAG,OFF,LEN,EXP) \
00077       fix_new_exp (FRAG, OFF, (int)LEN, EXP, 0, \
00078        LEN == 2 ? BFD_RELOC_16 \
00079        : LEN == 4 ? BFD_RELOC_32 \
00080        : LEN == 8 ? BFD_RELOC_64 \
00081        : BFD_RELOC_ALPHA_LINKAGE);
00082 #endif
00083 
00084 #ifndef VMS
00085 #define TC_IMPLICIT_LCOMM_ALIGNMENT(size, align) \
00086   do                                             \
00087     {                                            \
00088       align = 0;                                 \
00089       if (size > 1)                              \
00090        {                                         \
00091          addressT temp = 1;                      \
00092          while ((size & temp) == 0)                     \
00093            ++align, temp <<= 1;                  \
00094        }                                         \
00095     }                                            \
00096   while (0)
00097 #endif
00098 
00099 #define md_number_to_chars         number_to_chars_littleendian
00100 
00101 extern int tc_get_register (int);
00102 extern void alpha_frob_ecoff_data (void);
00103 
00104 #define tc_frob_label(sym) alpha_define_label (sym)
00105 extern void alpha_define_label (symbolS *);
00106 
00107 #define md_cons_align(nbytes) alpha_cons_align (nbytes)
00108 extern void alpha_cons_align (int);
00109 
00110 #define HANDLE_ALIGN(fragp) alpha_handle_align (fragp)
00111 extern void alpha_handle_align (struct frag *);
00112 
00113 #define MAX_MEM_FOR_RS_ALIGN_CODE  (3 + 4 + 8)
00114 
00115 #ifdef OBJ_ECOFF
00116 #define tc_frob_file_before_adjust() alpha_frob_file_before_adjust ()
00117 extern void alpha_frob_file_before_adjust (void);
00118 #endif
00119 
00120 #define DIFF_EXPR_OK   /* foo-. gets turned into PC relative relocs.  */
00121 
00122 #ifdef OBJ_ELF
00123 #define md_elf_section_letter             alpha_elf_section_letter
00124 extern int alpha_elf_section_letter (int, char **);
00125 #define md_elf_section_flags              alpha_elf_section_flags
00126 extern flagword alpha_elf_section_flags (flagword, int, int);
00127 #endif
00128 
00129 /* Whether to add support for explicit !relocation_op!sequence_number.  At the
00130    moment, only do this for ELF, though ECOFF could use it as well.  */
00131 
00132 #ifdef OBJ_ELF
00133 #define RELOC_OP_P
00134 #endif
00135 
00136 /* Before the relocations are written, reorder them, so that user
00137    supplied !lituse relocations follow the appropriate !literal
00138    relocations.  Also convert the gas-internal relocations to the
00139    appropriate linker relocations.  */
00140 #define tc_frob_file_before_fix() alpha_before_fix ()
00141 extern void alpha_before_fix (void);
00142 
00143 #ifdef OBJ_ELF
00144 #define md_end  alpha_elf_md_end
00145 extern void alpha_elf_md_end (void);
00146 #endif
00147 
00148 /* New fields for supporting explicit relocations (such as !literal to mark
00149    where a pointer is loaded from the global table, and !lituse_base to track
00150    all of the normal uses of that pointer).  */
00151 
00152 #define TC_FIX_TYPE struct alpha_fix_tag
00153 
00154 struct alpha_fix_tag
00155 {
00156   struct fix *next_reloc;          /* Next !lituse or !gpdisp.  */
00157   struct alpha_reloc_tag *info;           /* Other members with same sequence.  */
00158 };
00159 
00160 /* Initialize the TC_FIX_TYPE field.  */
00161 #define TC_INIT_FIX_DATA(FIX)                                         \
00162 do {                                                           \
00163   FIX->tc_fix_data.next_reloc = NULL;                                 \
00164   FIX->tc_fix_data.info = NULL;                                       \
00165 } while (0)
00166 
00167 /* Work with DEBUG5 to print fields in tc_fix_type.  */
00168 #define TC_FIX_DATA_PRINT(STREAM, FIX)                                \
00169 do {                                                           \
00170   if (FIX->tc_fix_data.info)                                          \
00171     fprintf (STREAM, "\tinfo = 0x%lx, next_reloc = 0x%lx\n", \
00172             (long) FIX->tc_fix_data.info,                      \
00173             (long) FIX->tc_fix_data.next_reloc);               \
00174 } while (0)
00175 
00176 #define TARGET_USE_CFIPOP 1
00177 
00178 #define tc_cfi_frame_initial_instructions alpha_cfi_frame_initial_instructions
00179 extern void alpha_cfi_frame_initial_instructions (void);
00180 
00181 #define DWARF2_LINE_MIN_INSN_LENGTH       4
00182 #define DWARF2_DEFAULT_RETURN_COLUMN      26
00183 #define DWARF2_CIE_DATA_ALIGNMENT  (-8)