Re: [PATCH] X86-64: Add -mskip-rax-setup

2014-12-27 Thread H.J. Lu
On Sat, Dec 27, 2014 at 8:18 AM, Mike Stump wrote: > On Dec 26, 2014, at 7:57 AM, "H.J. Lu" wrote: >> On Thu, Dec 25, 2014 at 9:07 PM, Gerald Pfeifer wrote: >>> On Thursday 2014-12-18 11:35, H.J. Lu wrote: Updated. >>> >>> "the RAX register" (i.e., add "the"), and I suggest to make >>> this

Re: [PATCH] X86-64: Add -mskip-rax-setup

2014-12-27 Thread Mike Stump
On Dec 26, 2014, at 7:57 AM, "H.J. Lu" wrote: > On Thu, Dec 25, 2014 at 9:07 PM, Gerald Pfeifer wrote: >> On Thursday 2014-12-18 11:35, H.J. Lu wrote: >>> Updated. >> >> "the RAX register" (i.e., add "the"), and I suggest to make >> this a sentence, similar to my previous mail for the other >> u

Re: [PATCH] X86-64: Add -mskip-rax-setup

2014-12-26 Thread H.J. Lu
On Thu, Dec 25, 2014 at 9:07 PM, Gerald Pfeifer wrote: > On Thursday 2014-12-18 11:35, H.J. Lu wrote: >> Updated. > > "the RAX register" (i.e., add "the"), and I suggest to make > this a sentence, similar to my previous mail for the other > update. > > This is fine with these changes. Done. > Th

Re: [PATCH] X86-64: Add -mskip-rax-setup

2014-12-25 Thread Gerald Pfeifer
On Thursday 2014-12-18 11:35, H.J. Lu wrote: > Updated. "the RAX register" (i.e., add "the"), and I suggest to make this a sentence, similar to my previous mail for the other update. This is fine with these changes. Thank you -- and that's a nice hack (in the positive sense)! Gerald

Re: [PATCH] X86-64: Add -mskip-rax-setup

2014-12-18 Thread H.J. Lu
On Thu, Dec 18, 2014 at 11:22 AM, Mike Stump wrote: > On Dec 18, 2014, at 9:43 AM, H.J. Lu wrote: >> + arguments passed in vector registers. This can be used to >> + optimize Linux kernel. > > English, to optimize _the_ Linux kernel? Updated. -- H.J. --- Index: gcc-5/changes.html

Re: [PATCH] X86-64: Add -mskip-rax-setup

2014-12-18 Thread Mike Stump
On Dec 18, 2014, at 9:43 AM, H.J. Lu wrote: > + arguments passed in vector registers. This can be used to > + optimize Linux kernel. English, to optimize _the_ Linux kernel?

Re: [PATCH] X86-64: Add -mskip-rax-setup

2014-12-18 Thread H. Peter Anvin
On 12/18/2014 10:37 AM, Rasmus Villemoes wrote: > > Minor thing: If it's not too late, I'd appreciate a 'Suggested-by' or > similar mention in the kernel change log. > I think we can get that. -hpa

Re: [PATCH] X86-64: Add -mskip-rax-setup

2014-12-18 Thread Rasmus Villemoes
On Thu, Dec 18 2014, "H. Peter Anvin" wrote: > On 12/18/2014 09:43 AM, H.J. Lu wrote: >> >> Peter, please feel free to use my kernel patch or create a different >> one. >> > > Great, thanks! > Thanks for accepting this idea, and especially to H.J. for already having done all the work. Minor t

Re: [PATCH] X86-64: Add -mskip-rax-setup

2014-12-18 Thread H. Peter Anvin
On 12/18/2014 09:43 AM, H.J. Lu wrote: > > Peter, please feel free to use my kernel patch or create a different > one. > Great, thanks! -hpa

Re: [PATCH] X86-64: Add -mskip-rax-setup

2014-12-18 Thread H.J. Lu
On Thu, Dec 18, 2014 at 9:23 AM, Uros Bizjak wrote: > On Thu, Dec 18, 2014 at 6:08 PM, H. Peter Anvin wrote: >> On 12/18/2014 06:12 AM, Uros Bizjak wrote: > > # temporary until string.h is fixed > KBUILD_CFLAGS += -ffreestanding > > Yes, it looks to me that new option is the w

Re: [PATCH] X86-64: Add -mskip-rax-setup

