Re: How to support 40bit GP register - Take two

2009-12-17 Thread Mohamed Shafi
2009/12/18 Hans-Peter Nilsson : > On Fri, 20 Nov 2009, Mohamed Shafi wrote: >> I tried implementing the suggestion given by Richard, but got into >> issues. The GCC frame work is written assuming that there are no modes >> with HOST_BITS_PER_WIDE_INT < GET_MODE_BITSIZE (mode) < 2 * >> HOST_BITS_PER

Re: How to support 40bit GP register - Take two

2009-12-17 Thread Hans-Peter Nilsson
On Fri, 20 Nov 2009, Mohamed Shafi wrote: > I tried implementing the suggestion given by Richard, but got into > issues. The GCC frame work is written assuming that there are no modes > with HOST_BITS_PER_WIDE_INT < GET_MODE_BITSIZE (mode) < 2 * > HOST_BITS_PER_WIDE_INT. (Not seeing a reply regard

Re: updated code size comparison

2009-12-17 Thread John Regehr
Yes, that was my point. If you want to make a separate section for volatile, that would indeed be helpful. I checked and there are about 37,000 harvested functions containing the volatile qualifier. Next time, there will be even more since we'll be harvesting code from the FreeBSD kernel in

Re: GMP and GCC 4.3.2

2009-12-17 Thread Jie Zhang
On 12/18/2009 06:27 AM, Jean Christophe Beyler wrote: Actually, I just finished updating my 4.3.2 to 4.3.3 and tested it and I still have the same issue. This seems to be a problem more than "just" 4.3.2. Here is the test program: #include #include int main() { mpz_t a,b; mpz_init_se

gcc-4.5-20091217 is now available

2009-12-17 Thread gccadmin
Snapshot gcc-4.5-20091217 is now available on ftp://gcc.gnu.org/pub/gcc/snapshots/4.5-20091217/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 4.5 SVN branch with the following options: svn://gcc.gnu.org/svn/gcc/trunk

Re: GMP and GCC 4.3.2

2009-12-17 Thread Jean Christophe Beyler
Actually, I just finished updating my 4.3.2 to 4.3.3 and tested it and I still have the same issue. This seems to be a problem more than "just" 4.3.2. Here is the test program: #include #include int main() { mpz_t a,b; mpz_init_set_str(a, "100", 10); // program works with 10^9,

Re: [LLVMdev] updated code size comparison

2009-12-17 Thread Bill Wendling
On Dec 16, 2009, at 1:26 AM, Paolo Bonzini wrote: > On 12/16/2009 03:21 AM, John Regehr wrote: >> Hopefully the results are more fair and useful now. Again, feedback is >> appreciated. > > I would also avoid testcases using volatile. Smaller code on these > testcases is often a sign of miscomp

Re: GCC presentation targeted to users (43 slides in english)

2009-12-17 Thread Eric Botcazou
> Yes I explained it during the presentation (on native vs cross) but I > couldn't remember in what version the change was made so I erred on the > safe side :). GCC 4.2 I think. -- Eric Botcazou

Re: GCC presentation targeted to users (43 slides in english)

2009-12-17 Thread Laurent GUERBY
On Thu, 2009-12-17 at 21:02 +0100, Eric Botcazou wrote: > > The 43 slides presentation in english is available here > > in PDF and openoffice format: > > > > http://guerby.org/ftp/gcc-toulibre-20091216.pdf > > http://guerby.org/ftp/gcc-toulibre-20091216.odp > > A small nit: you don't need to do 'm

Re: GCC presentation targeted to users (43 slides in english)

2009-12-17 Thread Eric Botcazou
> The 43 slides presentation in english is available here > in PDF and openoffice format: > > http://guerby.org/ftp/gcc-toulibre-20091216.pdf > http://guerby.org/ftp/gcc-toulibre-20091216.odp A small nit: you don't need to do 'make bootstrap' anymore, 'make' is enough. -- Eric Botcazou

Re: [PATCH] ARM: Convert BUG() to use unreachable()

2009-12-17 Thread Russell King - ARM Linux
On Thu, Dec 17, 2009 at 07:48:37PM +, Russell King - ARM Linux wrote: > Given the lack of progress/bug reporting on ARM uclinux, the lack of > platform support and the lack of configurations, my view is that there > is no one actually using it. I know that I don't particularly take any > care

Re: updated code size comparison

2009-12-17 Thread Paolo Bonzini
On Thu, Dec 17, 2009 at 19:54, Eric Botcazou wrote: >> However I would prefer to leave these testcases in, unless there is a >> strong feeling that they are too distracting.  They serve as poignant >> little reminders about how easy it is to get volatile wrong... > > They skew the results in favor

Re: [PATCH] ARM: Convert BUG() to use unreachable()

2009-12-17 Thread Russell King - ARM Linux
On Thu, Dec 17, 2009 at 07:38:26PM +, Jamie Lokier wrote: > Joe Buck wrote: > > On Thu, Dec 17, 2009 at 11:06:13AM -0800, Russell King - ARM Linux wrote: > > > On Thu, Dec 17, 2009 at 10:35:17AM -0800, Joe Buck wrote: > > > > Besides, didn't I see a whole bunch of kernel security patches relate

Re: [PATCH] ARM: Convert BUG() to use unreachable()

2009-12-17 Thread Jamie Lokier
Joe Buck wrote: > On Thu, Dec 17, 2009 at 11:06:13AM -0800, Russell King - ARM Linux wrote: > > On Thu, Dec 17, 2009 at 10:35:17AM -0800, Joe Buck wrote: > > > Besides, didn't I see a whole bunch of kernel security patches related > > > to null pointer dereferences lately? If page 0 can be mapped,

Re: [PATCH] ARM: Convert BUG() to use unreachable()

2009-12-17 Thread David Daney
Joe Buck wrote: On Thu, Dec 17, 2009 at 11:06:13AM -0800, Russell King - ARM Linux wrote: On Thu, Dec 17, 2009 at 10:35:17AM -0800, Joe Buck wrote: Besides, didn't I see a whole bunch of kernel security patches related to null pointer dereferences lately? If page 0 can be mapped, you suddenly

Re: [PATCH] ARM: Convert BUG() to use unreachable()

2009-12-17 Thread Russell King - ARM Linux
On Thu, Dec 17, 2009 at 11:14:01AM -0800, Joe Buck wrote: > On Thu, Dec 17, 2009 at 11:06:13AM -0800, Russell King - ARM Linux wrote: > > On Thu, Dec 17, 2009 at 10:35:17AM -0800, Joe Buck wrote: > > > Besides, didn't I see a whole bunch of kernel security patches related > > > to null pointer dere

Re: [PATCH] ARM: Convert BUG() to use unreachable()

2009-12-17 Thread Joe Buck
On Thu, Dec 17, 2009 at 11:06:13AM -0800, Russell King - ARM Linux wrote: > On Thu, Dec 17, 2009 at 10:35:17AM -0800, Joe Buck wrote: > > Besides, didn't I see a whole bunch of kernel security patches related > > to null pointer dereferences lately? If page 0 can be mapped, you > > suddenly won't

Re: [PATCH] ARM: Convert BUG() to use unreachable()

2009-12-17 Thread Russell King - ARM Linux
On Thu, Dec 17, 2009 at 10:35:17AM -0800, Joe Buck wrote: > Besides, didn't I see a whole bunch of kernel security patches related > to null pointer dereferences lately? If page 0 can be mapped, you > suddenly won't get your trap. Page 0 can not be mapped on ARM kernels since the late 1990s, and

Re: [PATCH] ARM: Convert BUG() to use unreachable()

2009-12-17 Thread Jamie Lokier
Russell King - ARM Linux wrote: > Let me put it another way: I want this function to terminate with an > explicit NULL pointer dereference in every case. __builtin_trap cannot be used because the GCC manual says "The mechanism used may vary from release to release so you should not rely on any par

Re: Linking against an specific glibc

2009-12-17 Thread H.J. Lu
On Thu, Dec 17, 2009 at 10:48 AM, Douglas Gemignani wrote: > Hi, > > What command line? I found this -nostdinc  and -I to include folders, -b also? Here is a Makefile to link against the newly built glibc. H.J. > []s > Douglas Gemignani > > > > On Thu, Dec 17, 2009 at 4:11 PM, H.J. Lu wro

Re: updated code size comparison

2009-12-17 Thread Eric Botcazou
> However I would prefer to leave these testcases in, unless there is a > strong feeling that they are too distracting. They serve as poignant > little reminders about how easy it is to get volatile wrong... They skew the results in favor of the less careful compilers so they are more than simpl

Re: Linking against an specific glibc

2009-12-17 Thread Douglas Gemignani
Hi, What command line? I found this -nostdinc and -I to include folders, -b also? []s Douglas Gemignani On Thu, Dec 17, 2009 at 4:11 PM, H.J. Lu wrote: > On Thu, Dec 17, 2009 at 10:00 AM, Douglas Gemignani > wrote: >> Hello, >> >> I would like to know if it is possible to link binaries agai

Re: [PATCH] ARM: Convert BUG() to use unreachable()

2009-12-17 Thread Joe Buck
On Thu, Dec 17, 2009 at 10:17:18AM -0800, Russell King - ARM Linux wrote: > > It shouldn't as *(int *)0 = 0; might trap. But if you want to be sure > > use > >__builtin_trap (); > > instead for the whole sequence (the unreachable is implied then). > > GCC choses a size-optimal trap representat

Re: [PATCH] ARM: Convert BUG() to use unreachable()

2009-12-17 Thread Russell King - ARM Linux
On Thu, Dec 17, 2009 at 06:17:11PM +0100, Richard Guenther wrote: > On Thu, Dec 17, 2009 at 6:09 PM, David Daney > wrote: > > Jamie Lokier wrote: > >> > >> Uwe Kleine-König wrote: > >>> > >>> Use the new unreachable() macro instead of for(;;); > >>>        *(int *)0 = 0; > >>>          /* Avoid "

Re: Linking against an specific glibc

2009-12-17 Thread H.J. Lu
On Thu, Dec 17, 2009 at 10:00 AM, Douglas Gemignani wrote: > Hello, > > I would like to know if it is possible to link binaries against old > versions of glibc. What's the best way to do that? > If I specify -L to point to my old glibc will be enough? I don't want > to "install" those old librarie

Linking against an specific glibc

2009-12-17 Thread Douglas Gemignani
Hello, I would like to know if it is possible to link binaries against old versions of glibc. What's the best way to do that? If I specify -L to point to my old glibc will be enough? I don't want to "install" those old libraries on my machine, so I just compiled the old glibc with my current stabl

Re: updated code size comparison

2009-12-17 Thread John Regehr
Hi Paolo, I would also avoid testcases using volatile. Smaller code on these testcases is often a sign of miscompilation rather than optimization. For example, http://embed.cs.utah.edu/embarrassing/src_harvested_dec_09/076389.c is miscompiled on GCC 3.4 and SunCC 5.10. Yeah, there are defin

Re: [PATCH] ARM: Convert BUG() to use unreachable()

2009-12-17 Thread Richard Guenther
On Thu, Dec 17, 2009 at 6:09 PM, David Daney wrote: > Jamie Lokier wrote: >> >> Uwe Kleine-König wrote: >>> >>> Use the new unreachable() macro instead of for(;;); >>>        *(int *)0 = 0; >>>          /* Avoid "noreturn function does return" */ >>> -       for (;;); >>> +       unreachable(); >>

Re: [PATCH] ARM: Convert BUG() to use unreachable()

2009-12-17 Thread David Daney
Jamie Lokier wrote: Uwe Kleine-König wrote: Use the new unreachable() macro instead of for(;;); *(int *)0 = 0; /* Avoid "noreturn function does return" */ - for (;;); + unreachable(); Will GCC-4.5 remove ("optimise away") the *(int *)0 = 0 because it knows the branch o

Re: A question about loop-unroll

2009-12-17 Thread Richard Guenther
2009/12/17 Zdenek Dvorak : > Hi, > >> > Is there a way to pass to the unroller the maximum number of iterations >> > of the loop such that it can decide to avoid unrolling if >> > the maximum number  is small. >> > >> > To be more specific, I am referring to the following case: >> > After the vecto

Re: A question about loop-unroll

2009-12-17 Thread Zdenek Dvorak
Hi, > > Is there a way to pass to the unroller the maximum number of iterations > > of the loop such that it can decide to avoid unrolling if > > the maximum number  is small. > > > > To be more specific, I am referring to the following case: > > After the vectorizer decides to peel for alignment

Re: A question about loop-unroll

2009-12-17 Thread Richard Guenther
On Thu, Dec 17, 2009 at 1:07 PM, Revital1 Eres wrote: > > Hello, > > Is there a way to pass to the unroller the maximum number of iterations > of the loop such that it can decide to avoid unrolling if > the maximum number  is small. > > To be more specific, I am referring to the following case: >

A question about loop-unroll

2009-12-17 Thread Revital1 Eres
Hello, Is there a way to pass to the unroller the maximum number of iterations of the loop such that it can decide to avoid unrolling if the maximum number is small. To be more specific, I am referring to the following case: After the vectorizer decides to peel for alignment it creates three lo

Re: GCC presentation targeted to users (43 slides in english)

2009-12-17 Thread Richard Guenther
On Thu, Dec 17, 2009 at 12:29 PM, Laurent GUERBY wrote: > Hi, > > FYI I just did a ~2 hours presentation of the GCC project to > my local LUG in Toulouse, France: > > http://toulibre.org > > The 43 slides presentation in english is available here > in PDF and openoffice format: > > http://guerby.o

GCC presentation targeted to users (43 slides in english)

2009-12-17 Thread Laurent GUERBY
Hi, FYI I just did a ~2 hours presentation of the GCC project to my local LUG in Toulouse, France: http://toulibre.org The 43 slides presentation in english is available here in PDF and openoffice format: http://guerby.org/ftp/gcc-toulibre-20091216.pdf http://guerby.org/ftp/gcc-toulibre-2009121

Re: GMP and GCC 4.3.2

2009-12-17 Thread Jay Foad
If it's the bug being discussed here: http://gmplib.org/list-archives/gmp-discuss/2009-April/003717.html ... then it was reported as fixed here: http://gcc.gnu.org/ml/gcc/2009-04/msg00562.html Jay.

Re: GMP and GCC 4.3.2

2009-12-17 Thread Andrew Haley
Jean Christophe Beyler wrote: > Dear all, > > Found on http://gmplib.org/. > > "N.B. gcc 4.3.2 miscompiles GMP 4.3.x on 64-bit machines. The problem > is specific to that very release; specifically gcc 4.3.1 and 4.3.3 > seem to work fine." > > Since porting to a newer version is difficult for me