From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26464 invoked by alias); 11 Nov 2002 06:56:00 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 26445 invoked by uid 71); 11 Nov 2002 06:56:00 -0000 Resent-Date: 11 Nov 2002 06:56:00 -0000 Resent-Message-ID: <20021111065600.26444.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, gcc@elektrono.com Received: (qmail 26061 invoked by uid 61); 11 Nov 2002 06:55:07 -0000 Message-Id: <20021111065507.26060.qmail@sources.redhat.com> Date: Sun, 10 Nov 2002 22:56:00 -0000 From: gcc@elektrono.com Reply-To: gcc@elektrono.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: optimization/8525: cmov instruction used with i686 X-SW-Source: 2002-11/txt/msg00512.txt.bz2 List-Id: >Number: 8525 >Category: optimization >Synopsis: cmov instruction used with i686 >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: change-request >Submitter-Id: net >Arrival-Date: Sun Nov 10 22:56:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: gcc@elektrono.com >Release: 2.95.4 >Organization: >Environment: Debian GNU/Linux 3.0 Linux 2.4.19 Via C3 Processor >Description: When gcc compiles code for i686's it utilizes the cmov instruction, which is not part of the required i686 instruction set according to intel's specification. This causes headaches because a dynamic linker will try to use i686 optimized binaries with the i686 processor and they will generate "Illegal Instruction" errors. Either the code detecting the processor in the dynamic linker needs to be hacked to report i686 processors without the cmov instruction as i586's or gcc needs to not use the cmov instruction when asked to produce i686 binaries. In all seriousness, does the gcc group feel that the cpu detection code should follow gcc's broken implementation? >>From my perspective this is a big problem. I see it pop up in bugs, mailing list, and USENET posts far too often. People are discouraged from combining Linux and Via C3 Processors. This bug also recently broke SSH on my server (See Debian Bug #164766). This problem will only get worse as more i686-optimized binaries are produced. There is no easy way to just use '-march=i586' when using a binary distribution like Debian or a commercial product with no source available. I hope I didn't come off too demanding in this bug report. I really appreciate all the work you guys put into gcc. It just seems this is only a case of purposely not following the specification that's breaking things and that is one of the worst kind of bugs. I strongly believe in spec. compliance, because without it interoperability is twice as hard. So please make the many C3-owner/Linux-users lives easier and at least by default don't use cmov. >How-To-Repeat: >Fix: When compiling code with -march=i686 do not use the cmov instruction by default. The use of cmov could be requested with -fcmov or something similar. >Release-Note: >Audit-Trail: >Unformatted: