aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2007-07-04 15:32:46 +0000
committerH.J. Lu <hjl.tools@gmail.com>2007-07-04 15:32:46 +0000
commit872ce6ff99eaf767ce26c1c69d11b7d910274dbc (patch)
treede9d852494236a1367245f61e8c62e5ef51c62f7
parentddb341a78c008d4989c4d68b039ec40f874ab06a (diff)
downloadgdb-872ce6ff99eaf767ce26c1c69d11b7d910274dbc.zip
gdb-872ce6ff99eaf767ce26c1c69d11b7d910274dbc.tar.gz
gdb-872ce6ff99eaf767ce26c1c69d11b7d910274dbc.tar.bz2
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*.
-rw-r--r--gas/ChangeLog9
-rw-r--r--gas/config/obj-coff.h4
-rw-r--r--gas/config/tc-i386.c27
-rw-r--r--gas/testsuite/ChangeLog4
-rw-r--r--gas/testsuite/gas/i386/i386.exp4
5 files changed, 22 insertions, 26 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index caf11f0..32aa3fa 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,12 @@
+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
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;
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 755e682..09aacdb 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+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
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index 8f0437c..9e463de 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -161,9 +161,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
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"