public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/26176]  New: -mtune=i686 builds code including CMOV
@ 2006-02-08 16:10 themgt at mail dot ru
  2006-02-08 16:16 ` [Bug other/26176] " rguenth at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: themgt at mail dot ru @ 2006-02-08 16:10 UTC (permalink / raw)
  To: gcc-bugs

I use a VIA Samuel 2 processor, which is a i686, but does not have the cmov
capability. Therefore i used -march=i586 -mtune=i686 on my machine, because i
thought mtune would tune for that architecture but leaves it compatibile to
lower archs. 

But  objdump -d /usr/lib/modules/libfb.so | grep cmov shows this:
   16cb7:       0f 4c e8                cmovl  %eax,%ebp
   16cc0:       0f 4f f0                cmovg  %eax,%esi
   16ccb:       0f 4d 44 24 10          cmovge 0x10(%esp),%eax
   16ce2:       0f 4f f8                cmovg  %eax,%edi
   16eb5:       0f 45 83 e4 fd ff ff    cmovne 0xfffffde4(%ebx),%eax
   179ba:       0f 4c 74 24 28          cmovl  0x28(%esp),%esi
   179c3:       0f 4f 54 24 30          cmovg  0x30(%esp),%edx
   179d8:       0f 4c 4c 24 2c          cmovl  0x2c(%esp),%ecx
   179e1:       0f 4f 44 24 34          cmovg  0x34(%esp),%eax

So it is defenitly not downward compatible.
According to my information, this is a bug and leads to unusable binaries on my
system.

My /proc/cpuinfo:
processor       : 0
vendor_id       : CentaurHauls
cpu family      : 6
model           : 7
model name      : VIA Samuel 2
stepping        : 3
cpu MHz         : 599.899
cache size      : 64 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu de tsc msr cx8 mtrr pge mmx 3dnow
bogomips        : 1183.74

i686 works fine as long as it does not contain cmov operations.
I am using gentoo and this was part of the make.cong file which produced the
bug:
CFLAGS="-Os -march=i586 -mtune=i686 -mmmx -m3dnow -pipe -fomit-frame-pointer"
CHOST="i586-pc-linux-gnu"

This is my first bug here, so have merci ;) I wasn't sure which in which
component this belongs, so i filed it to other. 
Is it a problem to check the cpu flags, and if they don't contain cmov, then
cmov should not be used?


-- 
           Summary: -mtune=i686 builds code including CMOV
           Product: gcc
           Version: 3.4.5
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: themgt at mail dot ru


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


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

end of thread, other threads:[~2006-02-09 21:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-08 16:10 [Bug other/26176] New: -mtune=i686 builds code including CMOV themgt at mail dot ru
2006-02-08 16:16 ` [Bug other/26176] " rguenth at gcc dot gnu dot org
2006-02-08 17:00 ` [Bug target/26176] " pinskia at gcc dot gnu dot org
2006-02-08 17:30 ` themgt at mail dot ru
2006-02-09 10:06 ` rguenth at gcc dot gnu dot org
2006-02-09 21:08 ` themgt at mail dot ru

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