Re: [PATCH, AArch64] Use MOVN to generate 64-bit negative immediates where sensible

2014-08-14 Thread Richard Henderson
On 08/13/2014 05:29 AM, Kyrill Tkachov wrote: > Is the attached patch ok? It just moves the section as you suggested. I did a > build of the Linux kernel with and without this patch to make sure no code-gen > was accidentally affected. Looks good. > We'd need to store a mapping from constant to R

Re: [PATCH, AArch64] Use MOVN to generate 64-bit negative immediates where sensible

2014-08-13 Thread Kyrill Tkachov
On 07/08/14 20:32, Richard Henderson wrote: On 08/07/2014 02:57 AM, Kyrill Tkachov wrote: + if (one_match > zero_match) +{ + /* Set either first three quarters or all but the third. */ + mask = 0xll << (16 - first_not__match); + emit_insn (gen_rtx_SET (VOIDmode, des

Re: [PATCH, AArch64] Use MOVN to generate 64-bit negative immediates where sensible

2014-08-07 Thread Richard Henderson
On 08/07/2014 02:57 AM, Kyrill Tkachov wrote: > + if (one_match > zero_match) > +{ > + /* Set either first three quarters or all but the third.*/ > + mask = 0xll << (16 - first_not__match); > + emit_insn (gen_rtx_SET (VOIDmode, dest, > +

Re: [PATCH, AArch64] Use MOVN to generate 64-bit negative immediates where sensible

2014-08-07 Thread Richard Earnshaw
On 07/08/14 13:57, Kyrill Tkachov wrote: > > On 07/08/14 13:46, Richard Earnshaw wrote: >> On 07/08/14 12:32, Kyrill Tkachov wrote: >>> On 16/05/14 13:35, Richard Earnshaw wrote: On 08/05/14 18:36, Ian Bolton wrote: > Hi, > > It currently takes 4 instructions to generate certain i

Re: [PATCH, AArch64] Use MOVN to generate 64-bit negative immediates where sensible

2014-08-07 Thread Kyrill Tkachov
On 07/08/14 13:46, Richard Earnshaw wrote: On 07/08/14 12:32, Kyrill Tkachov wrote: On 16/05/14 13:35, Richard Earnshaw wrote: On 08/05/14 18:36, Ian Bolton wrote: Hi, It currently takes 4 instructions to generate certain immediates on AArch64 (unless we put them in the constant pool). For

Re: [PATCH, AArch64] Use MOVN to generate 64-bit negative immediates where sensible

2014-08-07 Thread Richard Earnshaw
On 07/08/14 12:32, Kyrill Tkachov wrote: > > On 16/05/14 13:35, Richard Earnshaw wrote: >> On 08/05/14 18:36, Ian Bolton wrote: >>> Hi, >>> >>> It currently takes 4 instructions to generate certain immediates on >>> AArch64 (unless we put them in the constant pool). >>> >>> For example ... >>> >>>

Re: [PATCH, AArch64] Use MOVN to generate 64-bit negative immediates where sensible

2014-08-07 Thread Kyrill Tkachov
On 16/05/14 13:35, Richard Earnshaw wrote: On 08/05/14 18:36, Ian Bolton wrote: Hi, It currently takes 4 instructions to generate certain immediates on AArch64 (unless we put them in the constant pool). For example ... long long beefcafebabe () { return 0xBEEFCAFEBABEll

Re: [PATCH, AArch64] Use MOVN to generate 64-bit negative immediates where sensible

2014-05-16 Thread Richard Earnshaw
On 08/05/14 18:36, Ian Bolton wrote: > Hi, > > It currently takes 4 instructions to generate certain immediates on > AArch64 (unless we put them in the constant pool). > > For example ... > > long long > beefcafebabe () > { > return 0xBEEFCAFEBABEll; > } > > leads to ... >

RE: [PATCH, AArch64] Use MOVN to generate 64-bit negative immediates where sensible

2014-05-16 Thread Ian Bolton
Ping. This should be relatively simple to review. Many thanks. > -Original Message- > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org] On Behalf Of Ian Bolton > Sent: 08 May 2014 18:36 > To: gcc-patches > Subject: [PATCH, AArch64] Use MOVN

[PATCH, AArch64] Use MOVN to generate 64-bit negative immediates where sensible

2014-05-08 Thread Ian Bolton
Hi, It currently takes 4 instructions to generate certain immediates on AArch64 (unless we put them in the constant pool). For example ... long long beefcafebabe () { return 0xBEEFCAFEBABEll; } leads to ... mov x0, 0x47806 mov x0, 0xcafe, lsl 16 mov x0, 0xbeef, lsl 32