From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 122411 invoked by alias); 18 Aug 2015 09:23:20 -0000 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 Received: (qmail 122400 invoked by uid 89); 18 Aug 2015 09:23:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: ipmail07.adl2.internode.on.net Received: from ipmail07.adl2.internode.on.net (HELO ipmail07.adl2.internode.on.net) (150.101.137.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 18 Aug 2015 09:23:19 +0000 Received: from ppp118-209-45-251.lns20.mel4.internode.on.net (HELO ratatosk) ([118.209.45.251]) by ipmail07.adl2.internode.on.net with ESMTP; 18 Aug 2015 18:53:16 +0930 Received: by ratatosk (Postfix, from userid 1000) id CA77F7AC; Tue, 18 Aug 2015 19:35:43 +1000 (AEST) Date: Tue, 18 Aug 2015 09:23:00 -0000 From: Erik Christiansen To: binutils@sourceware.org Subject: Re: optimization by as Message-ID: <20150818093543.GA3489@ratatosk> Reply-To: dvalin@internode.on.net References: <0DA23CC379F5F945ACB41CF394B982772110532C@LEMAIL01.le.imgtec.org> <693C75B5-88BC-4051-BA12-57617578566B@dell.com> <55D1A974.9090507@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00139.txt.bz2 On 17.08.15 14:37, Paul_Koning@Dell.com wrote: > The other (now rare) job of the assembler is to process human-written > assembly code. There too it must stay out of the way, because the > only time when hand-written assembly code is justified is when the > human needs *complete* control over what happens. ... > So in short, I view all “optimizing assemblers” as design errors. +1 Over 3 decades of embedded systems development, I wrote a lot of assembler, for a range of targets. (And most of it using the GNU toolchain) It's not just when writing an ISR, or bit-banged I/O, complete with nops to meet ASIC data set-up and write strobe timing requirements, that the assembler cannot be permitted to finesse any instructions in the case of hand coding. I still occasionally code systems comprising interacting event-driven complex state machines. Gas macros provide a custom language, making the assembler environment as comfortable as C, mostly. In short, I can only confirm that instruction-screwing assemblers must retain a mode in which they do what they're told. Erik