From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9034 invoked by alias); 15 Jun 2006 18:45:14 -0000 Received: (qmail 9025 invoked by uid 22791); 15 Jun 2006 18:45:14 -0000 X-Spam-Check-By: sourceware.org Received: from smtp110.sbc.mail.mud.yahoo.com (HELO smtp110.sbc.mail.mud.yahoo.com) (68.142.198.209) by sourceware.org (qpsmtpd/0.31) with SMTP; Thu, 15 Jun 2006 18:45:13 +0000 Received: (qmail 70007 invoked from network); 15 Jun 2006 18:45:11 -0000 Received: from unknown (HELO lucon.org) (hjjean@sbcglobal.net@71.146.67.96 with login) by smtp110.sbc.mail.mud.yahoo.com with SMTP; 15 Jun 2006 18:45:11 -0000 Received: by lucon.org (Postfix, from userid 1000) id 36F8063EEC; Thu, 15 Jun 2006 11:45:10 -0700 (PDT) Date: Thu, 15 Jun 2006 18:58:00 -0000 From: "H. J. Lu" To: Paul Brook Cc: binutils@sourceware.org, Nick Clifton Subject: Re: PATCH: Add --alt-nops=short|long to x86/x86-64 assemblers Message-ID: <20060615184510.GA9090@lucon.org> References: <20060613190254.GB21884@lucon.org> <200606151720.28010.paul@codesourcery.com> <20060615170747.GA8429@lucon.org> <200606151841.24590.paul@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200606151841.24590.paul@codesourcery.com> User-Agent: Mutt/1.4.2.1i Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-06/txt/msg00254.txt.bz2 On Thu, Jun 15, 2006 at 06:41:23PM +0100, Paul Brook wrote: > > > > I was talking about the code like > > > > > > > > asm ("some SSE instruction"); > > > > > > > > If gcc starts to generate ".arch i686", the code above won't compile > > > > any more. > > > > > > I'd say that code is broken. You'd have the same problem if you > > > implemented the commandline options. I don't really see why x86 is any > > > different to other architectures in this respect. > > > > x86 is different, for better or worse. The reality is we can't change > > it in such a way that all sudden the existing codes won't compile any > > more. > > Well, doesn't the same argument apply to commandline arguments. > Having -march=i686 behave differently to ".arch i686" sounds like a really > bad idea to me. That is why I am planning to add -mtune=, not -march=. There are if (value == CODE_64BIT && !(cpu_arch_flags & CpuSledgehammer)) { as_bad (_("64bit mode not supported on this CPU.")); } in assembler. The reasons we haven't run into any serious problems are 1. By default, cpu_arch_flags is set to accept everything. 2. .arch directive isn't used much. So my -mtune=CPU switch will optimize for CPU by generating instruction for CPU if instruction set of CPU is available. H.J.