Browse Source

* Fixed bug #19188 again, this time with *correct* value of the AND mask.
* Additionally, fixed result size for unaligned branch of IndexWord and removed the last 'ret' instruction.

git-svn-id: trunk@17340 -

sergei 14 years ago
parent
commit
dd950d3ceb
1 changed files with 2 additions and 3 deletions
  1. 2 3
      rtl/x86_64/x86_64.inc

+ 2 - 3
rtl/x86_64/x86_64.inc

@@ -371,7 +371,7 @@ Procedure FillChar(var x;count:SizeInt;value:byte);assembler;nostackframe;
 // So use a different instruction for now.
 
     { expand byte value  }
-    andq   $0xffffffffffffff00, %r8
+    andq   $0xff, %r8
 {
     movzbq %r8b, %r8
 }
@@ -623,8 +623,7 @@ asm
     lea    -16(%rcx,%rax), %rax
     cmp    %rax, %rdx
     jbe    .Lnotfound_u                { if match is after the specified length, ignore it }
-    sar    $1, %eax                    { in words }
-    retq
+    sar    $1, %rax                    { in words }
 end;
 {$endif FPC_SYSTEM_HAS_INDEXWORD}