This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch ARM] Fix bswap patterns for ARM / Thumb and Thumb2.
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: ramana dot radhakrishnan at arm dot com
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, stephen dot thomas at arm dot com
- Date: Tue, 26 Jan 2010 10:31:35 +0000
- Subject: Re: [Patch ARM] Fix bswap patterns for ARM / Thumb and Thumb2.
- References: <1264418943.4482.48.camel@e200593-lin.cambridge.arm.com>
On Mon, 2010-01-25 at 11:29 +0000, Ramana Radhakrishnan wrote:
> Hi,
>
> This patch by Stephen Thomas is useful in fixing code generation for
> bswap instructions on the ARM port. As a result, bswap64 reduces to 3
> instructions rather than 91 for v7-a !
>
> This supports use of the rev instructions on architectures that support
> it (v6 onwards) and uses a smaller instruction sequence than what is
> generated by default on v5te cores for ARM as well as Thumb1 when not
> optimizing for size. It generates a libcall to bswapsi2 when optimizing
> for size.
>
> This was tested cross on qemu for cpu=arm7tdmi and cpu=cortex-a9 for
> arm-eabi with multilibs for Thumb1 and Thumb2 with no regressions.
>
> Ok to commit to trunk ?
>
OK.
R.
> cheers
> Ramana
>
>
>
> 2010-01-21 Stephen Thomas <stephen.thomas@arm.com>
>
> * config/arm/arm.md (bswapsi2): Add support for bswapsi2.
> (arm_rev): New.
> (arm_legacy_rev): Likewise.
> (thumb_legacy_rev): Likewise.
>
>
> 2010-01-21 Stephen Thomas <stephen.thomas@arm.com>
>
> * testsuite/gcc.dg/optimize-bswap*.c: Add ARM target
>