This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Use of gas on m68k-motorola-sysv3
From: "Beere, Chris" <Chris.Beere@cwcom.co.uk>
Date: Fri, 10 Dec 1999 11:27:57 -0000
I have downloaded binutils-2.9.1. Configured it with "configure
--host=delta-sysv3", delta-sysv3 is a short form for m68k-motorola-sysv3.
Ran make and "make install". No problems so far. I am using GNU C compiler
2.4.5, a very old compiler and am trying to upgrade it to a later compiler.
When I force ot to use gas I get the following errors:-
/usr/tmp/cca04169.s:30293: Error: operands mismatch -- statement `cmp.b
(%a0),&10' ignored
/usr/tmp/cca04169.s:30368: Error: operands mismatch -- statement `cmp.b
(%a0),&40' ignored
/usr/tmp/cca04169.s:30436: Error: operands mismatch -- statement `cmp.l
%d3,12(%a0)' ignored
These cmp instructions have the operands in the wrong order. In each
case the order of the operands must be reversed.
This is happening because gcc reverses the order of cmp operands on
the m68k-motorola-sysv3 target. I assume that happens because the
native assembler expects the cmp operands in the reversed order.
The fix is to rebuild gcc, configuring with the --with-gnu-as option.
Then you must make sure that it uses gas rather than the native
assembler. gcc has a complex set of search rules to find the
assembler, but in most cases it will use the assembler that is first
on your PATH. However, you can confuse it by doing something like
--prefix=/, which you seem to have done. I recommend against doing
that.
Ian