public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cygwin 32bit: Can't use gcc -mfpmath=sse
@ 2015-09-09 23:30 HK
  2015-09-10 11:19 ` Václav Haisman
  0 siblings, 1 reply; 6+ messages in thread
From: HK @ 2015-09-09 23:30 UTC (permalink / raw)
  To: cygwin

I've just run across this strange behavior on a recent 32bit installation:

  vega> cat hello.c
#include <stdio.h>
int main(int argc, char** argv){
printf("hello world\n");
}
  vega> gcc -mfpmath=sse hello.c
hello.c:1:0: warning: SSE instruction set disabled, using 387 arithmetics
  #include <stdio.h>
  ^

Why is this? I am pretty sure this used to work in the past.  On the 64bit
installtion it works just fine.

For reference:

  vega> gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-cygwin/4.9.3/lto-wrapper.exe
Target: i686-pc-cygwin
Configured with:  
/cygdrive/i/szsz/tmpp/gcc/gcc-4.9.3-1.i686/src/gcc-4.9.3/configure  
--srcdir=/cygdrive/i/szsz/tmpp/gcc/gcc-4.9.3-1.i686/src/gcc-4.9.3  
--prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc  
--docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C  
--build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-pc-cygwin  
--without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib  
--enable-shared --enable-shared-libgcc --enable-static  
--enable-version-specific-runtime-libs --enable-bootstrap  
--enable-__cxa_atexit --with-dwarf2 --with-arch=i686 --with-tune=generic  
--disable-sjlj-exceptions  
--enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++  
--enable-graphite --enable-threads=posix --enable-libatomic  
--enable-libgomp --disable-libitm --enable-libquadmath  
--enable-libquadmath-support --enable-libssp --enable-libada  
--enable-libjava --enable-libgcj-sublibs --disable-java-awt  
--disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld  
--with-gnu-as --with-cloog-include=/usr/include/cloog-isl  
--without-libiconv-prefix --without-libintl-prefix --with-system-zlib  
--enable-linker-build-id
Thread model: posix
gcc version 4.9.3 (GCC)
  vega>

--
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: Cygwin 32bit: Can't use gcc -mfpmath=sse
  2015-09-09 23:30 Cygwin 32bit: Can't use gcc -mfpmath=sse HK
@ 2015-09-10 11:19 ` Václav Haisman
  0 siblings, 0 replies; 6+ messages in thread
From: Václav Haisman @ 2015-09-10 11:19 UTC (permalink / raw)
  To: cygwin

On 10 September 2015 at 01:30, HK wrote:
> I've just run across this strange behavior on a recent 32bit installation:
>
>  vega> cat hello.c
> #include <stdio.h>
> int main(int argc, char** argv){
> printf("hello world\n");
> }
>  vega> gcc -mfpmath=sse hello.c
> hello.c:1:0: warning: SSE instruction set disabled, using 387 arithmetics

Does it help to use `-march=native`? My hunch is that this is because
the default CPU type is set to such that does not have SSE.

>  #include <stdio.h>
>  ^
>
> Why is this? I am pretty sure this used to work in the past.  On the 64bit
> installtion it works just fine.
>
> For reference:
>
>  vega> gcc -v
> Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-cygwin/4.9.3/lto-wrapper.exe
> Target: i686-pc-cygwin
> Configured with:
> /cygdrive/i/szsz/tmpp/gcc/gcc-4.9.3-1.i686/src/gcc-4.9.3/configure
> --srcdir=/cygdrive/i/szsz/tmpp/gcc/gcc-4.9.3-1.i686/src/gcc-4.9.3
> --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc
> --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C
> --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-pc-cygwin
> --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib
> --enable-shared --enable-shared-libgcc --enable-static
> --enable-version-specific-runtime-libs --enable-bootstrap
> --enable-__cxa_atexit --with-dwarf2 --with-arch=i686 --with-tune=generic
> --disable-sjlj-exceptions
> --enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++ --enable-graphite
> --enable-threads=posix --enable-libatomic --enable-libgomp --disable-libitm
> --enable-libquadmath --enable-libquadmath-support --enable-libssp
> --enable-libada --enable-libjava --enable-libgcj-sublibs --disable-java-awt
> --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld
> --with-gnu-as --with-cloog-include=/usr/include/cloog-isl
> --without-libiconv-prefix --without-libintl-prefix --with-system-zlib
> --enable-linker-build-id
> Thread model: posix
> gcc version 4.9.3 (GCC)
>  vega>


