Browse Source

--- Merging r20156 into '.':
U rtl/i386/i386.inc

# revisions: 20156
------------------------------------------------------------------------
r20156 | sergei | 2012-01-23 00:52:46 +0100 (Mon, 23 Jan 2012) | 1 line
Changed paths:
M /trunk/rtl/i386/i386.inc

* fpc_pchar_length: fixed exit without restoring EDI register if argument is nil, bug #21135.
------------------------------------------------------------------------

git-svn-id: branches/fixes_2_6@20171 -

marco 13 years ago
parent
commit
a81c2484ad
1 changed files with 2 additions and 2 deletions
  1. 2 2
      rtl/i386/i386.inc

+ 2 - 2
rtl/i386/i386.inc

@@ -1113,12 +1113,12 @@ asm
         pop   %edx
         pop   %eax
 {$endif FPC_PROFILE}
+        test    %eax,%eax
+        jz      .LStrLenDone
         movl    %edi,saveedi
         movl    %eax,%edi
         movl    $0xffffffff,%ecx
         xorl    %eax,%eax
-	test    %edi,%edi
-	jz      .LStrLenDone
         cld
         repne
         scasb