[PATCH, ARM] Fix parsing of int/float immediates for Neon VMOV instructions
Julian Brown
julian@codesourcery.com
Fri Mar 2 18:23:00 GMT 2007
Paul Brook wrote:
>> To use floating-point immediates, you must now explicitly use a decimal
>> point or exponent, i.e.
>>
>> vmov.f32 dX, #10.0
>>
>> not
>>
>> vmov.f32 dX, #10
>
> This would be ok if we rejected the latter. However IIUC after your patch we
> silently encode the latter as vmov.i32 dX, #10. This is equivalent to
> vmov.f32 dX, #<some denormal or unrepresentable FP value> which is almost
> certainly not what the user intended.
This version of the patch will reject the latter case instead, which I
agree seems far more sensible.
Re-tested (with a minor testsuite tweak) with arm-none-eabi cross.
OK now?
Cheers,
Julian
ChangeLog
gas/
* config/tc-arm.c (arm_it): Add immisfloat field.
(parse_qfloat_immediate): Disallow integer syntax for floating-point
immediates. Fix hex immediates, handle 0.0 and -0.0 specially.
(parse_neon_mov): Set immisfloat bit for operand if it parsed as a
float.
(neon_cmode_for_move_imm): Reject non-float immediates for float
operands.
(neon_move_immediate): Pass immisfloat bit to
neon_cmode_for_move_imm.
gas/testsuite/
* gas/arm/neon-const.s: Use FP syntax for 0/-0.
* gas/arm/vfp-neon-syntax-inc.s: Likewise, for 1.
* gas/arm/neon-cov.s: Use float syntax for FP immediate.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gas-int-qfloat-fixes-2
URL: <https://sourceware.org/pipermail/binutils/attachments/20070302/618e6b37/attachment.ksh>
More information about the Binutils
mailing list