Re: [PATCH, rs6000] Fix HTM __builtin_ttest rtl expansion

2014-05-22 Thread Peter Bergner
On Tue, 2014-05-20 at 16:36 -0400, David Edelsohn wrote: > On Tue, May 20, 2014 at 3:28 PM, Peter Bergner wrote: > > gcc/ > > * config/rs6000/htm.md (ttest): Use correct shift value to get CR0. > > > > gcc/testsuite/ > > * gcc.target/powerpc/htm-ttest.c: New test. > > Okay. Ok, t

Re: [PATCH, rs6000] Fix HTM __builtin_ttest rtl expansion

2014-05-20 Thread David Edelsohn
On Tue, May 20, 2014 at 3:28 PM, Peter Bergner wrote: > The following patch fixes a semi-latent bug for the HTM pattern used with > the __builtin_ttest() builtin. This is supposed to expand to a tabortwci. > instruction which sets cr0 and then some code that copies the cr0 value > into a gpr and

[PATCH, rs6000] Fix HTM __builtin_ttest rtl expansion

2014-05-20 Thread Peter Bergner
The following patch fixes a semi-latent bug for the HTM pattern used with the __builtin_ttest() builtin. This is supposed to expand to a tabortwci. instruction which sets cr0 and then some code that copies the cr0 value into a gpr and then shifts and masks it into the lowest 2 bits in the gpr. Wi