Browse Source

* initial x86_64 code for compare videobuffer. To be tested later. Mantis 15700

git-svn-id: trunk@14900 -
marco 15 years ago
parent
commit
da19c48e05
1 changed files with 22 additions and 0 deletions
  1. 22 0
      rtl/win/video.pp

+ 22 - 0
rtl/win/video.pp

@@ -556,6 +556,7 @@ begin
    smallforce:=true
    smallforce:=true
   else
   else
    begin
    begin
+    {$ifdef cpui386}
      asm
      asm
         pushl   %esi
         pushl   %esi
         pushl   %edi
         pushl   %edi
@@ -569,6 +570,27 @@ begin
         popl    %edi
         popl    %edi
         popl    %esi
         popl    %esi
      end;
      end;
+   {$else}
+    {$ifdef cpux86_64}
+     asm
+        pushq   %rsi
+        pushq   %rdi
+        xorq    %rcx,%rcx  
+        movq    VideoBuf,%rsi
+        movq    OldVideoBuf,%edi
+        movl    VideoBufSize,%ecx
+        shrq    $2,%rcx
+        repe
+        cmpsl
+        setne   smallforce
+        popq    %rdi
+        popq    %rsi
+     end;
+    {$else}
+      {$INFO compare of videobuffers not available for this arch}
+      BREAK AND DIE
+    {$ENDIF}
+   {$endif}
    end;
    end;
   if SmallForce then
   if SmallForce then
    begin
    begin