Subject: Re: asm2gas in m68k/fpsp
To: Chas Williams <chas@cmf.nrl.navy.mil>
From: Paul Forgey <paulf@aphrodite.com>
List: port-mac68k
Date: 10/19/1998 18:19:43
I did notice BITFIELD_CONS_EXPRESSIONS was indeed set in tc-i960.h but not
tc-m68k.h.  I added it to tc-m68k.h, rebuilt clean, verified the static
symbol in read.o was conditionally compiled in via nm, and yet I still get
the same results.

I would try to diagnosis this further myself, however I do not grok 68k
assembly, so it's kind of stabbing at things in the dark.

I am using binutils-2.9.1.

Any further ideas?

-----Original Message-----
From: Chas Williams <chas@cmf.nrl.navy.mil>
To: Paul Forgey <paulf@aphrodite.com>
Cc: port-mac68k@netbsd.org <port-mac68k@netbsd.org>
Date: Monday, October 19, 1998 6:54 AM
Subject: Re: asm2gas in m68k/fpsp


>>res_func.s:1569: Error: parse error -- statement `fcmps #:0x46fffe00,fp0'
>>ignored
>>res_func.s:1572: Error: parse error -- statement `fcmps #:0xc7000000,fp0'
>>ignored
>>res_func.s:1590: Error: parse error -- statement `fcmps #:0x46ffff00,fp0'
>>ignored
>
>noticed this when i built gas.new for m68k.
>
>the original 'motorola style' assembly says something like:
>
>        FMOVE.S         #:3F800000,FP1
>
>and asm2gas converts it to:
>
> fmoves #:0x3f800000,fp1
>
>according to gas (read.c), it specifies a bitfield (i think)
>
>#ifdef WANT_BITFIELDS
>                /* Some other assemblers, (eg, asm960), allow
>                   bitfields after ".byte" as w:x,y:z, where w and
>                   y are bitwidths and x and y are values.  They
>                   then pack them all together. We do a little
>                   better in that we allow them in words, longs,
>                   etc. and we'll pack them in target byte order
>                   for you.
>
>                   The rules are: pack least significat bit first,
>                   if a field doesn't entirely fit, put it in the
>                   next unit.  Overflowing the bitfield is
>                   explicitly *not* even a warning.  The bitwidth
>                   should be considered a "mask".
>
>                   FIXME-SOMEDAY: If this is considered generally
>                   useful, this logic should probably be reworked.
>                   xoxorich. */
>
>apparently gas 2.x has some trouble seeing it this way.  perhaps
>it was not build with BITFIELD_CONS_EXPRESSIONS defined? (again
>see read.c in gas 2.x)  check tc-m68k.h to see if BITFIELD_CONS_EXPRESSIONS
>has been set.  i notice it seems only set for tc-i960.h
>