delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2011/06/23/08:54:37

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
X-Authenticated: #27081556
X-Provags-ID: V01U2FsdGVkX18cerwtbDwcwv3DP42kh4K+Vmx5lzrnO8EamYZY6Z
UilT2mlR71nvpN
From: Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de>
To: djgpp-workers AT delorie DOT com
Subject: Re: Difficulties compiling libc using GCC 4.5.3
Date: Thu, 23 Jun 2011 14:48:56 +0200
User-Agent: KMail/1.9.10
References: <201106230342 DOT 56961 DOT juan DOT guerrero AT gmx DOT de> <201106230656 DOT 30510 DOT juan DOT guerrero AT gmx DOT de> <BANLkTinZgVgHp5oCS_bTy6HC-SrMpcRujw AT mail DOT gmail DOT com>
In-Reply-To: <BANLkTinZgVgHp5oCS_bTy6HC-SrMpcRujw@mail.gmail.com>
MIME-Version: 1.0
Message-Id: <201106231448.56205.juan.guerrero@gmx.de>
X-Y-GMX-Trusted: 0
Reply-To: djgpp-workers AT delorie DOT com

Am Donnerstag, 23. Juni 2011 schrieb Daniel Verkamp:
[snip]
> The constraints for read_allowed and write_allowed should probably be
> "=qm", not "=g", since the asm uses movb with these as parameters.
> The compiler is allowed to pick any general-purpose register (or
> memory) for the 'g' constraint, even ones that do not have byte parts
> (like %si); 'q' is limited to register that have byte parts (%ax, %bx,
> %cx, %dx).

Thank you for the fix.  Now libc compiles with GCC 4.6.0 with all 3 optimizations.
I applied the patch below.

Reagards,
Juan M. Guerrero



2011-06-23  Juan Manuel Guerrero  <juan DOT guerrero AT gmx DOT de>

	* src/debug/common/dbgcom.c: Replace constraint "=g" with "=qm"





Index: djgpp/src/debug/common/dbgcom.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/debug/common/dbgcom.c,v
retrieving revision 1.29
diff -U 3 -r1.29 dbgcom.c
--- djgpp/src/debug/common/dbgcom.c	8 Jan 2011 00:33:17 -0000	1.29
+++ djgpp/src/debug/common/dbgcom.c	23 Jun 2011 12:43:48 -0000
@@ -1332,7 +1332,7 @@
       jnz   .Ldoes_not_has_write_right						\n\
       movb  $1,%1								\n\
 .Ldoes_not_has_write_right: "
-     : "=g" (read_allowed), "=g" (write_allowed)
+     : "=qm" (read_allowed), "=qm" (write_allowed)
      : "g" (sel)
      );
   if (for_write)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019