From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 397 invoked by alias); 9 Nov 2007 16:10:12 -0000 Received: (qmail 388 invoked by uid 22791); 9 Nov 2007 16:10:12 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 09 Nov 2007 16:10:08 +0000 Received: from zps35.corp.google.com (zps35.corp.google.com [172.25.146.35]) by smtp-out.google.com with ESMTP id lA9G9snj007410; Fri, 9 Nov 2007 16:09:55 GMT Received: from smtp.corp.google.com (spacemonkey3.corp.google.com [192.168.120.116]) by zps35.corp.google.com with ESMTP id lA9G9rD1003910 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 9 Nov 2007 08:09:53 -0800 Received: from localhost.localdomain.google.com (69-36-227-130.cust.layer42.net [69.36.227.130] (may be forged)) (authenticated bits=0) by smtp.corp.google.com (8.13.8/8.13.8) with ESMTP id lA9G9oXg028124 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 9 Nov 2007 08:09:52 -0800 To: "Maciej W. Rozycki" Cc: binutils@sources.redhat.com, "Maciej W. Rozycki" Subject: Re: [RFD] MIPS/gas: Optimisation cannot be set to 0 References: From: Ian Lance Taylor Date: Fri, 09 Nov 2007 16:10:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00093.txt.bz2 "Maciej W. Rozycki" writes: > Wed Feb 12 14:36:29 1997 Ian Lance Taylor > > * config/tc-mips.c (md_parse_option): When debugging, set > mips_optimize to 1, not 0. My vague recollection of the problem is that at least at that time gcc would always pass a -O option to the assembler. When not optimizing, it would pass -O0. However, inserting NOPs for MIPS variants which do not need them does not help debugging. Clearly failing to provide a way to set mips_optimize to 0 was an oversight. > I have no strong preference, but I think gas should have a mode where its > input is assembled intact. And swapping branches may produce surprising > interactions with debugging information. I am therefore in favour to the > first proposal above, but I would like to hear from the others. I'm not sure I see the relevance of "assembled intact." The source is assembled just as the user specified with -O1. -O1 simply inhibits adding additional unnecessary nop instructions--nop instructions that were required for MIPS ISA I but not for later ISAs. At -O1 branches are not swapped, so debugging is not impaired. I agree there should be a way to set mips_optimize to 0, but we should ensure that gcc -O0 does not set mips_optimize to 0 when assembling. Ian