From b9d79e0379726fd6d072b987a30f3f8bed4985e4 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sat, 13 Jan 2001 23:37:57 +0000 Subject: [PATCH] * tc-i386.h (TARGET_MACH): New macro. (i386_mach): Declare. * tc-i386.c (i386_mach): New function. --- gas/ChangeLog | 6 ++++++ gas/config/tc-i386.c | 13 +++++++++++++ gas/config/tc-i386.h | 2 ++ 3 files changed, 21 insertions(+) diff --git a/gas/ChangeLog b/gas/ChangeLog index 0f888a5d074..60730089040 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +Sun Jan 14 00:36:42 MET 2001 Jan Hubicka + + * tc-i386.h (TARGET_MACH): New macro. + (i386_mach): Declare. + * tc-i386.c (i386_mach): New function. + 2001-01-13 Philip Blundell * doc/as.texinfo: Fix spelling and cross-references. 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 () { diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h index f42765b6418..3a66177cecb 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" -- 2.30.2