From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31097 invoked by alias); 15 Nov 2013 09:27:01 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 31085 invoked by uid 89); 15 Nov 2013 09:27:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_50,RDNS_NONE,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: mo-p00-ob.rzone.de Received: from Unknown (HELO mo-p00-ob.rzone.de) (81.169.146.162) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 15 Nov 2013 09:26:59 +0000 X-RZG-AUTH: :IWUHfUGtd7FuZjqssi4XV8vyD9vdcash4UV9QxY6ZQuSao5h9d1b/EnRnndh4tv8LnKSozY= X-RZG-CLASS-ID: mo00 Received: from IT-KOBE-W764.ekt.lokal ([62.109.75.223]) by smtp.strato.de (RZmta 32.13 AUTH) with (TLSv1.0:DHE-RSA-AES256-SHA encrypted) ESMTPSA id 60570apAF9QnV9K for ; Fri, 15 Nov 2013 10:26:49 +0100 (CET) Date: Fri, 15 Nov 2013 09:27:00 -0000 From: Michael Weise To: gcc-help@gcc.gnu.org Subject: Inline asm - only clobber list case sensitive? Message-Id: <20131115102648.9a74a4de2a73c4d229c260ad@ek-team.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-11/txt/msg00104.txt.bz2 Hi, yesterday I've been facing a strange problem with some inline asm code (see below), emitting errors like these: (gcc 4.7.3, targetting m68k-elf, Windows 7/64, msys): rs232_2.c:2433:2: error: unknown register name '%CC' in 'asm' rs232_2.c:2433:2: error: unknown register name '%D1' in 'asm' rs232_2.c:2433:2: error: unknown register name '%D0' in 'asm' rs232_2.c:2433:2: error: unknown register name '%A1' in 'asm' rs232_2.c:2433:2: error: unknown register name '%A0' in 'asm' Further investigation revealed that the problem is related to case sensitivity of the register names. I played around with upper/lower case to check this: asm volatile ( " move.l %[in1],%%a0 \n" // asm code " move.l %[in2],%%A1 \n" " trap #8 \n" " move.b %%D0,%[out1]\n" " move.b %%d1,%[out2]\n" :[out1] "=m" (*pc1), // output [out2] "=m" (*pc2) :[in1] "r" (cmdadr), // input [in2] "r" (DUMRadr) :"%a0","%A1","%d0","%D1", // clobber list "memory","%CC" ); Results in: rs232_2.c:2433:2: error: unknown register name '%CC' in 'asm' rs232_2.c:2433:2: error: unknown register name '%D1' in 'asm' rs232_2.c:2433:2: error: unknown register name '%A1' in 'asm' The assembler does not complain about %a0 and %d0, which leads me to the conclusion that: * Register names being upper case are not recognized - but only in the clobber list. Is this intentional, a feature or a bug? Best Regards Michael Weise