public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: Problem compiling with SSE intrinsics and -O3
@ 2011-05-15  9:27 Morris, Philip
  0 siblings, 0 replies; 6+ messages in thread
From: Morris, Philip @ 2011-05-15  9:27 UTC (permalink / raw)
  To: cygwin

FYI the error is directly related to the inclusion of the _mm_xor_ps() intrinsic, replacing this with, say _mm_sub_ps() and it compiles without a problem.

Here is the output of -v compile

$ gcc -v -msse2 -O3 -c test.c
Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs
Configured with: /managed/gcc-build/final-v3-bootstrap/gcc-3.4.4-999/configure -
-verbose --program-suffix=-3 --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/s
hare/info --enable-languages=c,ada,c++,d,f77,pascal,java,objc --enable-nls --wit
hout-included-gettext --enable-version-specific-runtime-libs --without-x --enabl
e-libgcj --disable-java-awt --with-system-zlib --enable-interpreter --disable-li
bgcj-debug --enable-threads=posix --enable-java-gc=boehm --disable-win32-registr
y --enable-sjlj-exceptions --enable-hash-synchronization --enable-libstdcxx-debu
g
Thread model: posix
gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
 /usr/lib/gcc/i686-pc-cygwin/3.4.4/cc1.exe -quiet -v -D__CYGWIN32__ -D__CYGWIN__
 -Dunix -D__unix__ -D__unix -idirafter /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../.
./../include/w32api -idirafter /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i68
6-pc-cygwin/lib/../../include/w32api test.c -quiet -dumpbase test.c -msse2 -mtun
e=pentiumpro -auxbase test -O3 -version -o /tmp/ccK2doSW.s
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i6
86-pc-cygwin/include"
ignoring duplicate directory "/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686
-pc-cygwin/lib/../../include/w32api"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/i686-pc-cygwin/3.4.4/include
 /usr/include
 /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api
End of search list.
GNU C version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125) (i686-pc-cygwin
)
        compiled by GNU C version 3.4.4 (cygming special, gdc 0.12, using dmd 0.
125).
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=130992
test.c: In function `vclrx':
test.c:39: internal compiler error: in output_constant_pool, at varasm.c:3190
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://cygwin.com/problems.html> for instructions.

Seems like a really old version!

Phil


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: Problem compiling with SSE intrinsics and -O3
@ 2011-05-15  9:54 Morris, Philip
  0 siblings, 0 replies; 6+ messages in thread
From: Morris, Philip @ 2011-05-15  9:54 UTC (permalink / raw)
  To: cygwin

Of course installing the gcc4 packages made everything work !

Sorry for the noise.

Perhaps it is time to make the gcc 4.x the 'default' ?

Thanks for your advice

Phil.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Problem compiling with SSE intrinsics and -O3
@ 2011-05-13 16:17 Morris, Philip
  2011-05-13 17:03 ` Tim Prince
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Morris, Philip @ 2011-05-13 16:17 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 748 bytes --]

(third try, wow you guys really don't want to receive emails !)

Dear Sir/Madam

I have come across a problem when trying to compile a simple program using Cygwin

I just did a fresh install of Cygwin from the net on W7 32bit PC and included make/g++ to build my software (which builds fine on other native linux machines)

When i try to compile the attached file i get this error

$ gcc -msse2 -c -O3 test.c
test.c: In function `vclrx':
test.c:43: internal compiler error: in output_constant_pool, at varasm.c:3190
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://cygwin.com/problems.html> for instructions.

Without the -O3 option all is well

Help appreciated.

Thanks

Phil.



[-- Attachment #2: test.c --]
[-- Type: text/plain, Size: 697 bytes --]


#include <stdio.h>
#include <xmmintrin.h>

void vclrx(float *fc, int k, int n, int f);

void vclrx_csal(
    float *C,
    int K,
    int N,
    int XFLAG);


void vclrx(float *fc, int k, int n, int f)
{
  __m128 *pC = (__m128*)fc;
  __m128 c0,c1,c2,c3;

  if (k != 1)
  {
    printf("vmovx_csal\n");
    vclrx_csal(fc,k,n,f);
    return;
  }

  if (n > 3)
  {
    c0 = _mm_xor_ps(c0,c0);

    while (n >= 4)
    {
      *pC++ = c0;

      n -= 4;
    }
  }

  return;
}

void vclrx_csal(
    float *C,
    int K,
    int N,
    int XFLAG)
{
    ( void ) XFLAG;

    int    i;
    float  zero;

    zero = 0.0;
    C -= K;

    for ( i = 0; i < N; i++ )
    {
        *( C += K ) = zero;
    }
}

[-- Attachment #3: Type: text/plain, Size: 218 bytes --]

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-05-15  9:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-15  9:27 Problem compiling with SSE intrinsics and -O3 Morris, Philip
  -- strict thread matches above, loose matches on Subject: below --
2011-05-15  9:54 Morris, Philip
2011-05-13 16:17 Morris, Philip
2011-05-13 17:03 ` Tim Prince
2011-05-14  3:23 ` Dima Pasechnik
2011-05-15  7:35 ` Yaakov (Cygwin/X)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).