This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] [ARM] thumb1 imm move 256-510
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Joey Ye <joey dot ye at arm dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 12 Apr 2012 10:27:14 +0100
- Subject: Re: [PATCH] [ARM] thumb1 imm move 256-510
- References: <000001cd184e$506d0490$f1470db0$@ye@arm.com>
On 12/04/12 02:48, Joey Ye wrote:
> For thumb1 use move + add instructions for immediate move [256-510].
>
> Following is a complete range if combine an imm mov with listed
> instructions. Among them, lsls and neg have already been implemented. The
> only missing opportunity is add, in which I enabled in this patch. Others
> are replicated with lsls or neg.
>
> 1. Result imm range with 16bit movs
> Insn Result imm with movs
> lsls [0x1-0xff] shifted by 1-31
> add [256, 510]
> neg [-255, 0]
> rev [0x1000000-0xff000000] step 0x1000000
> rev16 [0x100-0xff00] step 0x100
> revsh [0x10000-0xff0000] step 0x10000
> rsb [-255, 0]
> mvn [-255, 0]
> sub [-255, 0]
> sxtb [-255, 0]
>
> ChangeLog:
>
> * config/arm/constraints.md (Pe): New constraint.
> * config/arm/arm.md: New split for imm 256-510.
>
> Testcase:
> * gcc.target/arm/thumb1-imm.c: New testcase.
>
OK.
R.