summaryrefslogtreecommitdiff
path: root/gas/config/tc-tilegx.c
diff options
context:
space:
mode:
authorwalt <walt>2012-02-25 18:57:53 +0000
committerwalt <walt>2012-02-25 18:57:53 +0000
commit44b698ff2dfddb7832ca5d5877d6a4269302acb5 (patch)
tree7b38d06d4006716a9c86651034a5a67dc64adb2d /gas/config/tc-tilegx.c
parentdce0e4065c6d4cbc7c15288595869552079e6b84 (diff)
downloadbinutils-redhat-44b698ff2dfddb7832ca5d5877d6a4269302acb5.tar.gz
Properly create and use a bfd_arch_info_type for 32-bit tilegx.
bfd/ * arctures.c (bfd_architecture): Define bfd_mach_tilegx32. * bfd-in2.h: Regenerate. * cpu-tilegx.c (bfd_tilegx32_arch): define. (bfd_tilegx_arch): link to bfd_tilegx32_arch. gas/ * tc-tilegx.c (md_begin): set architecture and machine.
Diffstat (limited to 'gas/config/tc-tilegx.c')
-rw-r--r--gas/config/tc-tilegx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gas/config/tc-tilegx.c b/gas/config/tc-tilegx.c
index 39e1907322..9f6e349a07 100644
--- a/gas/config/tc-tilegx.c
+++ b/gas/config/tc-tilegx.c
@@ -241,6 +241,10 @@ md_begin (void)
{
const struct tilegx_opcode *op;
int i;
+ int mach = (tilegx_arch_size == 64) ? bfd_mach_tilegx : bfd_mach_tilegx32;
+
+ if (! bfd_set_arch_mach (stdoutput, bfd_arch_tilegx, mach))
+ as_warn (_("Could not set architecture and machine"));
/* Guarantee text section is aligned. */
bfd_set_section_alignment (stdoutput, text_section,