This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] ARM Neon instruction set support
- From: Paul Brook <paul at codesourcery dot com>
- To: Julian Brown <julian at codesourcery dot com>
- Cc: binutils at sources dot redhat dot com, Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Date: Sat, 1 Apr 2006 03:49:22 +0100
- Subject: Re: [PATCH] ARM Neon instruction set support
- References: <442DD9E0.1090408@codesourcery.com>
On Saturday 01 April 2006 02:39, Julian Brown wrote:
> Hi,
>
> This patch provides support for ARM's new Advanced SIMD (Neon)
> instruction set, and version 3 of the VFP instruction set. Code using
> Neon instructions can be both assembled and disassembled. The full range
> of SIMD data types is available, and should be correctly type-checked by
> the assembler.
As-is the patch looks generally ok to me, a couple of relatively minor points
below. Ok for the csl branch once those are resolved.
ARM have also defined all the existing VFP instructions in terms of the vector
mnemonics. eg. "faddd d0, d0, d0" becomes "vadd.f64 d0, d0, d0).
We probably want to consider the implications of this before applying to
mainline. Hopefully this will be an incremental change that can be done
without rewriting everything, but it's best to check :-)
> + /* Undo polymorphism for Neon D and Q registers. */
> + if (reg && type == REG_TYPE_NDQ)
> + type = (reg->type == REG_TYPE_NQ || reg->type == REG_TYPE_VFD)
> + ? reg->type : type;
Probably clearer as a single if:
if (reg && type == REG_TYPE_NDQ
&&(reg->type == REG_TYPE_NQ || reg->type == REG_TYPE_VFD))
type = reg->type;
> ! /* FIXME: Check if cortex-a8 supports these things! */
> ! {"cortex-a8", ARM_ARCH_V7A, ARM_FEATURE(0, FPU_VFP_V3
Yes it does. You can remove the FIXME.
> + {"vfp3", FPU_ARCH_VFP_V3},
You also need to add some way of enabling NEON. I'm not sure if it's best to
have this as an independent architecture extension (like iWMMXt) or just a
different type of FPU. Probably the latter.
You also need to set the appropriate EABI build attributes to when NEON and
VFPv3 instructions are used.
Paul