From b8fdbb10558d5595d44f3df6afd0d74b68f9f565 Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 18 Jan 2008 22:21:49 +0000 Subject: [PATCH] * Some final tweaks to asm int_str. git-svn-id: trunk@9782 - --- rtl/i386/i386.inc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/rtl/i386/i386.inc b/rtl/i386/i386.inc index 67d7a4e63e..6c97e9c40c 100644 --- a/rtl/i386/i386.inc +++ b/rtl/i386/i386.inc @@ -1164,9 +1164,9 @@ str_int_shortcut: subl %edx,%esi {Skip digits beyond string length.} - subl %ecx,%esi - jae .Lwrite_out movl %eax,%edx + subl %ecx,%esi + jae .Lloop_write .Lloop_skip: movl $0xcccccccd,%eax {Divide by 10 using mul+shr} {Pre-add '0'} @@ -1177,12 +1177,9 @@ str_int_shortcut: jz .Ldone {If (l<0) and (high(s)=1) this jump is taken.} incl %esi jnz .Lloop_skip - movl %edx,%eax {Write out digits.} -.Lwrite_out: - movl %eax,%edx -.Lloop: +.Lloop_write: movl $0xcccccccd,%eax {Divide by 10 using mul+shr} {Pre-add '0'} leal 48(%edx),%ebx {leal $'0(,%edx),%ebx Not supported by our ATT reader.} @@ -1193,12 +1190,13 @@ str_int_shortcut: subl %eax,%ebx movb %bl,(%edi,%ecx) decl %ecx - jnz .Lloop + jnz .Lloop_write .Ldone: popl %ebx popl %edi popl %esi end; + {**************************************************************************** Bounds Check ****************************************************************************}