This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH][AArch64] Restrict usage of FP/SIMD registers for TImode reload and absdi2 patterns for non-float/simd targets
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Kyrill Tkachov <kyrylo dot tkachov at arm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>
- Date: Thu, 07 Aug 2014 15:23:05 +0100
- Subject: Re: [PATCH][AArch64] Restrict usage of FP/SIMD registers for TImode reload and absdi2 patterns for non-float/simd targets
- Authentication-results: sourceware.org; auth=none
- References: <53E36161 dot 1080800 at arm dot com>
On 07/08/14 12:22, Kyrill Tkachov wrote:
> Hi all,
> This patch arises from PR 62014 where apparently gcc generates usage of
> FP registers with -mgeneral-regs-only. The PR turned out to be bogus in
> the end that but an inspection of aarch64.md shows that there are some
> patterns that don't have their usage of FP/SIMD registers properly
> guarded by the simd attribute or by the TARGET_FLOAT predicate. This
> patch addresses that, although I could not come up with a testcase that
> demonstrated wrong behaviour.
> I built the linux kernel with this patch and looked for fmov
> instructions in the disassembly. They appeared only in the crypto code
> that uses the new AES instructions and therefore allows usage of vector
> But even without this patch the kernel compiled to an identical binary
> as with this patch (phew!)
> I've added a comment that hopefully clarifies the usage of the fp and
> simd attributes.
> Bootstrapped on aarch64-linux and tested on aarch64-none-elf as well.
> Ok for trunk?
> 2014-08-07 Kyrylo Tkachov <email@example.com>
> * config/aarch64/aarch64.md (absdi2): Set simd attribute.
> (aarch64_reload_mov<mode>): Predicate on TARGET_FLOAT.
> (aarch64_movdi_<mode>high): Likewise.
> (aarch64_mov<mode>high_di): Likewise.
> (aarch64_movdi_<mode>low): Likewise.
> (aarch64_mov<mode>low_di): Likewise.
> (aarch64_movtilow_tilow): Likewise.
> Add comment explaining usage of fp,simd attributes and of
> TARGET_FLOAT and TARGET_SIMD.