* Some final tweaks to asm int_str.

git-svn-id: trunk@9782 -
This commit is contained in:
daniel 2008-01-18 22:21:49 +00:00
parent f94d457429
commit b8fdbb1055

View File

@ -1164,9 +1164,9 @@ str_int_shortcut:
subl %edx,%esi subl %edx,%esi
{Skip digits beyond string length.} {Skip digits beyond string length.}
subl %ecx,%esi
jae .Lwrite_out
movl %eax,%edx movl %eax,%edx
subl %ecx,%esi
jae .Lloop_write
.Lloop_skip: .Lloop_skip:
movl $0xcccccccd,%eax {Divide by 10 using mul+shr} movl $0xcccccccd,%eax {Divide by 10 using mul+shr}
{Pre-add '0'} {Pre-add '0'}
@ -1177,12 +1177,9 @@ str_int_shortcut:
jz .Ldone {If (l<0) and (high(s)=1) this jump is taken.} jz .Ldone {If (l<0) and (high(s)=1) this jump is taken.}
incl %esi incl %esi
jnz .Lloop_skip jnz .Lloop_skip
movl %edx,%eax
{Write out digits.} {Write out digits.}
.Lwrite_out: .Lloop_write:
movl %eax,%edx
.Lloop:
movl $0xcccccccd,%eax {Divide by 10 using mul+shr} movl $0xcccccccd,%eax {Divide by 10 using mul+shr}
{Pre-add '0'} {Pre-add '0'}
leal 48(%edx),%ebx {leal $'0(,%edx),%ebx Not supported by our ATT reader.} leal 48(%edx),%ebx {leal $'0(,%edx),%ebx Not supported by our ATT reader.}
@ -1193,12 +1190,13 @@ str_int_shortcut:
subl %eax,%ebx subl %eax,%ebx
movb %bl,(%edi,%ecx) movb %bl,(%edi,%ecx)
decl %ecx decl %ecx
jnz .Lloop jnz .Lloop_write
.Ldone: .Ldone:
popl %ebx popl %ebx
popl %edi popl %edi
popl %esi popl %esi
end; end;
{**************************************************************************** {****************************************************************************
Bounds Check Bounds Check
****************************************************************************} ****************************************************************************}