Re: inline assembly vs. intrinsic functions

2010-10-26 Thread Ian Lance Taylor
roy rosen writes: > I am trying to demonstrate my port capabilities. > I am writing an application which needs to use instructions like max > a,b,c,d,e,f where a,b,c are inputs and d,e,f are outputs. > Is that possible to write an intrinsic function for that? > I think not because that means that

Re: inline assembly vs. intrinsic functions

2010-10-26 Thread roy rosen
I didn't give the full details of the instruction but for example a max instruction which gets an array and returns both the max value and its index in the array will need to return more than one argument. 2010/10/26 Ian Lance Taylor : > roy rosen writes: > >> I am trying to demonstrate my port c

Re: Constant propagation and CSE

2010-10-26 Thread Jeff Law
On 10/25/10 02:46, Frederic Riss wrote: Hi, The constant propagation pass propagates constants into the instructions that accept immediates. I'm trying to find if there's some CSE pass in GCC that would be able to undo this effect when the constant is used more than once in the function. I look

Re: movmemm pattern

2010-10-26 Thread Joseph S. Myers
On Mon, 25 Oct 2010, Richard Guenther wrote: > Because the int * could point to unaligned data and there is no access > that would prove otherwise (memcpy accepts any alignment). As previously discussed, in ISO C storing a pointer in a particular pointer type or converting to / through that type

Re: Discussion about merging Go frontend

