WARNING bootstrapping GFortran on Cygwin

2007-08-22 Thread Angelo Graziosi
With GFortran 4.3.0-20070821 trunk-127680 there is this warning: [ -f stage_final ] || echo stage3 > stage_final make[1]: Entering directory `/tmp/gcc/build' make[2]: Entering directory `/tmp/gcc/build' make[2]: Leaving directory `/tmp/gcc/build' make[2]: Entering directory `/tmp/gcc/build' Conf

Re: WARNING bootstrapping GFortran on Cygwin

2007-08-22 Thread Brian Dessent
Angelo Graziosi wrote: > configure: WARNING: fixed-point is not supported for this target >^ > checking whether make sets $(MAKE)... yes > ... > > This warning was absent with the bootstrap I did 20070819 trunk-127626. That's becaus

Re: Implementing VMX128 AltiVec Variant

2007-08-22 Thread Gordan Bobic
On Tue, 21 Aug 2007, Ian Lance Taylor wrote: With the modifications I made, GCC still compiled fine. However, libgcc and libstdc++ DO still get build with the missing instructions (according to objdump -D). Why is that? Is that a consequence of the ADA files? Or something else? Where should I lo

Re: Implementing VMX128 AltiVec Variant

2007-08-22 Thread Paolo Bonzini
Gordan Bobic wrote: On Tue, 21 Aug 2007, Ian Lance Taylor wrote: With the modifications I made, GCC still compiled fine. However, libgcc and libstdc++ DO still get build with the missing instructions (according to objdump -D). Why is that? Is that a consequence of the ADA files? Or something el

Re: recent troubles with float vectors & bitwise ops

2007-08-22 Thread Paolo Bonzini
Apparently enough for a small vendor like Intel to propose such things as orps, andps, andnps, and xorps. I think you're running too far with your sarcasm. SSE's instructions do not go so far as to specify integer vs. floating point. To me, "ps" means "32-bit SIMD", independent of integerness

Re: Implementing VMX128 AltiVec Variant

2007-08-22 Thread Gordan Bobic
On Wed, 22 Aug 2007, Paolo Bonzini wrote: > > With the modifications I made, GCC still compiled fine. However, > > libgcc and libstdc++ DO still get build with the missing instructions > > (according to objdump -D). Why is that? Is that a consequence of the > > ADA files? Or something else?

RE: recent troubles with float vectors & bitwise ops

2007-08-22 Thread Dave Korn
On 22 August 2007 06:10, Ian Lance Taylor wrote: > tbp <[EMAIL PROTECTED]> writes: > >> vecop.cc:4: error: invalid operands of types 'float __vector__' and >> 'float __vector__' to binary 'operator|' >> vecop.cc:5: error: invalid operands of types 'float __vector__' and >> 'float __vector__' to b

Re: recent troubles with float vectors & bitwise ops

2007-08-22 Thread Andrew Pinski
On 8/21/07, tbp <[EMAIL PROTECTED]> wrote: > # /usr/local/gcc-4.3-svn.old6/bin/g++ vecop.cc > vecop.cc: In function 'T foo() [with T = float __vector__]': > vecop.cc:13: instantiated from here > vecop.cc:4: error: invalid operands of types 'float __vector__' and > 'float __vector__' to binary 'op

[c++0x] parameter packs in class templates

2007-08-22 Thread Jan van Dijk
Good afternoon, Today I started to play around with g++' c++0x mode. I tried to compile the following toy program: template struct pack_size { enum { value = 1 + pack_size::value }; }; template struct pack_size { enum { value = 1 }; }; struct A{}; void foo() {

RE: recent troubles with float vectors & bitwise ops

2007-08-22 Thread Dave Korn
On 22 August 2007 11:13, Andrew Pinski wrote: > On 8/21/07, tbp <[EMAIL PROTECTED]> wrote: >> # /usr/local/gcc-4.3-svn.old6/bin/g++ vecop.cc >> vecop.cc: In function 'T foo() [with T = float __vector__]': >> vecop.cc:13: instantiated from here >> vecop.cc:4: error: invalid operands of types 'flo

Re: recent troubles with float vectors & bitwise ops

2007-08-22 Thread Andrew Pinski
On 8/22/07, Dave Korn <[EMAIL PROTECTED]> wrote: > float InvSqrt (float x){ > float xhalf = 0.5f*x; > int i = *(int*)&x; You are violating C/C++ aliasing rules here anyways. > i = 0x5f3759df - (i>>1); > x = *(float*)&i; Likewise. So I guess you like to depend on undefined code :

RE: recent troubles with float vectors & bitwise ops

2007-08-22 Thread Dave Korn
On 22 August 2007 11:40, Andrew Pinski wrote: > On 8/22/07, Dave Korn <[EMAIL PROTECTED]> wrote: >> float InvSqrt (float x){ >> float xhalf = 0.5f*x; >> int i = *(int*)&x; > > You are violating C/C++ aliasing rules here anyways. > >> i = 0x5f3759df - (i>>1); >> x = *(float*)&i; >

Re: pragma-like warning turn off ?

2007-08-22 Thread Robert Dewar
Ian Lance Taylor wrote: It's fairly difficult. You want a way to turn off specific warnings for specific parts of the IR. The IR is combined and rearranged during optimization, so you need to figure out how to make the warning control track those changes. A simpler approach, used in the GNAT

Re: PR179 reopened (was it ever fixed?)

2007-08-22 Thread Manuel López-Ibáñez
On 16/08/07, Diego Novillo <[EMAIL PROTECTED]> wrote: > On 8/16/07 6:18 AM, Manuel López-Ibáñez wrote: > > That's right. In this case variable 'i' is an addressable local, so it > is not put in normal SSA form. It's in virtual SSA form (use the -vops > option when dumping the IL). We don't warn

Re: recent troubles with float vectors & bitwise ops

2007-08-22 Thread Rask Ingemann Lambertsen
On Wed, Aug 22, 2007 at 11:47:52AM +0100, Dave Korn wrote: > > Well, I like to think that I could cast the address to unsigned char*, > memcpy a bunch of them to the address of an int, then dereference the int and > the compiler would realise it was a no-op and optimise it away, but I doubt >

RE: recent troubles with float vectors & bitwise ops

2007-08-22 Thread Dave Korn
On 22 August 2007 14:06, Rask Ingemann Lambertsen wrote: > On Wed, Aug 22, 2007 at 11:47:52AM +0100, Dave Korn wrote: >> >> Well, I like to think that I could cast the address to unsigned char*, >> memcpy a bunch of them to the address of an int, then dereference the int and >> the compiler wou

Re: pragma-like warning turn off ?

2007-08-22 Thread Ian Lance Taylor
Robert Dewar <[EMAIL PROTECTED]> writes: > Ian Lance Taylor wrote: > > > It's fairly difficult. You want a way to turn off specific warnings > > for specific parts of the IR. The IR is combined and rearranged > > during optimization, so you need to figure out how to make the warning > > control

Re: pragma-like warning turn off ?

2007-08-22 Thread DJ Delorie
Ian Lance Taylor <[EMAIL PROTECTED]> writes: > Let's do that. We've already talked about keeping track of the source location of each #pragma, and searching them for the "state" at a given line. The diagnostic machinery seems to be able to tell what file/line each diagnostic is for, we should be

Re: recent troubles with float vectors & bitwise ops

2007-08-22 Thread Ross Ridge
tbp writes: >Apparently enough for a small vendor like Intel to propose such things >as orps, andps, andnps, and xorps. Paolo Bonzini writes: >I think you're running too far with your sarcasm. SSE's instructions >do not go so far as to specify integer vs. floating point. To me, "ps" >means "32-bi

Re: recent troubles with float vectors & bitwise ops

2007-08-22 Thread tbp
On 8/22/07, Paolo Bonzini <[EMAIL PROTECTED]> wrote: > I think you're running too far with your sarcasm. SSE's instructions do > not go so far as to specify integer vs. floating point. To me, "ps" > means "32-bit SIMD", independent of integerness. Excuse me if i'm amazed being replied bitwise ops

Re: Why is building a cross compiler "out-of-the-box" always broken?

2007-08-22 Thread Rask Ingemann Lambertsen
On Sun, Aug 19, 2007 at 10:09:25AM +0200, Paolo Bonzini wrote: > > > Thanks for reminding me to ping that patch. > > Could you try moving this case statement > > + case "$target" in > + i[[3456]]86-*-elf* | i[[3456]]86-*-coff*) > + libgloss_dir=i386 > + ;; > + m

Re: recent troubles with float vectors & bitwise ops

2007-08-22 Thread Andrew Pinski
On 8/22/07, tbp <[EMAIL PROTECTED]> wrote: > On 8/22/07, Paolo Bonzini <[EMAIL PROTECTED]> wrote: > > I think you're running too far with your sarcasm. SSE's instructions do > > not go so far as to specify integer vs. floating point. To me, "ps" > > means "32-bit SIMD", independent of integerness.

Re: recent troubles with float vectors & bitwise ops

2007-08-22 Thread Andrew Pinski
On 8/22/07, Andrew Pinski <[EMAIL PROTECTED]> wrote: > Which hardware (remember GCC is a generic compiler)? VMX/Altivec and > SPU actually does not have different instructions for bitwise > and/ior/xor for different vector types (it is all the same > instruction). I have ran into ICEs with even b

Re: pragma-like warning turn off ?

2007-08-22 Thread Robert Dewar
DJ Delorie wrote: Ian Lance Taylor <[EMAIL PROTECTED]> writes: Let's do that. We've already talked about keeping track of the source location of each #pragma, and searching them for the "state" at a given line. The diagnostic machinery seems to be able to tell what file/line each diagnostic i

gcc-4.2-20070822 is now available

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

Re: pragma-like warning turn off ?

2007-08-22 Thread DJ Delorie
> How do you know that code motion will not move things across the > pragmas in a backwards direction? How do the warnings know what line to report *now* ?

Re: recent troubles with float vectors & bitwise ops

2007-08-22 Thread Ross Ridge
Ross Ridge writes: >tbp is correct. Using casts gets you the integer bitwise instrucitons, >not the single-precision bitwise instructions that are more optimal for >flipping bits in single-precision vectors. If you want GCC to generate >better code using single-precision bitwise instructions you'

Re: recent troubles with float vectors & bitwise ops

2007-08-22 Thread Andrew Pinski
On 8/22/07, Ross Ridge <[EMAIL PROTECTED]> wrote: > GCC makes the problem is even worse if only SSE and not SSE 2 instructions > are enabled. Since the integer bitwise instructions are only available > with SSE 2, using casts instead of intrinsics causes GCC to expand the > operation into a long s

Re: recent troubles with float vectors & bitwise ops

2007-08-22 Thread Ross Ridge
Ross Ridge <[EMAIL PROTECTED]> wrote: > GCC makes the problem is even worse if only SSE and not SSE 2 instructions > are enabled. Since the integer bitwise instructions are only available > with SSE 2, using casts instead of intrinsics causes GCC to expand the > operation into a long series of ins

Re: Why is building a cross compiler "out-of-the-box" always broken?

2007-08-22 Thread Paolo Bonzini
Rask Ingemann Lambertsen wrote: On Sun, Aug 19, 2007 at 10:09:25AM +0200, Paolo Bonzini wrote: Thanks for reminding me to ping that patch. Could you try moving this case statement + case "$target" in + i[[3456]]86-*-elf* | i[[3456]]86-*-coff*) + libgloss_dir=i386 +

Re: recent troubles with float vectors & bitwise ops

2007-08-22 Thread Paolo Bonzini
The IA-32 instruction set does distignuish between integer and floating point bitiwse operations. In addition to the single-precision floating-point bitwise instructions that tbp mentioned (ORPS, ANDPS, ANDNPS and XORPS) there are both distinct double-precision floating-point bitwise instructio

Re: recent troubles with float vectors & bitwise ops

2007-08-22 Thread Paolo Bonzini
Why did Intel split up these instructions in the first place, is it because they wanted to have a seperate vector units in some cases? I don't know and I don't care that much. To some extent I agree with Andrew Pinski here. Saying that you need support in a generic vector extension for "vec