This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Yep! Its an assembler bug. When gcc builds, it builds lots of copies of the libs with different combination of cpu flags, this is specified by config/m68k/t-m68kbare (MULTILIB_OPTIONS) Now if a target cpu type is used which (see ASM_SPEC in config/m68k/m68k-none.h) tells the assembler it is (for example) a cpu32 (or anything less than a 68020) gas will reject "tst a?" instructions. BUT, I have discovered with some cpu settings (for example -m68020 -mnobitfield to cc1 in the CC1_SPEC) the compiler will generate tst instructions on Address registers, this IS LEGAL, BUT the assembler incorrectly rejects them if the cpu is < 68020. TST.W or TST.L instructions on Address registers are actually supported on all 68series CPUS. I have enclosed a patch which fixes the assembler (binutils/opcodes), which should fix your current problem. Good Luck Mark Mark S. Phillips ESN 742 2461 msp@nortel.co.uk Tel. +44 1279 402461 On Tue, 3 Jun 1997, Neal Becker wrote: > I'm trying to build cross compiler for m68k embedded target. I built > binutils-2.8, using > > CONFIG_SHELL=/bin/bash /bin/bash ./configure --verbose > --target=m68k-none-coff --prefix=/usr/local/m68k > > host is hppa1.1-hp-hpux9.05. Host compiler is > gcc-2.7.2.2,binutils-2.8. > > binutils-2.8 cross build + installed OK. > > Now gcc-2.7.2.2 cross configured as: > # GCC was configured as follows: > ./configure --verbose --target=m68k-none-coff --prefix=/usr/local/m68k --with-gnu-as --with-gnu-ld > echo host=hppa1.1-hp-hpux9.05 target=m68k-none-coff build=hppa1.1-hp-hpux9.05 > > then make all in gcc-2.7.2.2 produced: > > _fixunsxfdi > _floatdixf > /usr/tmp/cca15191.s: Assembler messages: > /usr/tmp/cca15191.s:97: Error: operands mismatch -- statement `tst.l %a4' ignored > make[2]: *** [libgcc2.a] Error 1 > make[2]: Leaving directory `/a/data/src/gcc-2.7.2.2' > make[1]: *** [stmp-multilib-sub] Error 2 > make[1]: Leaving directory `/a/data/src/gcc-2.7.2.2' > make: *** [stmp-multilib] Error 1 > > Any ideas? >
*** opcodes/m68k-opc.c.orig Tue May 20 10:33:18 1997 --- opcodes/m68k-opc.c Tue May 20 11:32:43 1997 *************** *** 1828,1835 **** --- 1828,1837 ---- {"tstb", one(0045000), one(0177700), ";b", m68020up | mcf5200 }, {"tstb", one(0045000), one(0177700), "@b", m68000up }, {"tstw", one(0045100), one(0177700), "*w", m68020up | mcf5200 }, + {"tstw", one(0045110), one(0177700), "As", cpu32 }, {"tstw", one(0045100), one(0177700), "@w", m68000up }, {"tstl", one(0045200), one(0177700), "*l", m68020up | mcf5200 }, + {"tstl", one(0045210), one(0177700), "As", cpu32 }, {"tstl", one(0045200), one(0177700), "@l", m68000up }, {"unlk", one(0047130), one(0177770), "As", m68000up | mcf5200 },