From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18509 invoked by alias); 15 Jun 2006 18:58:34 -0000 Received: (qmail 18501 invoked by uid 22791); 15 Jun 2006 18:58:33 -0000 X-Spam-Check-By: sourceware.org Received: from potter.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 15 Jun 2006 18:58:31 +0000 Received: (qmail 32582 invoked from network); 15 Jun 2006 18:58:29 -0000 Received: from unknown (HELO 81-178-237-90.dsl.pipex.com) (paul@127.0.0.2) by mail.codesourcery.com with ESMTPA; 15 Jun 2006 18:58:29 -0000 From: Paul Brook To: "H. J. Lu" Subject: Re: PATCH: Add --alt-nops=short|long to x86/x86-64 assemblers Date: Thu, 15 Jun 2006 19:02:00 -0000 User-Agent: KMail/1.9.1 Cc: binutils@sourceware.org, Nick Clifton References: <20060613190254.GB21884@lucon.org> <200606151841.24590.paul@codesourcery.com> <20060615184510.GA9090@lucon.org> In-Reply-To: <20060615184510.GA9090@lucon.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200606151958.27628.paul@codesourcery.com> 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/msg00255.txt.bz2 > 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. But you said these instructions only existed on ppro or later. You can't have mtune= effect the choice of instruction unless you also implement -march=. Consider gcc -march=386 -mtune=686. IIUC you're proposing that gcc doesn't emit .arch, and doesn't pass through -march=, so gas defaults to allowing all instructions. gas then sees -mtune= and generates instructions that don't work on 386. Paul