[REVIEW ONLY 1/1] UNRATIFIED RISC-V: Add 'Zfa' extension
Jeff Law
jeffreyalaw@gmail.com
Sun Mar 26 15:43:27 GMT 2023
On 3/22/23 09:47, Christoph Müllner wrote:
>
> Hi Tsukasa,
>
> There seems to be a misunderstanding of the spec.
> The second operand of the fli should be the constant itself ("Value"
> column of the specification) in C-like syntax.
> E.g.:
> fli.h ft1, -1.0 # encoding rs1=0
> fli.h ft1, min # encoding rs1=1
> fli.h ft1, 0.0000152587890625 # encoding rs1=2
> ...
> fli.h ft1, 16 # encoding rs1=25
> ...
> fli.h ft1, nan # encoding rs1=31
>
> So we have 3 strings ("min", "inf", "nan") and 29 constants.
Ouch. So we've got to parse & match the actual constant. I worked on a
processor with similar capabilities, but we defined the assembly syntax
to use the table index for the constant rather than the constant itself.
I'd strongly suggest supporting the %a/%A hex notation for the
constants. It's unambiguous and less error prone. I think Kito made a
similar suggestion downthread.
When I read through the basics of Zfa I was a bit disappointed. 99% of
the time the fli is going to feed one or more FP arithmetic
instructions. It'd be more efficient to be able to access those FP
constants in the FP arithmetic instruction itself. I guess that ship
has sailed.
Jeff
More information about the Binutils
mailing list