summaryrefslogtreecommitdiff
path: root/gas/config/tc-i386.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2001-01-13 23:37:57 +0000
committerJan Hubicka <jh@suse.cz>2001-01-13 23:37:57 +0000
commitb9d79e0379726fd6d072b987a30f3f8bed4985e4 (patch)
treea515a0749b2736e8aa9434b1f2ee7c7a10f46ea2 /gas/config/tc-i386.c
parent332dac408a5fe6f3446b1210b4094aa2f1d1523a (diff)
downloadbinutils-gdb-b9d79e0379726fd6d072b987a30f3f8bed4985e4.tar.gz
* tc-i386.h (TARGET_MACH): New macro.
(i386_mach): Declare. * tc-i386.c (i386_mach): New function.
Diffstat (limited to 'gas/config/tc-i386.c')
-rw-r--r--gas/config/tc-i386.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index da2bf4852ef..00fcfe1628d 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 ()
{