[PATCH, GAS/ARM] Allow immediate without prefix in unified syntax for VCMP

Thomas Preudhomme thomas.preudhomme@foss.arm.com
Fri Feb 3 17:28:00 GMT 2017


Hi,

Instruction Set Syntax section in GNU as documentation for ARM says
about the unified syntax that "immediate operands do not require a #
prefix". However, vcmp.f32 s0, 0.0 currently fails to assemble. This is
because the parse_ifimm_zero function is used to parse the immediate and
this function expects an immediate prefix unconditionally.

This patch change the logic to only fail in the absence of a prefix if
not in unified syntax and only skip the prefix if one was found.

ChangeLog entry is as follows:

*** gas/ChangeLog ***

2017-02-02  Thomas Preud'homme  <thomas.preudhomme@arm.com>

         * config/tc-arm.c (parse_ifimm_zero): Make prefix optional in unified
         syntax.
         * testsuite/gas/arm/vcmp-noprefix-imm.d: New file.
         * testsuite/gas/arm/vcmp-noprefix-imm.s: New file.


Testing: after the patch the example assembles fine and the testsuite
shows no regression.

Is this ok for master?

Best regards,

Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: allow_vcmp_imm_without_prefix_unified_syntax.patch
Type: text/x-patch
Size: 1429 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20170203/86c8e23b/attachment.bin>


More information about the Binutils mailing list