This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: An i386 fp register name patch
- To: alan@SPRI.Levels.UniSA.Edu.Au (Alan Modra)
- Subject: Re: An i386 fp register name patch
- From: hjl@lucon.org (H.J. Lu)
- Date: Sat, 28 Aug 1999 08:38:09 -0700 (PDT)
- Cc: binutils@sourceware.cygnus.com
>
>
> On Fri, 27 Aug 1999, H.J. Lu wrote:
>
> > Here is a patch to handle spaces ina i386 FP register names. I am
> > enclosing a testcase here.
>
> Hello HJ,
> As you probably know, we already allow spaces in lots of places. eg.
> mov % al , 5 ( % ebp , % ebx , 1 )
> Notice that no spaces are allowed *in* a register name, or for that
> matter in an instruction mnemonic. eg.
> mov $1, % a l
> is illegal.
>
> So there is a philosophical question as to whether "st(1)" is really an
> indivisible register name token or not. You seem to say that the register
> name is "st" with an index, so therefore we should allow spaces, eg.
> "st ( 1 )". I'm inclined to say that "st(1)" is really just a name like
> any other register name, so spaces shouldn't be allowed (or if we do
> allow spaces here then why not in "% a l" - something I don't like).
>
> Where did you run into a need for spaces in fp reg names? C asm macros?
>
>
I got a report from Mesa people. FWIW, assembler on Solaris &/x86 takes
fxch %st( 1)
fxch %st( 1 )
fxch %st ( 1 )
fxch %st (1)
fxch %st(1)
But not
fxch % st(1)
fxch % st(1)
I got
# cat foo.s
fxch %st( 1)
fxch %st( 1 )
fxch %st ( 1 )
fxch %st (1)
fxch %st(1)
fxch % st(1)
fxch % st(1)
# /usr/ccs/bin/as -o foo.o foo.s
Assembler:
aline 6 : Illegal register
aline 6 : syntax error
aline 7 : Illegal register
aline 7 : syntax error
It looks like gas has some extensions, but doesn't have features
supported by other x86 assemblers. In any case, I will support it
in the Linux version of binutils.
--
H.J. Lu (hjl@gnu.org)