diff options
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/obj-coff.h | 4 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 27 |
2 files changed, 8 insertions, 23 deletions
diff --git a/gas/config/obj-coff.h b/gas/config/obj-coff.h index 407dcd5..d7e985d 100644 --- a/gas/config/obj-coff.h +++ b/gas/config/obj-coff.h @@ -63,8 +63,8 @@ #ifdef TE_PE #ifdef TE_PEP -extern const char * x86_64_target_format (void); -#define TARGET_FORMAT x86_64_target_format () +extern const char *i386_target_format (void); +#define TARGET_FORMAT i386_target_format () #define COFF_TARGET_FORMAT "pe-x86-64" #else #define TARGET_FORMAT "pe-i386" diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 9d5a923..4514858 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -6115,28 +6115,8 @@ md_show_usage (stream) } -#if defined(TE_PEP) -const char * -x86_64_target_format (void) -{ - if (strcmp (default_arch, "x86_64") == 0) - { - set_code_flag (CODE_64BIT); - return COFF_TARGET_FORMAT; - } - else if (strcmp (default_arch, "i386") == 0) - { - set_code_flag (CODE_32BIT); - return "coff-i386"; - } - - as_fatal (_("Unknown architecture")); - return NULL; -} -#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_PEP)) /* Pick the target format to use. */ @@ -6167,6 +6147,11 @@ i386_target_format (void) as_fatal (_("Unknown architecture")); switch (OUTPUT_FLAVOR) { +#ifdef TE_PEP + case bfd_target_coff_flavour: + return flag_code == CODE_64BIT ? COFF_TARGET_FORMAT : "coff-i386"; + break; +#endif #ifdef OBJ_MAYBE_AOUT case bfd_target_aout_flavour: return AOUT_TARGET_FORMAT; |