[PATCH][ARM][GAS] Allow integer immediate for VFP vmov instructions.
Tamar Christina
Tamar.Christina@arm.com
Thu May 10 14:46:00 GMT 2018
Hi Nick,
The 05/10/2018 12:16, Nick Clifton wrote:
> Hi Tamar,
>
> > If the immediate is not a float we convert it and copy it's representation
> > into the imm field and then carry on validating as if we originally entered
> > a floating point immediate.
>
> I think that you ought to verify that the conversion to floating point
> representation has not lost any accuracy, and issue a warning/error if
> the floating point and immediate values are not the same.
If there's a significant loss of precision you're going to get an error already due to
is_quarter_float rejecting the float then as it wouldn't be representable.
You also can't have a loss due to a large value, as if the value is large enough not to fit
inside a float it will also not fit in the imm encoding for the instruction, so you'll get
an error saying "garbage after ...".
I have a patch locally that adds a warning using truncf (imm) != imm but have so far been
unable to trigger any failing case. I can submit it if you'd like to have a warning here
but it also adds a dependency to libm. I assume that's not a problem?
I assume the AArch64 variant of this patch (submitted at the same time) wouldn't need this
as that just has a more liberal parsing and I don't know whether it was an integer at all.
Regards,
Tamar
>
> Cheers
> Nick
>
--
More information about the Binutils
mailing list