Subject: powerpc cross-compile problems
To: None <tech-toolchain@netbsd.org>
From: Simon Burge <simonb@wasabisystems.com>
List: tech-toolchain
Date: 04/02/2001 07:53:55
Folks,

I'm seeing the following lossage when cross compiling powerpc code from
my alpha (using the currently unused gnu/dist/toolchain sources as a
basic for my cross assembler - I can't use the 2.9.1-based pkgsrc cross
assembler for other reasons):

	thoreau 505> /usr/pkg/cross/powerpc-netbsd/bin/as -u -mppc -V -Qy -o if_ppp.o if_ppp.s
	GNU assembler version 2.10.1 (powerpc-netbsd) using BFD version 2.10.1
	if_ppp.s: Assembler messages:
	if_ppp.s:5932: Error: illegal bitmask
	Exit 1
	thoreau 506> sed -n '5932p' if_ppp.s
		rlwinm 28,28,4,0xf0000000

With the simple change below, the error goes away.  However, I'm not
in a position to test the resultant code.  Any suggestions on the
correctness of the change, or shall I just forward it for the binutils
folk to look at?

Simon.
--
Simon Burge                            <simonb@wasabisystems.com>
NetBSD CDs, Support and Service:    http://www.wasabisystems.com/


Index: ppc-opc.c
===================================================================
RCS file: /cvsroot/gnusrc/gnu/dist/toolchain/opcodes/ppc-opc.c,v
retrieving revision 1.1.1.1
diff -d -p -u -r1.1.1.1 ppc-opc.c
--- ppc-opc.c	2000/07/26 00:24:36	1.1.1.1
+++ ppc-opc.c	2001/04/01 21:48:22
@@ -698,7 +698,7 @@ insert_mbe (insn, value, errmsg)
      long value;
      const char **errmsg;
 {
-  unsigned long uval, mask;
+  unsigned int uval, mask;
   int mb, me, mx, count, last;
 
   uval = value;