Properly create and use a bfd_arch_info_type for 32-bit tilegx.
[external/binutils.git] / gas / config / tc-tilegx.c
index 39e1907..9f6e349 100644 (file)
@@ -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,