2014-12-18 Thread Uros Bizjak
On Thu, Dec 18, 2014 at 6:08 PM, H. Peter Anvin wrote: > On 12/18/2014 06:12 AM, Uros Bizjak wrote: # temporary until string.h is fixed KBUILD_CFLAGS += -ffreestanding Yes, it looks to me that new option is the way to go. >>> >>> Is this an OK? >> >> In principle, I'm OK w

Re: [PATCH] X86-64: Add -mskip-rax-setup

2014-12-18 Thread H.J. Lu
On Thu, Dec 18, 2014 at 9:08 AM, H. Peter Anvin wrote: > On 12/18/2014 06:12 AM, Uros Bizjak wrote: # temporary until string.h is fixed KBUILD_CFLAGS += -ffreestanding Yes, it looks to me that new option is the way to go. >>> >>> Is this an OK? >> >> In principle, I'm OK w

Re: [PATCH] X86-64: Add -mskip-rax-setup

2014-12-18 Thread H. Peter Anvin
On 12/18/2014 06:12 AM, Uros Bizjak wrote: >>> >>> # temporary until string.h is fixed >>> KBUILD_CFLAGS += -ffreestanding >>> >>> Yes, it looks to me that new option is the way to go. >> >> Is this an OK? > > In principle, I'm OK with the patch approach, but let's wait for > eventual comments fro

Re: [PATCH] X86-64: Add -mskip-rax-setup

2014-12-18 Thread Uros Bizjak
On Thu, Dec 18, 2014 at 3:09 PM, H.J. Lu wrote: > The Linux kernel never passes floating point arguments around, vararg > functions or not. Hence no vector registers are ever used when calling a > vararg function. But gcc still dutifully emits an "xor %eax,%eax" before > each and

Re: [PATCH] X86-64: Add -mskip-rax-setup

2014-12-18 Thread H.J. Lu
On Thu, Dec 18, 2014 at 6:03 AM, Uros Bizjak wrote: > On Thu, Dec 18, 2014 at 2:49 PM, Uros Bizjak wrote: > The Linux kernel never passes floating point arguments around, vararg functions or not. Hence no vector registers are ever used when calling a vararg function. But gcc still

Re: [PATCH] X86-64: Add -mskip-rax-setup

2014-12-18 Thread Uros Bizjak
On Thu, Dec 18, 2014 at 2:49 PM, Uros Bizjak wrote: >>> The Linux kernel never passes floating point arguments around, vararg >>> functions or not. Hence no vector registers are ever used when calling a >>> vararg function. But gcc still dutifully emits an "xor %eax,%eax" before >>> each and eve

Re: [PATCH] X86-64: Add -mskip-rax-setup

2014-12-18 Thread H.J. Lu
On Thu, Dec 18, 2014 at 5:51 AM, Jakub Jelinek wrote: > On Thu, Dec 18, 2014 at 02:24:06PM +0100, Uros Bizjak wrote: >> > It removed 14309 redundant "xor %eax,%eax" instructions and saved about >> > 27KB. I am currently running the new kernel without any problem. OK >> > for trunk? >> >> How abo

Re: [PATCH] X86-64: Add -mskip-rax-setup

2014-12-18 Thread Jakub Jelinek
On Thu, Dec 18, 2014 at 02:24:06PM +0100, Uros Bizjak wrote: > > It removed 14309 redundant "xor %eax,%eax" instructions and saved about > > 27KB. I am currently running the new kernel without any problem. OK > > for trunk? > > How about skipping RAX setup unconditionally for !TARGET_SSE? Please

Re: [PATCH] X86-64: Add -mskip-rax-setup

2014-12-18 Thread Uros Bizjak
On Thu, Dec 18, 2014 at 2:24 PM, Uros Bizjak wrote: > On Thu, Dec 18, 2014 at 2:11 PM, H.J. Lu wrote: >> The Linux kernel never passes floating point arguments around, vararg >> functions or not. Hence no vector registers are ever used when calling a >> vararg function. But gcc still dutifully e

Re: [PATCH] X86-64: Add -mskip-rax-setup

2014-12-18 Thread Uros Bizjak
On Thu, Dec 18, 2014 at 2:11 PM, H.J. Lu wrote: > The Linux kernel never passes floating point arguments around, vararg > functions or not. Hence no vector registers are ever used when calling a > vararg function. But gcc still dutifully emits an "xor %eax,%eax" before > each and every call of a