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

2010-11-08 Thread Richard Guenther
On Mon, Nov 8, 2010 at 12:03 AM, Andi Kleen wrote: > Andreas Schwab writes: >> >> The asm fails to mention that it modifies *regs. > > It has a memory clobber, that should be enough, no? No. A memory clobber does not cover automatic storage. Btw, I can't see a testcase anywhere so I just assum

Re: integral overflow and integral conversions

2010-11-08 Thread Richard Guenther
On Sun, Nov 7, 2010 at 11:04 PM, Jason Merrill wrote: > Currently, the middle end seems to use the same rules for handling constant > overflow of integer arithmetic and conversion between integer types: set > TREE_OVERFLOW on the INTEGER_CST if the type is signed and the value doesn't > fit in the

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

2010-11-08 Thread Andi Kleen
Richard Guenther writes: > On Mon, Nov 8, 2010 at 12:03 AM, Andi Kleen wrote: >> Andreas Schwab writes: >>> >>> The asm fails to mention that it modifies *regs. >> >> It has a memory clobber, that should be enough, no? > > No. A memory clobber does not cover automatic storage. That's a separa

Dedicated logical instructions

2010-11-08 Thread Radu Hobincu
Hello again, I have another, quick question: I have dedicated logical instructions in my RISC machine (lt - less than, gt - greater than, ult - unsigned less than, etc.). I'm also working on adding instructions for logical OR, AND, NOT, XOR. While reading GCC internals, I've stumbled on this: "Ex

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

2010-11-08 Thread Richard Guenther
On Mon, Nov 8, 2010 at 12:20 PM, Andi Kleen wrote: > Richard Guenther writes: > >> On Mon, Nov 8, 2010 at 12:03 AM, Andi Kleen wrote: >>> Andreas Schwab writes: The asm fails to mention that it modifies *regs. >>> >>> It has a memory clobber, that should be enough, no? >> >> No.  A me

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

2010-11-08 Thread Paul Koning
On Nov 8, 2010, at 6:20 AM, Richard Guenther wrote: > On Mon, Nov 8, 2010 at 12:20 PM, Andi Kleen wrote: >> Richard Guenther writes: >> >>> On Mon, Nov 8, 2010 at 12:03 AM, Andi Kleen wrote: Andreas Schwab writes: > > The asm fails to mention that it modifies *regs.

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

2010-11-08 Thread Jakub Jelinek
On Mon, Nov 08, 2010 at 06:47:59AM -0500, Paul Koning wrote: > I don't know about 4.5, but I noticed that with 4.6 (trunk), testcasese > like gcc.c-torture/compile/2804-1.c optimize away the asm and all the > operand generation except for -O0. That's fine, the asm isn't volatile and the output

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

2010-11-08 Thread Michael Matz
Hi, On Mon, 8 Nov 2010, Andi Kleen wrote: > Richard Guenther writes: > > > On Mon, Nov 8, 2010 at 12:03 AM, Andi Kleen wrote: > >> Andreas Schwab writes: > >>> > >>> The asm fails to mention that it modifies *regs. > >> > >> It has a memory clobber, that should be enough, no? > > > > No. A m

Re: Why is -fstrict-aliasing excluded from function "optimize" attribute?

2010-11-08 Thread Paolo Bonzini
On 11/04/2010 11:28 AM, Bingfeng Mei wrote: I think of adding a warning too. Should I submit a patch? That's always a good idea. :) Paolo

Re: I propose Ralf Wildenhues for build machinery maintainer

2010-11-08 Thread Paolo Bonzini
On 11/05/2010 07:00 PM, Ian Lance Taylor wrote: To the steering committee: I propose Ralf Wildenhues as a new maintainer for the build machinery. Ralf often has useful comments for proposed patches to the configure scripts. He has done good work in upgrading to new versions of autoconf and libt

Re: asm_fprintf inefficiency?

2010-11-08 Thread Paolo Bonzini
On 11/05/2010 08:10 AM, Jay K wrote: the checking for puts_locked... the fact that asm_fprintf calls putc one character at a time, which probably benefits from _unlocked. Honest question: is asm_fprintf in the profile at all, even at -O0? Paolo

Re: integral overflow and integral conversions

2010-11-08 Thread Joseph S. Myers
I am confident in the correctness of the tests I wrote for overflow for C (gcc.dg/overflow-warn-[1234].c). This doesn't necessarily mean the present mixture of ways of indicating that an expression of integer constants is not an integer constant expression (for whatever combination of reasons

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

2010-11-08 Thread Joakim Tjernlund
Dave Korn wrote on 2010/10/27 13:59:00: > > On 27/10/2010 07:47, Joakim Tjernlund wrote: > > 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 minu

named address spaces: addr_space_convert never called

2010-11-08 Thread Georg Lay
Hi, I just started playing around with named address spaces for avr. Besides general space (ram), I introduced a second one, __pgm, which shall address program memory where also constants may live. avr is havard architecture, and both program memory and ram start at address 0. >From this and the i

Re: named address spaces: addr_space_convert never called

