summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-i386.c13
-rw-r--r--gas/config/tc-i386.h2
3 files changed, 21 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 0f888a5d07..6073008904 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+Sun Jan 14 00:36:42 MET 2001 Jan Hubicka <jh@suse.cz>
+
+ * tc-i386.h (TARGET_MACH): New macro.
+ (i386_mach): Declare.
+ * tc-i386.c (i386_mach): New function.
+
2001-01-13 Philip Blundell <philb@gnu.org>
* doc/as.texinfo: Fix spelling and cross-references.
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index da2bf4852e..00fcfe1628 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -778,6 +778,19 @@ static struct hash_control *op_hash;
/* Hash table for register lookup. */
static struct hash_control *reg_hash;
+#ifdef BFD_ASSEMBLER
+unsigned long
+i386_mach ()
+{
+ if (!strcmp (default_arch, "x86_64"))
+ return bfd_mach_x86_64;
+ else if (!strcmp (default_arch, "i386"))
+ return bfd_mach_i386_i386;
+ else
+ as_fatal (_("Unknown architecture"));
+}
+#endif
+
void
md_begin ()
{
diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h
index f42765b641..3a66177cec 100644
--- a/gas/config/tc-i386.h
+++ b/gas/config/tc-i386.h
@@ -72,6 +72,8 @@ extern int tc_i386_fix_adjustable PARAMS ((struct fix *));
&& ! S_IS_COMMON ((FIX)->fx_addsy))))
#define TARGET_ARCH bfd_arch_i386
+#define TARGET_MACH (i386_mach ())
+extern unsigned long i386_mach PARAMS ((void));
#ifdef TE_NetBSD
#define AOUT_TARGET_FORMAT "a.out-i386-netbsd"
OpenPOWER on IntegriCloud