Parcourir la source

* Reverted r17343, and IFDEF'ed out the newer assembler procedures for FreeBSD for now. They require fixes to assembler writer, and after it's done they still have to be disabled during bootstrapping.

git-svn-id: trunk@17347 -
sergei il y a 14 ans
Parent
commit
576250bc5b
1 fichiers modifiés avec 32 ajouts et 24 suppressions
  1. 32 24
      rtl/x86_64/x86_64.inc

+ 32 - 24
rtl/x86_64/x86_64.inc

@@ -72,6 +72,12 @@ asm
 .Lg_a_null:
 end ['RAX'];
 
+// The following assembler procedures are disabled for FreeBSD due to
+// multiple issues with its old GNU assembler (Mantis #19188).
+// Even after fixing them, it can be enabled only for the trunk version,
+// otherwise bootstrapping won't be possible.
+{$ifndef freebsd}
+
 {$ifndef FPC_SYSTEM_HAS_MOVE}
 {$define FPC_SYSTEM_HAS_MOVE}
 procedure Move(const source;var dest;count:SizeInt);[public, alias: 'FPC_MOVE'];assembler;nostackframe;
@@ -195,23 +201,23 @@ asm
     add    $64, %rdx
     mov    -64(%rcx,%rdx,1), %r9
     mov    -56(%rcx,%rdx,1), %r10
-    movntiq %r9, -64(%rdx)
-    movntiq %r10, -56(%rdx)
+    movnti %r9, -64(%rdx)
+    movnti %r10, -56(%rdx)
 
     mov    -48(%rcx,%rdx,1), %r9
     mov    -40(%rcx,%rdx,1), %r10
-    movntiq %r9, -48(%rdx)
-    movntiq %r10, -40(%rdx)
+    movnti %r9, -48(%rdx)
+    movnti %r10, -40(%rdx)
     dec    %eax
     mov    -32(%rcx,%rdx,1), %r9
     mov    -24(%rcx,%rdx,1), %r10
-    movntiq %r9, -32(%rdx)
-    movntiq %r10, -24(%rdx)
+    movnti %r9, -32(%rdx)
+    movnti %r10, -24(%rdx)
 
     mov    -16(%rcx,%rdx,1), %r9
     mov    -8(%rcx,%rdx,1), %r10
-    movntiq %r9, -16(%rdx)
-    movntiq %r10, -8(%rdx)
+    movnti %r9, -16(%rdx)
+    movnti %r10, -8(%rdx)
     jne    .Loop64
 
     sub    $0x1000, %r8
@@ -323,23 +329,23 @@ asm
     sub    $64, %rdx
     mov    56(%rcx,%rdx,1), %r9
     mov    48(%rcx,%rdx,1), %r10
-    movntiq %r9, 56(%rdx)
-    movntiq %r10, 48(%rdx)
+    movnti %r9, 56(%rdx)
+    movnti %r10, 48(%rdx)
 
     mov    40(%rcx,%rdx,1), %r9
     mov    32(%rcx,%rdx,1), %r10
-    movntiq %r9, 40(%rdx)
-    movntiq %r10, 32(%rdx)
+    movnti %r9, 40(%rdx)
+    movnti %r10, 32(%rdx)
     dec    %eax
     mov    24(%rcx,%rdx,1), %r9
     mov    16(%rcx,%rdx,1), %r10
-    movntiq %r9, 24(%rdx)
-    movntiq %r10, 16(%rdx)
+    movnti %r9, 24(%rdx)
+    movnti %r10, 16(%rdx)
 
     mov    8(%rcx,%rdx,1), %r9
     mov    (%rcx,%rdx,1), %r10
-    movntiq %r9, 8(%rdx)
-    movntiq %r10, (%rdx)
+    movnti %r9, 8(%rdx)
+    movnti %r10, (%rdx)
     jne    .Lloop64b
 
     sub    $0x1000, %r8
@@ -451,15 +457,15 @@ Procedure FillChar(var x;count:SizeInt;value:byte);assembler;nostackframe;
     .balign 16
 .Lloop64nti:
     add    $64, %rcx
-    movntiq %r8, -64(%rcx)
-    movntiq %r8, -56(%rcx)
-    movntiq %r8, -48(%rcx)
-    movntiq %r8, -40(%rcx)
+    movnti %r8, -64(%rcx)
+    movnti %r8, -56(%rcx)
+    movnti %r8, -48(%rcx)
+    movnti %r8, -40(%rcx)
     dec    %rax
-    movntiq %r8, -32(%rcx)
-    movntiq %r8, -24(%rcx)
-    movntiq %r8, -16(%rcx)
-    movntiq %r8, -8(%rcx)
+    movnti %r8, -32(%rcx)
+    movnti %r8, -24(%rcx)
+    movnti %r8, -16(%rcx)
+    movnti %r8, -8(%rcx)
     jnz    .Lloop64nti
     mfence
     jmp    .Lless64
@@ -627,6 +633,8 @@ asm
 end;
 {$endif FPC_SYSTEM_HAS_INDEXWORD}
 
+{$endif freebsd}
+
 {$asmmode att}
 {$define FPC_SYSTEM_HAS_DECLOCKED_LONGINT}
 { does a thread save inc/dec }