Mail Archives: djgpp-workers/2011/06/23/08:54:37
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 -