2010-10-26 Thread Joseph S. Myers
On Mon, 25 Oct 2010, Mark Mitchell wrote: > On 10/25/2010 10:34 PM, Frank Ch. Eigler wrote: > > > By the way, is there some necessity in accomplishing this by means of > > a linked library, as opposed to via a spawned objcopy process? (elfcpp isn't a *linked* library; it's a C++ template library

Re: inline assembly vs. intrinsic functions

2010-10-26 Thread roy rosen
If I want the compiler to understand the inline assembly is it possible to write define_insn which would match the pattern that GCC creates for the inline assembly and then GCC would be able to 'know' some attributes about this insn and would be able to parallelize it? 2010/10/26 roy rosen : > I d

Default initialization value...

2010-10-26 Thread Bruce Korb
Hi, I write a lot of code that emits code and it is a nuisance to try to keep track of which index values have been initialized and which not. This initialization extension would be really, really cool and if I can find some of that mythical "copious spare time" I may provide a patch: int foo[

Re: Problem with equivalent memory handling

2010-10-26 Thread Jeff Law
On 10/19/10 14:42, Ian Lance Taylor wrote: Jeff Law writes: Reload has the ability to replace a pseudo with its equivalent memory location. This is fine and good. Imagine: 1. We have a pseudo (call is pseudo A) with a read-only memory equivalent. Pseudo A does not get a hard reg 2.

Re: Discussion about merging Go frontend

2010-10-26 Thread Mark Mitchell
On 10/26/2010 10:41 AM, Joseph S. Myers wrote: > Well, slow on hosts where process creation is slow (just like the separate > gcc/cc1/as/collect2/ld/lto-wrapper/... processes). The separate process > design was probably based on process creation being fast A lot of this is also historical; gcc

Re: Describing multi-register values in RTL

2010-10-26 Thread Jeff Law
On 10/21/10 22:11, Ian Lance Taylor wrote: Paul Koning writes: To take that example, on the pdp11 an SImode is two HImodes. Could the RTL template in the MD file for, say, addsi3 split that into two or three insns that operate on HImode values and describe the actual instructions? In this c

Re: Discussion about merging Go frontend

2010-10-26 Thread Ian Lance Taylor
Mark Mitchell writes: > A lot of this is also historical; gcc/cc1/as/ld mirror typical UNIX > compilers of the era at which GCC was built. collect2 was presumably > necessary because of dependence on proprietary ld; if we could assume > GNU ld (or GOLD) everywhere, we could fold that functionali

Re: inline assembly vs. intrinsic functions

2010-10-26 Thread Ian Lance Taylor
roy rosen writes: > If I want the compiler to understand the inline assembly is it > possible to write define_insn which would match the pattern that GCC > creates for the inline assembly and then GCC would be able to 'know' > some attributes about this insn and would be able to parallelize it?

Re: Problem with equivalent memory handling

2010-10-26 Thread Ian Lance Taylor
Jeff Law writes: >> If >> there is any register pressure, B is going to go onto the stack or is >> going to force something else onto the stack. > Not today, which is the problem. Well, I was implicitly anding in the clause "if the compiler were correct." Ian

Re: movmemm pattern

2010-10-26 Thread Paul Koning
On Oct 25, 2010, at 9:28 PM, Dave Korn wrote: > On 26/10/2010 01:53, Paul Koning wrote: >> On Oct 25, 2010, at 3:44 PM, Richard Guenther wrote: >> >>> On Mon, Oct 25, 2010 at 11:26 AM, Paul Koning >>> wrote: Question on movmemm: Given extern int *i, *j; void foo (void

Re: Discussion about merging Go frontend

2010-10-26 Thread Andi Kleen
On Tue, Oct 26, 2010 at 11:51:20AM -0400, Mark Mitchell wrote: > On 10/26/2010 10:41 AM, Joseph S. Myers wrote: > > > Well, slow on hosts where process creation is slow (just like the separate > > gcc/cc1/as/collect2/ld/lto-wrapper/... processes). The separate process > > design was probably ba

Re: movmemm pattern

2010-10-26 Thread Dave Korn
On 26/10/2010 17:16, Paul Koning wrote: > On Oct 25, 2010, at 9:28 PM, Dave Korn wrote: > >> On 26/10/2010 01:53, Paul Koning wrote: >>> On Oct 25, 2010, at 3:44 PM, Richard Guenther wrote: >>> On Mon, Oct 25, 2010 at 11:26 AM, Paul Koning wrote: > Question on movmemm: > > G

Re: movmemm pattern

2010-10-26 Thread Paul Koning
On Oct 26, 2010, at 1:27 PM, Dave Korn wrote: > On 26/10/2010 17:16, Paul Koning wrote: >> On Oct 25, 2010, at 9:28 PM, Dave Korn wrote: >>> ... >>> >>> What happens if you dereference i and j before the memcpy in foo? Do you >>> then get int-sized shared alignment in movmemM? >>> >>> extern i

Re: peephole2: dead regs not marked as dead

2010-10-26 Thread Georg Lay
Paolo Bonzini schrieb: > On 10/25/2010 11:35 AM, Georg Lay wrote: (insn 22 8 23 2 peep2.c:5 (set (reg:SI 15 d15) (and:SI (reg:SI 4 d4 [ x ]) (const_int -98305 [0xfffe7fff]))) 143 {*and3_zeroes.insert.{SI}.ic} (nil)) (insn 23 22 21 2 p

Re: combiner

2010-10-26 Thread Georg Lay
roy rosen schrieb: > Thanks Georg, > The -fdump-rtl-combine-details really helps. > Regarding implementing it through cbranchhi4, this is not enough for > me because when getting to this pattern the operands have already been > expanded, and I am trying to prevent that. > Is there a way around it?

Re: peephole2: dead regs not marked as dead

2010-10-26 Thread Paolo Bonzini
On 10/26/2010 07:42 PM, Georg Lay wrote: I set a break at the end of df_simulate_one_insn_backwards. CURRENT = *(live->current->bits) FIRST = *(live->first->bits) Or call debug_bitmap (). :) reg 26 (Stackpointer) and reg 27 (return address) do not matter here. The result ist insn 10 (CALL)

Re: movmemm pattern

2010-10-26 Thread Richard Guenther
On Tue, Oct 26, 2010 at 1:12 PM, Paul Koning wrote: > > On Oct 26, 2010, at 1:27 PM, Dave Korn wrote: > >> On 26/10/2010 17:16, Paul Koning wrote: >>> On Oct 25, 2010, at 9:28 PM, Dave Korn wrote: ... What happens if you dereference i and j before the memcpy in foo?  Do you the

Re: %pc relative addressing of string literals/const data

2010-10-26 Thread Joakim Tjernlund
Joakim Tjernlund/Transmode wrote on 2010/10/14 15:54:32: > > Joakim Tjernlund/Transmode wrote on 2010/10/12 11:00:36: > > > > Alan Modra wrote on 2010/10/11 14:58:45: > > > > > > On Sun, Oct 10, 2010 at 11:20:06AM +0200, Joakim Tjernlund wrote: > > > > Now I have had a closer look at this and it l

gcc-4.4-20101026 is now available

2010-10-26 Thread gccadmin
Snapshot gcc-4.4-20101026 is now available on ftp://gcc.gnu.org/pub/gcc/snapshots/4.4-20101026/ 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: %pc relative addressing of string literals/const data

2010-10-26 Thread Dave Korn
On 26/10/2010 23:37, Joakim Tjernlund wrote: > Everything went dead quiet the minute I stated to send patches, what did > I do wrong? Nothing, you just ran into the lack-of-manpower problem. Sorry! And I can't even help, I'm not a ppc maintainer. But you definitely didn't do anything wrong.

Re: %pc relative addressing of string literals/const data

2010-10-26 Thread Alan Modra
On Wed, Oct 27, 2010 at 12:53:00AM +0100, Dave Korn wrote: > On 26/10/2010 23:37, Joakim Tjernlund wrote: > > > Everything went dead quiet the minute I stated to send patches, what did > > I do wrong? > > Nothing, you just ran into the lack-of-manpower problem. Sorry! And I > can't even help,

Re: %pc relative addressing of string literals/const data

2010-10-26 Thread Joakim Tjernlund
Alan Modra wrote on 2010/10/27 04:01:50: > > On Wed, Oct 27, 2010 at 12:53:00AM +0100, Dave Korn wrote: > > On 26/10/2010 23:37, Joakim Tjernlund wrote: > > > > > Everything went dead quiet the minute I stated to send patches, what did > > > I do wrong? > > > > Nothing, you just ran into the lac