This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PowerPC] gas silently replaces floating-point register forillegal gpr
- From: Sascha Brawer <brawer at dandelis dot ch>
- To: Alan Modra <amodra at bigpond dot net dot au>
- Cc: <bug-binutils at gnu dot org>, <binutils at sources dot redhat dot com>
- Date: Tue, 12 Aug 2003 08:13:52 +0200
- Subject: Re: [PowerPC] gas silently replaces floating-point register forillegal gpr
- References: <20030812013123.GC27145@bubble.sa.bigpond.net.au>
Hi Alan,
Alan Modra <amodra@bigpond.net.au> wrote on Tue, 12 Aug 2003 11:01:23 +0930:
>> the GNU assembler 2.14.90 (cvs version of 2003-08-06) for elf32-powerpc
>> accepts the following ill-formed source:
>>
>> ---------------------- begin foo.s
>> .text
>> foo: lfs r0,8(r2)
>> ---------------------- end foo.s
>>
>> % powerpc-elf-as -mregnames foo.s
>>
>> Expected behavior: An error message should be emitted because the target
>> of the lfs instruction must be a floating-point register. The target
>> cannot be a general-purpose register such as r0.
>>
>> Observed behavior: The assembler silently replaces r0 by f0.
>
>Instead of fixing this myself, I'll point you to the source that could
>be changed to check register type, gas/config/tc-ppc.c:read_register.
>read_register would need an extra parameter to pass in operand, or
>possibly just operand->flags, to enable a check against expected
>register type.
Which version of gas/config/tc-ppc.c is the current one? Version CVS-1.79
from sources.redhat.com has no read_register function.
But anyway, I'm not sure whether I feel confident enough to tweak with
gas myself. Might it be possible to enter the bug into a gnats/bugzilla/
.. database, so that the maintainers could see the bug report?
Thanks,
-- Sascha
Sascha Brawer, brawer@dandelis.ch, http://www.dandelis.ch/people/brawer/