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:56:16
After doing some more twiddling, I wrote a small one-liner to play with what
the assembler wants.  If these are bitfield expressions, it's a little hard
for me to see how and what is represented.

    fcmpd #0x1234567812345678,fp0

will assemble, while

    fcmpd #:0x1234567812345678,fp0

will not.

Not knowing 68k assembly - is there a difference?  If not, I could modify
asm2gas easily enough.. but I obviously don't want incorrect code.

Thanks again in advance..

-----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:56 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
>