This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PING] [Patch RX] Added warnings of RX variants that does not have hardware FPU support
- From: DJ Delorie <dj at redhat dot com>
- To: Sandeep Kumar Singh <Sandeep dot Singh2 at kpitcummins dot com>
- Cc: binutils at sourceware dot org, Kaushik dot Phatak at kpitcummins dot com, nickc at redhat dot com
- Date: Fri, 19 Jul 2013 12:53:01 -0400
- Subject: Re: [PING] [Patch RX] Added warnings of RX variants that does not have hardware FPU support
- References: <00D82FEA4EAEB64782676AD908D06E6F2E296D61 at KCHJEXMB03 dot kpit dot com> <201307122207 dot r6CM7noC032577 at greed dot delorie dot com> <00D82FEA4EAEB64782676AD908D06E6F2E2980E1 at KCHJEXMB03 dot kpit dot com>
> I tried to implement your suggestions, but it is issued below build error,
>
> ../src/binutils-2.23.1/gas/config/rx-parse.y:896.45-46: $4 of
> `float2_op' has no declared type
> ../src/binutils-2.23.1/gas/config/rx-parse.y:896.61-62: $2 of
> `float2_op' has no declared type
>
> Please suggest as I am not familiar with this syntax.
If you rearrange the components of a bison grammar, it renumbers all the $N etc
values. So, since a new "term" has been introduced, you need to increase
all the numbers by one.
> float2_op
> : { rx_check_float_support (); }
> '#' EXPR ',' REG
> { id24 (2, 0x72, sub_op << 4); F ($4, 20, 4); O4 ($2); }
In this example, $1 is the first {...}, #2 is '#', $3 is the EXPR, etc.
So the resulting code would be:
> { id24 (2, 0x72, sub_op << 4); F ($5, 20, 4); O4 ($3); }
(BTW, that {...} would be $6 ;)