* elf32-mips.c (elf_mips_howto_table_rel): Change definition of
[deliverable/binutils-gdb.git] / gas / config / tc-mips.h
index a17c64216936b6006eeae69f51fe0f0a9848ccc2..e566d330519e562b59159041db5fd7f23d3e6d5f 100644 (file)
@@ -1,5 +1,6 @@
 /* tc-mips.h -- header file for tc-mips.c.
-   Copyright (C) 1993, 94, 95, 96, 97, 1999 Free Software Foundation, Inc.
+   Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003
+   Free Software Foundation, Inc.
    Contributed by the OSF and Ralph Campbell.
    Written by Keith Knowles and Ralph Campbell, working independently.
    Modified for ECOFF support by Ian Lance Taylor of Cygnus Support.
@@ -37,7 +38,6 @@ struct expressionS;
 
 #define TARGET_ARCH bfd_arch_mips
 
-#define ONLY_STANDARD_ESCAPES
 #define WORKING_DOT_WORD       1
 #define OLD_FLOAT_READS
 #define REPEAT_CONS_EXPRESSIONS
@@ -45,24 +45,27 @@ struct expressionS;
 #define MAX_RELOC_EXPANSION 3
 #define LOCAL_LABELS_FB 1
 
-/* Maximum symbol offset that can be encoded in a BFD_RELOC_MIPS_GPREL
+/* Maximum symbol offset that can be encoded in a BFD_RELOC_GPREL16
    relocation: */
-#define MAX_GPREL_OFFSET (0x7FF4)
+#define MAX_GPREL_OFFSET (0x7FF0)
 
-#define md_relax_frag(fragp, stretch) mips_relax_frag(fragp, stretch)
-extern int mips_relax_frag PARAMS ((struct frag *, long));
+#define md_relax_frag(segment, fragp, stretch) \
+  mips_relax_frag(segment, fragp, stretch)
+extern int mips_relax_frag PARAMS ((asection *, struct frag *, long));
 
 #define md_undefined_symbol(name)      (0)
 #define md_operand(x)
 
-extern int mips_do_align PARAMS ((int, const char *, int, int));
-#define md_do_align(n,fill,len,max,l) if (mips_do_align (n,fill,len,max)) goto l
+extern void mips_handle_align PARAMS ((struct frag *));
+#define HANDLE_ALIGN(fragp)  mips_handle_align (fragp)
+
+#define MAX_MEM_FOR_RS_ALIGN_CODE  (1 + 2)
 
 /* We permit PC relative difference expressions when generating
    embedded PIC code.  */
 #define DIFF_EXPR_OK
 
-/* Tell assembler that we have an itbl_mips.h header file to include. */
+/* Tell assembler that we have an itbl_mips.h header file to include.  */
 #define HAVE_ITBL_CPU
 
 /* The endianness of the target format may change based on command
@@ -70,17 +73,39 @@ extern int mips_do_align PARAMS ((int, const char *, int, int));
 #define TARGET_FORMAT mips_target_format()
 extern const char *mips_target_format PARAMS ((void));
 
+/* MIPS PIC level.  */
+
+enum mips_pic_level
+{
+  /* Do not generate PIC code.  */
+  NO_PIC,
+
+  /* Generate PIC code as in the SVR4 MIPS ABI.  */
+  SVR4_PIC,
+
+  /* Generate PIC code without using a global offset table: the data
+     segment has a maximum size of 64K, all data references are off
+     the $gp register, and all text references are PC relative.  This
+     is used on some embedded systems.  */
+  EMBEDDED_PIC
+};
+
+extern enum mips_pic_level mips_pic;
+
 struct mips_cl_insn
 {
   unsigned long insn_opcode;
   const struct mips_opcode *insn_mo;
   /* The next two fields are used when generating mips16 code.  */
-  boolean use_extend;
+  bfd_boolean use_extend;
   unsigned short extend;
 };
 
 extern int tc_get_register PARAMS ((int frame));
 
+#define md_after_parse_args() mips_after_parse_args()
+extern void mips_after_parse_args PARAMS ((void));
+
 #define tc_init_after_args() mips_init_after_args()
 extern void mips_init_after_args PARAMS ((void));
 
@@ -93,7 +118,7 @@ extern void mips_define_label PARAMS ((symbolS *));
 #define tc_frob_file_before_adjust() mips_frob_file_before_adjust ()
 extern void mips_frob_file_before_adjust PARAMS ((void));
 
-#define tc_frob_file() mips_frob_file ()
+#define tc_frob_file_before_fix() mips_frob_file ()
 extern void mips_frob_file PARAMS ((void));
 
 #if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
@@ -101,21 +126,20 @@ extern void mips_frob_file PARAMS ((void));
 extern void mips_frob_file_after_relocs PARAMS ((void));
 #endif
 
-#define TC_CONS_FIX_NEW cons_fix_new_mips
-extern void cons_fix_new_mips
-  PARAMS ((struct frag *, int, unsigned int, struct expressionS *));
-
 #define tc_fix_adjustable(fixp) mips_fix_adjustable (fixp)
 extern int mips_fix_adjustable PARAMS ((struct fix *));
 
+/* Global syms must not be resolved, to support ELF shared libraries.
+   When generating embedded code, we don't have shared libs.  */
+#define EXTERN_FORCE_RELOC                     \
+  (OUTPUT_FLAVOR == bfd_target_elf_flavour     \
+   && mips_pic != EMBEDDED_PIC)
+
 /* When generating embedded PIC code we must keep PC relative
    relocations.  */
-#define TC_FORCE_RELOCATION(fixp) mips_force_relocation (fixp)
+#define TC_FORCE_RELOCATION(FIX) mips_force_relocation (FIX)
 extern int mips_force_relocation PARAMS ((struct fix *));
 
-/* md_apply_fix sets fx_done correctly.  */
-#define TC_HANDLE_FX_DONE 1
-
 /* Register mask variables.  These are set by the MIPS assembly code
    and used by ECOFF and possibly other object file formats.  */
 extern unsigned long mips_gprmask;
@@ -142,6 +166,7 @@ extern void md_mips_end PARAMS ((void));
 #define md_end()       md_mips_end()
 
 #define USE_GLOBAL_POINTER_OPT (OUTPUT_FLAVOR == bfd_target_ecoff_flavour \
+                                || OUTPUT_FLAVOR == bfd_target_coff_flavour \
                                 || OUTPUT_FLAVOR == bfd_target_elf_flavour)
 
 extern void mips_pop_insert PARAMS ((void));
@@ -153,4 +178,10 @@ extern void mips_flush_pending_output PARAMS ((void));
 extern void mips_enable_auto_align PARAMS ((void));
 #define md_elf_section_change_hook()   mips_enable_auto_align()
 
+extern enum dwarf2_format mips_dwarf2_format PARAMS ((void));
+#define DWARF2_FORMAT() mips_dwarf2_format ()
+
+#define DWARF2_ADDR_SIZE(bfd) \
+  (DWARF2_FORMAT () == dwarf2_format_32bit ? 4 : 8)
+
 #endif /* TC_MIPS */
This page took 0.02957 seconds and 4 git commands to generate.