This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
More tweaks for non-zero bfd_mach values
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Mon, 2 Sep 2002 15:27:43 +0930
- Subject: More tweaks for non-zero bfd_mach values
If/when we move away from using 0 in the bfd_mach defines, we're
going to need these.
bfd/ChangeLog
* aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
and bfd_mach_i386_i386_intel_syntax.
opcodes/ChangeLog
* arc-opc.c: Include bfd.h.
(arc_get_opcode_mach): Subtract off base bfd_mach value.
Index: bfd/aoutx.h
===================================================================
RCS file: /cvs/src/src/bfd/aoutx.h,v
retrieving revision 1.34
diff -u -p -r1.34 aoutx.h
--- bfd/aoutx.h 26 Aug 2002 08:46:21 -0000 1.34
+++ bfd/aoutx.h 2 Sep 2002 05:14:44 -0000
@@ -757,7 +757,9 @@ NAME(aout,machine_type) (arch, machine,
break;
case bfd_arch_i386:
- if (machine == 0)
+ if (machine == 0
+ || machine == bfd_mach_i386_i386
+ || machine == bfd_mach_i386_i386_intel_syntax)
arch_flags = M_386;
break;
Index: opcodes/arc-opc.c
===================================================================
RCS file: /cvs/src/src/opcodes/arc-opc.c,v
retrieving revision 1.9
diff -u -p -r1.9 arc-opc.c
--- opcodes/arc-opc.c 31 Aug 2001 20:05:24 -0000 1.9
+++ opcodes/arc-opc.c 2 Sep 2002 05:53:17 -0000
@@ -20,6 +20,7 @@
#include "sysdep.h"
#include <stdio.h>
#include "ansidecl.h"
+#include "bfd.h"
#include "opcode/arc.h"
#define INSERT_FN(fn) \
@@ -513,7 +514,7 @@ arc_get_opcode_mach (bfd_mach, big_p)
ARC_MACH_7,
ARC_MACH_8
};
- return mach_type_map[bfd_mach] | (big_p ? ARC_MACH_BIG : 0);
+ return mach_type_map[bfd_mach - bfd_mach_arc_5] | (big_p ? ARC_MACH_BIG : 0);
}
/* Initialize any tables that need it.
--
Alan Modra
IBM OzLabs - Linux Technology Centre