merge from gcc
[deliverable/binutils-gdb.git] / gas / config / tc-i386.h
index aa5d13c8ef844531cff1b1193daaa849ee3c38dc..33275bd7b0fb0224c85df93c740c798845d808e3 100644 (file)
@@ -71,13 +71,11 @@ extern unsigned long i386_mach (void);
 #endif
 
 #if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \
-     || defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF))
+     || defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) \
+     || defined (TE_PE) || defined (TE_PEP) || defined (OBJ_MACH_O))
 extern const char *i386_target_format (void);
 #define TARGET_FORMAT i386_target_format ()
 #else
-#ifdef OBJ_ELF
-#define TARGET_FORMAT          ELF_TARGET_FORMAT
-#endif
 #ifdef OBJ_AOUT
 #define TARGET_FORMAT          AOUT_TARGET_FORMAT
 #endif
@@ -90,6 +88,10 @@ extern void i386_elf_emit_arch_note (void);
 
 #define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) 0
 
+/* '$' may be used as immediate prefix.  */
+#undef LOCAL_LABELS_DOLLAR
+#define LOCAL_LABELS_DOLLAR 0
+#undef LOCAL_LABELS_FB
 #define LOCAL_LABELS_FB 1
 
 extern const char extra_symbol_chars[];
@@ -136,6 +138,12 @@ extern int tc_i386_fix_adjustable (struct fix *);
   (OUTPUT_FLAVOR == bfd_target_elf_flavour)
 #endif
 
+/* BSF_GNU_INDIRECT_FUNCTION symbols always need relocatoon.  */
+#define TC_FORCE_RELOCATION(FIX)                       \
+  ((symbol_get_bfdsym ((FIX)->fx_addsy)->flags         \
+    & BSF_GNU_INDIRECT_FUNCTION)                       \
+   || generic_force_reloc (FIX))
+
 /* This expression evaluates to true if the relocation is for a local
    object for which we still want to do the relocation at runtime.
    False if we are willing to perform this relocation while building
@@ -153,6 +161,12 @@ extern int tc_i386_fix_adjustable (struct fix *);
 extern int i386_parse_name (char *, expressionS *, char *);
 #define md_parse_name(s, e, m, c) i386_parse_name (s, e, c)
 
+extern operatorT i386_operator (const char *name, unsigned int operands, char *);
+#define md_operator i386_operator
+
+extern int i386_need_index_operator (void);
+#define md_need_index_operator i386_need_index_operator
+
 #define md_register_arithmetic 0
 
 extern const struct relax_type md_relax_table[];
@@ -187,6 +201,51 @@ void i386_print_statistics (FILE *);
 
 #define md_number_to_chars number_to_chars_littleendian
 
+enum processor_type
+{
+  PROCESSOR_UNKNOWN,
+  PROCESSOR_I386,
+  PROCESSOR_I486,
+  PROCESSOR_PENTIUM,
+  PROCESSOR_PENTIUMPRO,
+  PROCESSOR_PENTIUM4,
+  PROCESSOR_NOCONA,
+  PROCESSOR_CORE,
+  PROCESSOR_CORE2,
+  PROCESSOR_COREI7,
+  PROCESSOR_K6,
+  PROCESSOR_ATHLON,
+  PROCESSOR_K8,
+  PROCESSOR_GENERIC32,
+  PROCESSOR_GENERIC64,
+  PROCESSOR_AMDFAM10
+};
+
+extern enum processor_type cpu_arch_tune;
+extern enum processor_type cpu_arch_isa;
+extern i386_cpu_flags cpu_arch_isa_flags;
+
+struct i386_tc_frag_data
+{
+  enum processor_type isa;
+  i386_cpu_flags isa_flags;
+  enum processor_type tune;
+};
+
+/* We need to emit the right NOP pattern in .align frags.  This is
+   done after the text-to-bits assembly pass, so we need to mark it with
+   the isa/tune settings at the time the .align was assembled.  */
+#define TC_FRAG_TYPE struct i386_tc_frag_data
+
+#define TC_FRAG_INIT(FRAGP)                                    \
+ do                                                            \
+   {                                                           \
+     (FRAGP)->tc_frag_data.isa = cpu_arch_isa;                 \
+     (FRAGP)->tc_frag_data.isa_flags = cpu_arch_isa_flags;     \
+     (FRAGP)->tc_frag_data.tune = cpu_arch_tune;               \
+   }                                                           \
+ while (0)
+
 #ifdef SCO_ELF
 #define tc_init_after_args() sco_id ()
 extern void sco_id (void);
@@ -203,8 +262,8 @@ extern unsigned int x86_dwarf2_return_column;
 extern int x86_cie_data_alignment;
 #define DWARF2_CIE_DATA_ALIGNMENT x86_cie_data_alignment
 
-#define tc_regname_to_dw2regnum tc_x86_regname_to_dw2regnum
-extern int tc_x86_regname_to_dw2regnum (char *);
+#define tc_parse_to_dw2regnum tc_x86_parse_to_dw2regnum
+extern void tc_x86_parse_to_dw2regnum (expressionS *);
 
 #define tc_cfi_frame_initial_instructions tc_x86_frame_initial_instructions
 extern void tc_x86_frame_initial_instructions (void);
@@ -212,9 +271,14 @@ extern void tc_x86_frame_initial_instructions (void);
 #define md_elf_section_type(str,len) i386_elf_section_type (str, len)
 extern int i386_elf_section_type (const char *, size_t);
 
+#ifdef TE_SOLARIS
+#define md_fix_up_eh_frame(sec) i386_solaris_fix_up_eh_frame (sec)
+extern void i386_solaris_fix_up_eh_frame (segT);
+#endif
+
 /* Support for SHF_X86_64_LARGE */
-extern int x86_64_section_word (char *, size_t);
-extern int x86_64_section_letter (int, char **);
+extern bfd_vma x86_64_section_word (char *, size_t);
+extern bfd_vma x86_64_section_letter (int, char **);
 #define md_elf_section_letter(LETTER, PTR_MSG) x86_64_section_letter (LETTER, PTR_MSG)
 #define md_elf_section_word(STR, LEN)          x86_64_section_word (STR, LEN)
 
@@ -227,4 +291,7 @@ void tc_pe_dwarf2_emit_offset (symbolS *, unsigned int);
 
 #endif /* TE_PE */
 
+/* X_add_symbol:X_op_symbol (Intel mode only) */
+#define O_full_ptr O_md2
+
 #endif /* TC_I386 */
This page took 0.568708 seconds and 4 git commands to generate.