public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: forsmark@odense.kollegienet.dk
To: gcc-gnats@gcc.gnu.org
Subject: target/8243: GCC 3.2 does not check for CMOV instruction before generating code
Date: Wed, 16 Oct 2002 10:16:00 -0000	[thread overview]
Message-ID: <20021016171112.27518.qmail@sources.redhat.com> (raw)

[-- 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:


             reply	other threads:[~2002-10-16 17:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-16 10:16 forsmark [this message]
2002-10-21 23:55 rth
2003-02-13 19:56 Pete Gontier
2003-02-13 20:36 Pete Gontier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021016171112.27518.qmail@sources.redhat.com \
    --to=forsmark@odense.kollegienet.dk \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).