This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, ARM] Work around erratum in VFP9
- From: "Bin.Cheng" <amker dot cheng at gmail dot com>
- To: Richard Earnshaw <rearnsha at arm dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 3 Jul 2014 17:32:26 +0100
- Subject: Re: [PATCH, ARM] Work around erratum in VFP9
- Authentication-results: sourceware.org; auth=none
- References: <53B5737E dot 5080906 at arm dot com>
On Thu, Jul 3, 2014 at 4:15 PM, Richard Earnshaw <firstname.lastname@example.org> wrote:
> The VFP9 floating-point unit (as occasionally used with ARM9 devices)
> has an erratum (760019) whereby it is possible for floating-point
> division and square-root instructions to be executed twice. This is not
> a problem if the destination register is not used as an input, but can
> cause incorrect results if they do.
> The safest work-around for this issue is to make the compiler treat
> these instructions as early-clobber; this ensures that the conditions
> for result corruption cannot occur.
> This patch takes that approach, but relaxes back to the original
> behaviour when either the architecture level is ARMv6 or higher or the
> VFP sub-architecture level is VFPv3 or higher; if either of these are
> true then the code cannot run on an affected part.
> 2014-07-03 Richard Earnshaw <email@example.com>
> * arm.md (arch): Add armv6_or_vfpv3.
> (arch_enabled): Add test for the above.
> * vfp.md (divsf_vfp, divdf_vfp): Add earlyclobber when code can run
> on VFP9.
> (sqrtsf_vfp, sqrtdf_vfp): Likewise.
Richard, you would need full relative path for back-end files here.
> Committed to trunk.