-- 
VH

--
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: Cygwin 32bit: Can't use gcc -mfpmath=sse
  2015-09-11 12:04   ` HK
@ 2015-09-11 13:40     ` Tim Prince
  0 siblings, 0 replies; 6+ messages in thread
From: Tim Prince @ 2015-09-11 13:40 UTC (permalink / raw)
  To: cygwin



On 9/11/2015 8:03 AM, HK wrote:
> On Fri, 11 Sep 2015 10:16:56 +0200, Evgeny Grin <k2k@yandex.ru> wrote:
>
>> 10.09.2015, 23:52, "HK" <hk1020@t-online.de>:
>>> On Thu, 10 Sep 2015 13:19:04 +0200, V?clav_Haisman wrote:
>>>>  On 10 September 2015 at 01:30, HK wrote:
>>>>>  hello.c:1:0: warning: SSE instruction set disabled, using 387
>>>>>  arithmetics
>>>>
>>>>  Does it help to use `-march=native`? My hunch is that this is because
>>>>  the default CPU type is set to such that does not have SSE.
>>>
>>> Yep, that did the trick. Thanks for the suggestion. Now, is this a gcc
>>> build
>>> build problem? The 64bit version doesn't need -march=native and that
>>> is on
>>> the same computer.
>>
>> It's not a problem as by default GCC generate code compatible with
>> maximum number of CPU models.
>> If you need to generate an SSE instructions, you have to use at lest
>> -march=pentium3.
>> For x86-64 version, SSE is always enabled as all x86-64 CPUs support
>> SSE and SSE2.
>> See http://gcc.gnu.org/onlinedocs/gcc/x86-Options.html#x86-Options
>
> Thanks. While I don't quite agree with the choice of defaults it makes
> sense.
> So does my 32bit window next to the 64bit window on the same computer
> really
> have a different instruction set? Anyway, case closed.
Intel compilers made SSE2 the default even for 32-bit mode, subsequent
to all CPUs which supported 387 but not SSE3 going out of production. 
There's still a lot of interest in 387 mode, however. 
You might argue for making SSE3 the default, but it's generally
important nowadays to set an appropriate option for the target platforms.

-- 
Tim Prince


