This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH][ARM][gas] Make gas accept vcmp[e].f{32,64} <reg>, #0.0
- From: Will Newton <will dot newton at linaro dot org>
- To: Kyrill Tkachov <kyrylo dot tkachov at arm dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>, Nick Clifton <nickc at redhat dot com>
- Date: Mon, 4 Aug 2014 11:08:52 +0100
- Subject: Re: [PATCH][ARM][gas] Make gas accept vcmp[e].f{32,64} <reg>, #0.0
- Authentication-results: sourceware.org; auth=none
- References: <53DF539A dot 2010203 at arm dot com>
On 4 August 2014 10:34, Kyrill Tkachov <kyrylo.tkachov@arm.com> wrote:
Hi Kyrill,
> The ARM ARM says that the VFP compare with zero instructions (vcmp, vcmpe)
> accept the zero in the form of a #0.0 immediate. However, gas currently only
> accepts #0. This patch fixes that and some simple tests are added.
>
> The new parse_ifimm_zerofunction is rather simple and is modelled on the
> parse_qfloat_immediate below it and didn't blow up in my testing.
>
>
> make check on gas passes and a gcc testsuite run doesn't show any problems.
>
> Ok for trunk?
>
> Thanks,
> Kyrill
>
> [gas/]
> 2014-06-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>
> * config/tc-arm.c (parse_ifimm_zero): New function.
> (enum operand_parse_code): Add OP_RSVD_FI0 value.
> (parse_operands): Handle OP_RSVD_FI0.
> (asm_opcode_insns): Use RSVD_FI0 for second operand of vcmp, vcmpe.
>
> [gas/testsuite/]
> 2014-06-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>
> * gas/arm/ual-vcmp.s: New file.
> * gas/arm/ual-vcmp.d: Likewise.
Would it be possible to use my_get_expression or a similar parser for
this? It can be surprisingly tricky to get right, e.g. I think your
code will accept #0.01 as zero for example. In any case it would be
good to have a *-bad.s test which checks to make sure that invalid
values are actually detected.
--
Will Newton
Toolchain Working Group, Linaro