This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
I've broken my binutils version 2.28
- From: ANDY KENNEDY <ANDY dot KENNEDY at adtran dot com>
- To: "'binutils at sourceware dot org'" <binutils at sourceware dot org>
- Date: Wed, 13 Sep 2017 20:53:18 +0000
- Subject: I've broken my binutils version 2.28
- Authentication-results: sourceware.org; auth=none
Hi all,
My build error:
Assembler messages:
Warning: could not set architecture and machine
internal error: can't hash `dmul': exists
Fatal error: broken assembler, no assembly attempted
I get this when attempting to build crosstool-ng-1.23.0. The section
being built is the "libc-starterfiles/multilib". The attempted file to
build was:
/* confdefs.h */
#define PACKAGE_NAME "GNU C Library"
#define PACKAGE_TARNAME "glibc"
#define PACKAGE_VERSION "(see version.h)"
#define PACKAGE_STRING "GNU C Library (see version.h)"
#define PACKAGE_BUGREPORT "http://sourceware.org/bugzilla/"
#define PACKAGE_URL "http://www.gnu.org/software/glibc/"
#define PKGVERSION "(crosstool-NG crosstool-ng-1.23.0) "
#define REPORT_BUGS_TO "<lbs-1.0.0>"
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
The dmul is an opcode I added (patch snippet):
{"dmul", "d,s,t", 0x0000009c, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I69, 0, 0 },
+{"dmul", "d,s,t", 0x70000006, 0xfc0007ff, WR_1|RD_2|RD_3, 0, XLP, 0, 0 },
{"dmul", "d,v,t", 0x70000003, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO, 0, IOCT, 0, 0 },
{"dmul", "d,v,t", 0, (int) M_DMUL, INSN_MACRO, 0, I3, 0, M32|I69 },
{"dmul", "d,v,I", 0, (int) M_DMUL_I, INSN_MACRO, 0, I3, 0, M32|I69 },
Again, here I'm too ignorant to understand why this is not unique enough
to hash.
We are exploring building a new toolchain using binutils-2.28. The XLP
patch is still not part of the upstream binutils. Someone appears to
have made an attempt to put it in, however, it does not include some of
the hw FPU acceleration opt codes. I have attempted to manually patch
the same patch I did for 2.24. Two changes I made in my ignorance. I
don't know if this is the problem, but it may be:
diff -Naur a/include/elf/mips.h c/include/elf/mips.h
--- a/include/elf/mips.h 2013-11-08 04:13:48.000000000 -0600
+++ c/include/elf/mips.h 2014-02-26 14:35:09.492740886 -0600
#Original value (never offered to binutils as a patch) is now in use by
#Octeon3. Thinking this should be unique, I changed it to:
#+#define E_MIPS_MACH_XLP 0x008e0000
+#define E_MIPS_MACH_XLP 0x00A30000
diff -Naur a/include/opcode/mips.h c/include/opcode/mips.h
--- a/include/opcode/mips.h 2013-11-08 04:13:48.000000000 -0600
+++ c/include/opcode/mips.h 2014-02-26 14:33:00.423184017 -0600
#Again, now in use by Octeon3 (unique statement above.)
#+#define INSN_XLP 0x00000040
+#define INSN_XLP 0x00000080
So, what have I done wrong? If I need to submit the entire patch I'm
using, that is not a problem.
Thanks for any help you are willing to give,
Andy