Browse Source

* Some final tweaks to asm int_str.

git-svn-id: trunk@9782 -
daniel 17 years ago
parent
commit
b8fdbb1055
1 changed files with 5 additions and 7 deletions
  1. 5 7
      rtl/i386/i386.inc

+ 5 - 7
rtl/i386/i386.inc

@@ -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:
-  movl %eax,%edx
-.Lloop:
+.Lloop_write:
   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
 ****************************************************************************}
 ****************************************************************************}