From 825902491e89db303b036d82eef32ef0b07d4317 Mon Sep 17 00:00:00 2001 From: Walter Lee Date: Sat, 25 Feb 2012 18:57:55 +0000 Subject: 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. --- gas/ChangeLog | 4 ++++ gas/config/tc-tilegx.c | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'gas') diff --git a/gas/ChangeLog b/gas/ChangeLog index 6293433..dda0c1a 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2012-02-25 Walter Lee + + * tc-tilegx.c (md_begin): set architecture and machine. + 2012-02-21 H.J. Lu * config/tc-i386.c (check_hle): Use HLEPrefixNone, HLEPrefixLock, diff --git a/gas/config/tc-tilegx.c b/gas/config/tc-tilegx.c index 39e1907..9f6e349 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, -- cgit v1.1