--
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: Cygwin 32bit: Can't use gcc -mfpmath=sse
       [not found] ` <1999691441959416@web12o.yandex.ru>
@ 2015-09-11 12:04   ` HK
  2015-09-11 13:40     ` Tim Prince
  0 siblings, 1 reply; 6+ messages in thread
From: HK @ 2015-09-11 12:04 UTC (permalink / raw)
  To: cygwin, Evgeny Grin

On Fri, 11 Sep 2015 10:16:56 +0200, Evgeny Grin <k2k@yandex.ru> wrote:

> 10.09.2015, 23:52, "HK" <hk1020@t-online.de>:
>> On Thu, 10 Sep 2015 13:19:04 +0200, V?clav_Haisman wrote:
>>>  On 10 September 2015 at 01:30, HK wrote:
>>>>  hello.c:1:0: warning: SSE instruction set disabled, using 387
>>>>  arithmetics
>>>
>>>  Does it help to use `-march=native`? My hunch is that this is because
>>>  the default CPU type is set to such that does not have SSE.
>>
>> Yep, that did the trick. Thanks for the suggestion. Now, is this a gcc
>> build
>> build problem? The 64bit version doesn't need -march=native and that is  
>> on
>> the same computer.
>
> It's not a problem as by default GCC generate code compatible with  
> maximum number of CPU models.
> If you need to generate an SSE instructions, you have to use at lest  
> -march=pentium3.
> For x86-64 version, SSE is always enabled as all x86-64 CPUs support SSE  
> and SSE2.
> See http://gcc.gnu.org/onlinedocs/gcc/x86-Options.html#x86-Options

Thanks. While I don't quite agree with the choice of defaults it makes  
sense.
So does my 32bit window next to the 64bit window on the same computer  
really
have a different instruction set? Anyway, case closed.

--
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: Cygwin 32bit: Can't use gcc -mfpmath=sse
  2015-09-10 20:52 HK
@ 2015-09-10 21:20 ` Yaakov Selkowitz
       [not found] ` <1999691441959416@web12o.yandex.ru>
  1 sibling, 0 replies; 6+ messages in thread
From: Yaakov Selkowitz @ 2015-09-10 21:20 UTC (permalink / raw)
  To: cygwin

On Thu, 2015-09-10 at 22:52 +0200, HK wrote:
> On Thu, 10 Sep 2015 13:19:04 +0200, V?clav_Haisman wrote:
> > On 10 September 2015 at 01:30, HK wrote:
> >> I've just run across this strange behavior on a recent 32bit  
> >> installation:
> >>
> >>  vega> cat hello.c
> >> #include <stdio.h>
> >> int main(int argc, char** argv){
> >> printf("hello world\n");
> >> }
> >>  vega> gcc -mfpmath=sse hello.c
> >> hello.c:1:0: warning: SSE instruction set disabled, using 387  
> >> arithmetics
> >
> > Does it help to use `-march=native`? My hunch is that this is because
> > the default CPU type is set to such that does not have SSE.
> 
> Yep, that did the trick. Thanks for the suggestion. Now, is this a gcc  
> build problem?  The 64bit version doesn't need -march=native and that is on
> the same computer.

It's not a bug.  SSE and SSE2 are part of the core x86_64 instruction
set.

--
Yaakov



--
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: Cygwin 32bit: Can't use gcc -mfpmath=sse
@ 2015-09-10 20:52 HK
  2015-09-10 21:20 ` Yaakov Selkowitz
       [not found] ` <1999691441959416@web12o.yandex.ru>
  0 siblings, 2 replies; 6+ messages in thread
From: HK @ 2015-09-10 20:52 UTC (permalink / raw)
  To: cygwin

On Thu, 10 Sep 2015 13:19:04 +0200, V?clav_Haisman wrote:
> On 10 September 2015 at 01:30, HK wrote:
>> I've just run across this strange behavior on a recent 32bit  
>> installation:
>>
>>  vega> cat hello.c
>> #include <stdio.h>
>> int main(int argc, char** argv){
>> printf("hello world\n");
>> }
>>  vega> gcc -mfpmath=sse hello.c
>> hello.c:1:0: warning: SSE instruction set disabled, using 387  
>> arithmetics
>
> Does it help to use `-march=native`? My hunch is that this is because
> the default CPU type is set to such that does not have SSE.
>

Yep, that did the trick. Thanks for the suggestion. Now, is this a gcc  
build
build problem?  The 64bit version doesn't need -march=native and that is on
the same computer.

>>  #include <stdio.h>
>>  ^
>>
>> Why is this? I am pretty sure this used to work in the past.  On the  
>> 64bit
>> installtion it works just fine.
>>
>> For reference:
>>
>>  vega> gcc -v
>> Using built-in specs.
>> COLLECT_GCC=gcc
>> COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-cygwin/4.9.3/lto-wrapper.exe
>> Target: i686-pc-cygwin
>> Configured with:
>> /cygdrive/i/szsz/tmpp/gcc/gcc-4.9.3-1.i686/src/gcc-4.9.3/configure
>> --srcdir=/cygdrive/i/szsz/tmpp/gcc/gcc-4.9.3-1.i686/src/gcc-4.9.3
>> --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc
>> --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C
>> --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-pc-cygwin
>> --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib
>> --enable-shared --enable-shared-libgcc --enable-static
>> --enable-version-specific-runtime-libs --enable-bootstrap
>> --enable-__cxa_atexit --with-dwarf2 --with-arch=i686 --with-tune=generic
>> --disable-sjlj-exceptions
>> --enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++  
>> --enable-graphite
>> --enable-threads=posix --enable-libatomic --enable-libgomp  
>> --disable-libitm
>> --enable-libquadmath --enable-libquadmath-support --enable-libssp
>> --enable-libada --enable-libjava --enable-libgcj-sublibs  
>> --disable-java-awt
>> --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld
>> --with-gnu-as --with-cloog-include=/usr/include/cloog-isl
>> --without-libiconv-prefix --without-libintl-prefix --with-system-zlib
>> --enable-linker-build-id
>> Thread model: posix
>> gcc version 4.9.3 (GCC)
>>  vega>

--
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:[~2015-09-11 13:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-09 23:30 Cygwin 32bit: Can't use gcc -mfpmath=sse HK
2015-09-10 11:19 ` Václav Haisman
2015-09-10 20:52 HK
2015-09-10 21:20 ` Yaakov Selkowitz
     [not found] ` <1999691441959416@web12o.yandex.ru>
2015-09-11 12:04   ` HK
2015-09-11 13:40     ` Tim Prince

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).