Opinion on a hardware feature for conditional instructions

2010-11-09 Thread Mohamed Shafi
Hi all, I need a opinion on a design front. I am doing a port for a private target in GCC 4.5.1. We are also in the process of designing the hardware along with the development of the build tools. Currently we don't have enough bits in the encoding to support conditional instruction like arm does.

Re: define_split

2010-11-09 Thread Joern Rennecke
Quoting Michael Meissner : Generally you need to tighten the pattern conditions to make sure it doesn't match. Sometimes the only sane and effective way of tightening the pattern conditions is to have an insn condition of "0". At which point the define_insn_and_split becomes syntactic sugar (p

Re: define_split

2010-11-09 Thread Joern Rennecke
Quoting Michael Meissner : So whether the passes in between combine and the split pass care, is a different question. I didn't recall that combine had this split feature. I remember that it has been there even before the GNU GCC project started using cvs. Fortunately, we still have the tran

Re: define_split

2010-11-09 Thread Michael Meissner
On Tue, Nov 09, 2010 at 01:38:17PM -0500, Joern Rennecke wrote: > Quoting Paolo Bonzini : > > >On 11/09/2010 05:38 PM, Joern Rennecke wrote: > >>A define_insn will be recognized in all contexts. > >>Having an insn pattern for an insn that does not actually exist can cause > >>all kinds of unintend

gcc-4.4-20101109 is now available

2010-11-09 Thread gccadmin
Snapshot gcc-4.4-20101109 is now available on ftp://gcc.gnu.org/pub/gcc/snapshots/4.4-20101109/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 4.4 SVN branch with the following options: svn://gcc.gnu.org/svn/gcc/branches

Re: define_split

2010-11-09 Thread Michael Meissner
On Tue, Nov 09, 2010 at 09:38:28AM +0200, roy rosen wrote: > I still don't understand the difference between your two examples: > If you write a define_split then whenever during combine it gets into > a pattern which matches the define_split then it splits. > > What is the difference when writing

Re: named address spaces: addr_space_convert never called

2010-11-09 Thread David Brown
On 09/11/10 18:45, Georg Lay wrote: David Brown schrieb: On 08/11/10 16:59, Georg Lay wrote: Richard Guenther schrieb: On Mon, Nov 8, 2010 at 3:39 PM, Georg Lay wrote: Hi, I just started playing around with named address spaces for avr. Besides general space (ram), I introduced a second one

Re: define_split

2010-11-09 Thread Joern Rennecke
Quoting Paolo Bonzini : On 11/09/2010 05:38 PM, Joern Rennecke wrote: A define_insn will be recognized in all contexts. Having an insn pattern for an insn that does not actually exist can cause all kinds of unintended consequences as the optimizers try to generate and recognize 'optimized' patt

Re: named address spaces: addr_space_convert never called

2010-11-09 Thread Georg Lay
> int __far __atomic x; int volatile __far __atomic x; makes more sense :-)

Re: named address spaces: addr_space_convert never called

2010-11-09 Thread Georg Lay
David Brown schrieb: > On 08/11/10 16:59, Georg Lay wrote: >> Richard Guenther schrieb: >>> On Mon, Nov 8, 2010 at 3:39 PM, Georg Lay wrote: Hi, I just started playing around with named address spaces for avr. Besides general space (ram), I introduced a second one, __pgm, which shal

Re: define_split

2010-11-09 Thread Paolo Bonzini
On 11/09/2010 05:38 PM, Joern Rennecke wrote: A define_insn will be recognized in all contexts. Having an insn pattern for an insn that does not actually exist can cause all kinds of unintended consequences as the optimizers try to generate and recognize 'optimized' patterns, or when reload does

Re: define_split

2010-11-09 Thread Joern Rennecke
Quoting Paolo Bonzini : As I understand it, this will also give combine the ability to do two->two (and two->N) transformations, though indirectly through the temporary insn. Given this, could you explain further the benefits of combiner-split define_split vs. define_insn_and_split. A define_

Re: Merging gdc (Gnu D Compiler) into gcc

2010-11-09 Thread Joe Buck
On Tue, Nov 09, 2010 at 05:08:44AM -0800, Jakub Jelinek wrote: > On Tue, Nov 09, 2010 at 09:36:08AM +, Andrew Haley wrote: > > > The D specific part of gdc is already GPL, it's just copyrighted by > > > Digital Mars. I understand the copyright must be reassigned to the FSF. > > > Is it possible

