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 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> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 * 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)