public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: target/8243: GCC 3.2 does not check for CMOV instruction before generating code
@ 2003-02-13 20:36 Pete Gontier
  0 siblings, 0 replies; 4+ messages in thread
From: Pete Gontier @ 2003-02-13 20:36 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR target/8243; it has been noted by GNATS.

From: Pete Gontier <kokorozashi@gontier.org>
To: <gcc-gnats@gcc.gnu.org>,
	<forsmark@odense.kollegienet.dk	<gcc-bugs@gcc.gnu.org	<nobody@gcc.gnu.org	<gcc-prs@gcc.gnu.orgCc:  
Subject: Re: target/8243: GCC 3.2 does not check for CMOV instruction
	before generating code
Date: Thu, 13 Feb 2003 12:34:28 -0800

 circa 2/13/03 11:54 AM, Pete Gontier <kokorozashi@gontier.org> wrote:
 
 > I don't think I fully understand the closure of this bug. I understand if by
 > i686 you really mean Pentium Pro. (I hope that's documented.) The claim that
 > it would be dumb for GCC to generate code which checks for CMOV before using
 > it also makes sense. However, if there were a way to tell GCC not to generate
 > CMOV instructions in the first place, that would seem reasonable, too,
 > assuming there are other i686 optimizations worth doing.
 
 Hmmm. Perhaps this is already present in the form of -march=c3. And from
 what I hear, CMOV was the only significant optimization for i686. If this is
 all true, then feel free to ignore my previous message. (Well, OK, I would
 still appreciate an off-list note.)
 
  --
  
   Pete Gontier <http://www.pete.gontier.org/>
 


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

* Re: target/8243: GCC 3.2 does not check for CMOV instruction before generating code
@ 2003-02-13 19:56 Pete Gontier
  0 siblings, 0 replies; 4+ messages in thread
From: Pete Gontier @ 2003-02-13 19:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR target/8243; it has been noted by GNATS.

From: Pete Gontier <kokorozashi@gontier.org>
To: <gcc-gnats@gcc.gnu.org>,
	<forsmark@odense.kollegienet.dk	<gcc-bugs@gcc.gnu.org	<nobody@gcc.gnu.org	<gcc-prs@gcc.gnu.orgCc:  
Subject: Re: target/8243: GCC 3.2 does not check for CMOV instruction
	before generating code
Date: Thu, 13 Feb 2003 11:54:39 -0800

 I don't think I fully understand the closure of this bug. I understand if by
 i686 you really mean Pentium Pro. (I hope that's documented.) The claim that
 it would be dumb for GCC to generate code which checks for CMOV before using
 it also makes sense. However, if there were a way to tell GCC not to
 generate CMOV instructions in the first place, that would seem reasonable,
 too, assuming there are other i686 optimizations worth doing.
 


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

* Re: target/8243: GCC 3.2 does not check for CMOV instruction before generating code
@ 2002-10-21 23:55 rth
  0 siblings, 0 replies; 4+ messages in thread
From: rth @ 2002-10-21 23:55 UTC (permalink / raw)
  To: forsmark, gcc-bugs, gcc-prs, nobody

Synopsis: GCC 3.2 does not check for CMOV instruction before generating code

State-Changed-From-To: open->closed
State-Changed-By: rth
State-Changed-When: Mon Oct 21 23:55:43 2002
State-Changed-Why:
    Defined as "not a bug".  When we say i686, we really do mean
    "pentiumpro".  Checking for cmov is a waste of time; it'd be
    faster to not use it than to check.
    
    Use -march=i586 instead.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8243


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

* target/8243: GCC 3.2 does not check for CMOV instruction before generating code
@ 2002-10-16 10:16 forsmark
  0 siblings, 0 replies; 4+ messages in thread
From: forsmark @ 2002-10-16 10:16 UTC (permalink / raw)
  To: gcc-gnats

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1679 bytes --]


>Number:         8243
>Category:       target
>Synopsis:       GCC 3.2 does not check for CMOV instruction before generating code
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 16 10:16:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     forsmark@odense.kollegienet.dk
>Release:        GCC 3.2 (and all earlier versions)
>Organization:
>Environment:
Linux kernel 2.4.19
VIA C3 processor
GCC Version 3.2
>Description:
When compiling any C code with GCC 3.2 (and all other versions) Configure finds out that the VIA C3 processor is a i686 processor. That’s ok, but the VIA C3 processor doesn’t have the CMOV instruction. 
When GCC generates code for the i686 processor it includes the use of the CMOV instruction and therefore the code will result in an "illegal instruction" error when executed on a VIA C3 processor.
The VIA C3 is indeed a 'model 6' processor. The Pentium Pro manual states that this cmov (conditional move) instruction is optional and you are supposed to check for its present before using it.
This means that GCC should check for this before generation code including this instruction. If CMOV is not present, the code should be generated without using this instruction.
>How-To-Repeat:
Use GCC to compile any program (ex XFREE 4.2) on a Linux PC with compiler option "-march=i686 -mcpu=i686".
Then run the compiled program an see the "illegal instruction" error.
>Fix:
Use GCC with "-march=i586 -mcpu=i586" but then the code is not optimal for the processor.
>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2003-02-13 20:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-13 20:36 target/8243: GCC 3.2 does not check for CMOV instruction before generating code Pete Gontier
  -- strict thread matches above, loose matches on Subject: below --
2003-02-13 19:56 Pete Gontier
2002-10-21 23:55 rth
2002-10-16 10:16 forsmark

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