diff options
author | Jan Hubicka <jh@suse.cz> | 2001-01-13 23:37:57 +0000 |
---|---|---|
committer | Jan Hubicka <jh@suse.cz> | 2001-01-13 23:37:57 +0000 |
commit | b9d79e0379726fd6d072b987a30f3f8bed4985e4 (patch) | |
tree | a515a0749b2736e8aa9434b1f2ee7c7a10f46ea2 /gas/config | |
parent | 332dac408a5fe6f3446b1210b4094aa2f1d1523a (diff) | |
download | gdb-b9d79e0379726fd6d072b987a30f3f8bed4985e4.zip gdb-b9d79e0379726fd6d072b987a30f3f8bed4985e4.tar.gz gdb-b9d79e0379726fd6d072b987a30f3f8bed4985e4.tar.bz2 |
* tc-i386.h (TARGET_MACH): New macro.
(i386_mach): Declare.
* tc-i386.c (i386_mach): New function.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-i386.c | 13 | ||||
-rw-r--r-- | gas/config/tc-i386.h | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index da2bf48..00fcfe1 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 f42765b..3a66177 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" |