+2007-07-04 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/obj-coff.h (x86_64_target_format): Renamed to ...
+ (i386_target_format): This
+ (TARGET_FORMAT): Use i386_target_format.
+
+ * config/tc-i386.c (x86_64_target_format): Removed.
+ (i386_target_format): Handle PE formats.
+
2007-07-04 Nick Clifton <nickc@redhat.com>
* symbols.c (symbol_relc_make_value): Use bfd_sprintf_vma in order
#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"
}
-#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. */
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;
+2007-07-04 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gas/i386/i386.exp: Run x86-64-nops-1 for x86_64-*-mingw*.
+
2007-07-04 Nick Clifton <nickc@redhat.com>
* gas/mep/relocs.d: Fix expected disassembly to work on 64-bit
run_dump_test "x86-64-io-suffix"
run_dump_test "x86-64-gidt"
run_dump_test "x86-64-nops"
- if ![istarget "x86_64-*-mingw*"] then {
- run_dump_test "x86-64-nops-1"
- }
+ run_dump_test "x86-64-nops-1"
run_dump_test "x86-64-nops-1-k8"
run_dump_test "x86-64-nops-1-nocona"
run_dump_test "x86-64-nops-1-merom"