2010-11-08 Thread Georg Lay
Georg Lay schrieb: FYI, the code is as expected when I define the addrspaces to be subsets of each other. Georg

Re: named address spaces: addr_space_convert never called

2010-11-08 Thread Richard Guenther
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 > shall address program memory where also constants may live. avr is > havard architecture, and both progra

Re: named address spaces: addr_space_convert never called

2010-11-08 Thread Georg Lay
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 >> shall address program memory where also constants may live. avr is >> hava

Re: Dedicated logical instructions

2010-11-08 Thread Ian Lance Taylor
"Radu Hobincu" writes: > I have another, quick question: I have dedicated logical instructions in > my RISC machine (lt - less than, gt - greater than, ult - unsigned less > than, etc.). I'm also working on adding instructions for logical OR, AND, > NOT, XOR. While reading GCC internals, I've stu

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

2010-11-08 Thread Dave Korn
On 08/11/2010 11:20, Andi Kleen wrote: > An asm with live inputs and outputs should never be optimized > way. If 4.5.1 started doing that it's seriously broken. I don't see that. Consider: void foo (void) { int x, y, z; x = 23; y = x + 1; z = y + 1; } So far, you'd agree the compil

Re: define_split

2010-11-08 Thread Michael Meissner
On Thu, Oct 28, 2010 at 09:11:44AM +0200, roy rosen wrote: > Hi all, > > I am trying to use define_split, but it seems to me that I don't > understand how it is used. > It says in the gccint.pdf (which I use as my tutorial (is there > anything better or more up to date?)) that the combiner only us

Re: named address spaces: addr_space_convert never called

2010-11-08 Thread David Brown
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 shall address program memory where also const

Re: peephole2: dead regs not marked as dead

2010-11-08 Thread Michael Meissner
On Tue, Nov 02, 2010 at 10:41:49AM +0100, Georg Lay wrote: > This solution works: > > Generating a named insn in andsi3-expander as > > (define_insn_and_split "..." > [(set (match_operand:SI 0 "register_operand" "") > (and:SI (match_operand:SI 1 "register_operand" "") >

Re: how much is the effort required to retarget gcc?

2010-11-08 Thread Michael Meissner
On Mon, Nov 01, 2010 at 09:21:14PM +0800, Hui Yan Cheah wrote: > Hi, > > We are working on a new project which requires a retargetting a > compiler to a small cpu on FPGA. > The cpu is hand-coded and it supports only a limited number of instruction > sets. > > My questions are: > > 1. Since I h

Re: UNITS_PER_SIMD_WORD

2010-11-08 Thread Michael Meissner
On Mon, Nov 01, 2010 at 04:52:28PM +0200, roy rosen wrote: > Hi All, > > Is it possible to define UNITS_PER_SIMD_WORD as a global variable and > to set this varibale using a pragma (even once for a compilation) and > that way to be able to compile one file with UNITS_PER_SIMD_WORD = 8 > and anothe

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

2010-11-08 Thread Dave Korn
On 08/11/2010 13:44, Joakim Tjernlund wrote: > One ping and a few days later and nothing. Very frustrating. I don't > believe all PPC devs are so "busy" that none has the time to look > at a simple one liner. What is up? There's only the one of him. He probably is that busy. He's a very nice

Merging gdc (Gnu D Compiler) into gcc

2010-11-08 Thread Walter Bright
Who do I need to talk to in order to resolve the various licensing issues so this becomes possible? Walter Bright Digital Mars http://www.digitalmars.com free C, C++, D programming language compilers

Re: Merging gdc (Gnu D Compiler) into gcc

2010-11-08 Thread Joseph S. Myers
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 this list. The standard assignment and licensing policies are as described in the Mission Statement

Re: Merging gdc (Gnu D Compiler) into gcc

2010-11-08 Thread Walter Bright
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 this list. The standard assignment and licensing policies are as described i

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

2010-11-08 Thread Peter Bergner
latOn Mon, 2010-11-08 at 21:13 +, Dave Korn wrote: > On 08/11/2010 13:44, Joakim Tjernlund wrote: > > One ping and a few days later and nothing. Very frustrating. I don't > > believe all PPC devs are so "busy" that none has the time to look > > at a simple one liner. What is up? > > There's

Re: UNITS_PER_SIMD_WORD

2010-11-08 Thread roy rosen
This is what I done. It works well. Thanks to everybody. 2010/11/8 Michael Meissner : > On Mon, Nov 01, 2010 at 04:52:28PM +0200, roy rosen wrote: >> Hi All, >> >> Is it possible to define UNITS_PER_SIMD_WORD as a global variable and >> to set this varibale using a pragma (even once for a compilat

Re: define_split

2010-11-08 Thread roy rosen
2010/11/8 Michael Meissner : > On Thu, Oct 28, 2010 at 09:11:44AM +0200, roy rosen wrote: >> Hi all, >> >> I am trying to use define_split, but it seems to me that I don't >> understand how it is used. >> It says in the gccint.pdf (which I use as my tutorial (is there >> anything better or more up