This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Fix ISA flags x86_64-*-mingw*


x86_64_target_format doesn't set ISA flags. I checked in this patch
to fold it into i386_target_format.

H.J.
---
gas/

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.

gas/testsuite/

2007-07-04  H.J. Lu  <hongjiu.lu@intel.com>

	* gas/i386/i386.exp: Run x86-64-nops-1 for x86_64-*-mingw*.

--- gas/config/obj-coff.h.w64	2007-07-03 06:45:19.000000000 -0700
+++ gas/config/obj-coff.h	2007-07-04 08:04:47.000000000 -0700
@@ -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"
--- gas/config/tc-i386.c.w64	2007-07-03 06:45:20.000000000 -0700
+++ gas/config/tc-i386.c	2007-07-04 07:59:53.000000000 -0700
@@ -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;
--- gas/testsuite/gas/i386/i386.exp.w64	2007-06-23 07:55:39.000000000 -0700
+++ gas/testsuite/gas/i386/i386.exp	2007-07-04 07:43:50.000000000 -0700
@@ -161,9 +161,7 @@ if [expr ([istarget "i*86-*-*"] || [ista
     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"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]