[Bug target/16584] -msse2 also enabling -mfpmath=sse option causing illegal instruction errors

2005-01-05 Thread uros at kss-loka dot si

--- Additional Comments From uros at kss-loka dot si  2005-01-05 09:59 
---
CVSROOT:/cvs/gcc
Module name:gcc
Changes by: [EMAIL PROTECTED]   2005-01-05 09:55:57

Modified files:
gcc: ChangeLog 
gcc/doc: invoke.texi 

Log message:
* doc/invoke.texi (Intel 386 and AMD x86-64 Options):
Replace i387 with 'i386 compiler' in -mfpmath=sse option.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7028&r2=2.7029
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/doc/invoke.texi.diff?cvsroot=gcc&r1=1.563&r2=1.564


-- 
   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16584


[Bug target/16584] -msse2 also enabling -mfpmath=sse option causing illegal instruction errors

2004-12-28 Thread uros at kss-loka dot si

--- Additional Comments From uros at kss-loka dot si  2004-12-28 15:33 
---
A documentation patch is waiting for review:
http://gcc.gnu.org/ml/gcc-patches/2004-12/msg01895.html

I guess that documentation patches doesn't qualify for 'patch' keyword. However,
this bug should be marked as INVALID.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16584


[Bug target/16584] -msse2 also enabling -mfpmath=sse option causing illegal instruction errors

2004-12-24 Thread uros at kss-loka dot si

--- Additional Comments From uros at kss-loka dot si  2004-12-24 14:29 
---
With current TARGET_SSE_MATH work, mainline gcc produces:

main:
  pushl  %ebp
  movl   %esp, %ebp
  subl   $24, %esp
  andl   $-16, %esp
  movl   $0, %eax
  addl   $15, %eax
  addl   $15, %eax
  shrl   $4, %eax
  sall   $4, %eax
  subl   %eax, %esp
  movl   $1, -8(%ebp)
  movl   -8(%ebp), %eax
  imull  -8(%ebp), %eax
  pushl  %eax
  fildl  (%esp)
  leal   4(%esp), %esp
  fstps  -4(%ebp)
  movl   $0, %eax
  leave
  ret

However, -mfpmath just tells which instruction set is preferred. It is -msse,
-mmmx etc. that tells the compiler which instructions it can use, independently
of -mfpmath setting. For example, cvttss2si insn will be generated when -msse is
specified, no matter what -mfpmath setting you use.

-mmmx, -msse and -msse2 are treated the same way as -march=pentium3, etc. You
can not run the code, compiled with -march=pentium4 on i586.

However, this part of documentation should be fixed:

  For i387 you need to use `-march=CPU-TYPE', `-msse' or
  `-msse2' switches to enable SSE extensions and make this
 
I belive, it should read:

  For i386 compiler, you need to use `-march=CPU-TYPE', `-msse' or
  `-msse2' switches to enable SSE extensions and make this
 
Uros.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16584