This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: m68k assembler


On Wed, Sep 11, 2002 at 11:19:03AM +0100, Bruce Adams wrote:

> An example my specific problem which may or may not be the same is:
>  
>     Error: operands mismatch -- statement 'cmp.b (a0),d7'
> 
> Oddly it accepts move.b in 'move.b (a0),d7'.
> 
> Any ideas?

either add the register prefixes or use --register-prefix-optional as
was previously suggested.

to wit:

$ cat mismatch.s 
.text
        cmp.b (a0),d7
$ m68k-rtems-gcc -c mismatch.s
mismatch.s: Assembler messages:
mismatch.s:2: Error: operands mismatch -- statement `cmp.b (a0),d7' ignored
$ m68k-rtems-gcc -Wa,--register-prefix-optional -c mismatch.s
$ m68k-rtems-objdump -S mismatch.o

mismatch.o:     file format elf32-m68k

Disassembly of section .text:

00000000 <.text>:
   0:   be10            cmpb %a0@,%d7

-- 
  Aaron J. Grier  |   Frye Electronics, Tigard, OR   |  aaron@frye.com

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]