AArch64: Refactor err_type.
[deliverable/binutils-gdb.git] / gas / config / tc-i386.h
index f6457548a500d1436e4f7edae8e28bf8e6f0975b..5426301025cd19c21b81658802f61258b1d3d9f1 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-i386.h -- Header file for tc-i386.c
-   Copyright (C) 1989-2015 Free Software Foundation, Inc.
+   Copyright (C) 1989-2018 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -90,6 +90,10 @@ extern unsigned long i386_mach (void);
 #define ELF_TARGET_K1OM_FORMAT "elf64-k1om"
 #endif
 
+#ifndef ELF_TARGET_IAMCU_FORMAT
+#define ELF_TARGET_IAMCU_FORMAT        "elf32-iamcu"
+#endif
+
 #if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \
      || defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) \
      || defined (TE_PE) || defined (TE_PEP) || defined (OBJ_MACH_O))
@@ -104,11 +108,6 @@ extern const char *i386_target_format (void);
 #endif
 #endif
 
-#if (defined (OBJ_MAYBE_ELF) || defined (OBJ_ELF))
-#define md_end i386_elf_emit_arch_note
-extern void i386_elf_emit_arch_note (void);
-#endif
-
 #define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) 0
 
 /* '$' may be used as immediate prefix.  */
@@ -171,12 +170,12 @@ extern int tc_i386_fix_adjustable (struct fix *);
    the .o file.  GOTOFF and GOT32 do not need to be checked here because
    they are not pcrel.  .*/
 
-#define TC_FORCE_RELOCATION_LOCAL(FIX)                 \
-  (!(FIX)->fx_pcrel                                    \
-   || (FIX)->fx_r_type == BFD_RELOC_386_PLT32          \
-   || (FIX)->fx_r_type == BFD_RELOC_386_GOTPC          \
-   || (FIX)->fx_r_type == BFD_RELOC_X86_64_GOTPCREL    \
-   || TC_FORCE_RELOCATION (FIX))
+#define TC_FORCE_RELOCATION_LOCAL(FIX)                         \
+  (GENERIC_FORCE_RELOCATION_LOCAL (FIX)                                \
+   || (FIX)->fx_r_type == BFD_RELOC_386_PLT32                  \
+   || (FIX)->fx_r_type == BFD_RELOC_386_GOTPC                  \
+   || (FIX)->fx_r_type == BFD_RELOC_X86_64_GOTPCRELX           \
+   || (FIX)->fx_r_type == BFD_RELOC_X86_64_REX_GOTPCRELX)
 
 extern int i386_parse_name (char *, expressionS *, char *);
 #define md_parse_name(s, e, m, c) i386_parse_name (s, e, c)
@@ -206,15 +205,7 @@ if ((n)                                                                    \
     goto around;                                                       \
   }
 
-#define MAX_MEM_FOR_RS_ALIGN_CODE  31
-
-extern void i386_align_code (fragS *, int);
-
-#define HANDLE_ALIGN(fragP)                                            \
-if (fragP->fr_type == rs_align_code)                                   \
-  i386_align_code (fragP, (fragP->fr_next->fr_address                  \
-                          - fragP->fr_address                          \
-                          - fragP->fr_fix));
+#define MAX_MEM_FOR_RS_ALIGN_CODE 4095
 
 void i386_print_statistics (FILE *);
 #define tc_print_statistics i386_print_statistics
@@ -238,6 +229,7 @@ enum processor_type
   PROCESSOR_COREI7,
   PROCESSOR_L1OM,
   PROCESSOR_K1OM,
+  PROCESSOR_IAMCU,
   PROCESSOR_K6,
   PROCESSOR_ATHLON,
   PROCESSOR_K8,
@@ -274,13 +266,24 @@ struct i386_tc_frag_data
    }                                                           \
  while (0)
 
-#ifdef SCO_ELF
-#define tc_init_after_args() sco_id ()
-extern void sco_id (void);
-#endif
-
 #define WORKING_DOT_WORD 1
 
+/* How to generate NOPs for .nop direct directive.  */
+extern void i386_generate_nops (fragS *, char *, offsetT, int);
+#define md_generate_nops(frag, where, amount, control) \
+  i386_generate_nops ((frag), (where), (amount), (control))
+
+#define HANDLE_ALIGN(fragP)                                            \
+if (fragP->fr_type == rs_align_code)                                   \
+  {                                                                    \
+    offsetT __count = (fragP->fr_next->fr_address                      \
+                      - fragP->fr_address                              \
+                      - fragP->fr_fix);                                \
+    if (__count > 0 && __count <= MAX_MEM_FOR_RS_ALIGN_CODE)           \
+      md_generate_nops (fragP, fragP->fr_literal + fragP->fr_fix,      \
+                       __count, 0);                                    \
+  }
+
 /* We want .cfi_* pseudo-ops for generating unwind info.  */
 #define TARGET_USE_CFIPOP 1
 
@@ -309,10 +312,15 @@ extern void i386_solaris_fix_up_eh_frame (segT);
 
 /* Support for SHF_X86_64_LARGE */
 extern bfd_vma x86_64_section_word (char *, size_t);
-extern bfd_vma x86_64_section_letter (int, char **);
+extern bfd_vma x86_64_section_letter (int, const 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)
 
+#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+extern void x86_cleanup (void);
+#define md_cleanup() x86_cleanup ()
+#endif
+
 #ifdef TE_PE
 
 #define O_secrel O_md1
This page took 0.026523 seconds and 4 git commands to generate.