Re: gcc 4.5.1 / as 2.20.51.0.11 miscompiling drivers/char/i8k.c ?

2010-11-09 Thread Jim
On 11/09/2010 02:57 PM, Andreas Schwab wrote: > Andi Kleen writes: > >> @@ -142,7 +142,7 @@ static int i8k_smm(struct smm_regs *regs) >> "lahf\n\t" >> "shrl $8,%%eax\n\t" >> "andl $1,%%eax\n" >> -:"=a"(rc) >> +:"=a"(rc), "=m" (*regs)

Re: Constant propagation and CSE

2010-11-09 Thread Jeff Law
On 10/27/10 13:54, Frederic Riss wrote: On 27 October 2010 21:21, Jeff Law wrote: On 10/27/10 12:15, Frederic Riss wrote: On 26 October 2010 16:22, Jeff Lawwrote: The thing is the cprop pass doesn't look at insn costs while doing its job AFAICS. I'm interested to see how insn splitting

Re: define_split

2010-11-09 Thread Paolo Bonzini
On 11/09/2010 10:22 AM, Joern Rennecke wrote: Quoting roy rosen : What is the difference when writing define_insn_and_split? From what I understood from the docs then if there is such an insn then the split does not occur so it would simply match it as an insn without splitting and at the end w

Re: RFC: Add zlib source to src CVS resposity

2010-11-09 Thread Mike Frysinger
On Tuesday, November 02, 2010 09:22:24 Ian Lance Taylor wrote: > Nick Clifton writes: > > Right - this decision has been made. We are not going to include > > > > zlib the in the binutils sources. > > > > Thanks for suggesting the idea and working on the patch, but in the > > > > end it wa

Re: gcc 4.5.1 / as 2.20.51.0.11 miscompiling drivers/char/i8k.c ?

2010-11-09 Thread Andreas Schwab
Andi Kleen writes: > @@ -142,7 +142,7 @@ static int i8k_smm(struct smm_regs *regs) > "lahf\n\t" > "shrl $8,%%eax\n\t" > "andl $1,%%eax\n" > - :"=a"(rc) > + :"=a"(rc), "=m" (*regs) I think this should be "+m". Andreas. -- Andrea

Re: gcc 4.5.1 / as 2.20.51.0.11 miscompiling drivers/char/i8k.c ?

2010-11-09 Thread Michael Matz
Hi, On Mon, 8 Nov 2010, Dave Korn wrote: > void foo (void) > { > int x, y, z; > x = 23; > asm ("do something" : "=r" (y) : "r" (x) ); > z = y + 1; > } The case in i8k.c really is different. It does use the value by influencing the return value and the callers use the returned value in

Re: gcc 4.5.1 / as 2.20.51.0.11 miscompiling drivers/char/i8k.c ?

2010-11-09 Thread Andi Kleen
> My speculation is, that the asm is not removed but rather that regs.eax > isn't reloaded after the asm because the memory clobber doesn't clobber > automatic variables. Yes that makes sense. I wasn't able to verify it so far though. Maybe the original poster could try the obvious patch inste

Re: Merging gdc (Gnu D Compiler) into gcc

2010-11-09 Thread Jakub Jelinek
On Tue, Nov 09, 2010 at 09:36:08AM +, Andrew Haley wrote: > > The D specific part of gdc is already GPL, it's just copyrighted by > > Digital Mars. I understand the copyright must be reassigned to the FSF. > > Is it possible to fork the code, and assign copyright of one fork to the > > FSF and

Re: Merging gdc (Gnu D Compiler) into gcc

2010-11-09 Thread Andrew Haley
On 11/08/2010 11:13 PM, Walter Bright wrote: > > > Joseph S. Myers wrote: >> On Mon, 8 Nov 2010, Walter Bright wrote: >> >> >>> Who do I need to talk to in order to resolve the various licensing >>> issues so >>> this becomes possible? >>> >> >> The FSF, via the Steering Committee, via thi

Re: define_split

2010-11-09 Thread Joern Rennecke
Quoting roy rosen : What is the difference when writing define_insn_and_split? From what I understood from the docs then if there is such an insn then the split does not occur so it would simply match it as an insn without splitting and at the end would print the #? Can you please elaborate? T