Преглед изворни кода

+ fma test program extended to support arm

git-svn-id: trunk@33185 -
florian пре 9 година
родитељ
комит
234990b73c
4 измењених фајлова са 71 додато и 33 уклоњено
  1. 3 1
      .gitattributes
  2. 0 32
      tests/test/tfma1.inc
  3. 34 0
      tests/test/tfma1arm.pp
  4. 34 0
      tests/test/tfma1x86.pp

+ 3 - 1
.gitattributes

@@ -12118,7 +12118,9 @@ tests/test/textthr.pp svneol=native#text/plain
 tests/test/tfillchr.pp svneol=native#text/plain
 tests/test/tfinal1.pp svneol=native#text/pascal
 tests/test/tfinal2.pp svneol=native#text/pascal
-tests/test/tfma1.pp svneol=native#text/pascal
+tests/test/tfma1.inc svneol=native#text/plain
+tests/test/tfma1arm.pp svneol=native#text/pascal
+tests/test/tfma1x86.pp svneol=native#text/pascal
 tests/test/tforin1.pp svneol=native#text/pascal
 tests/test/tforin10.pp svneol=native#text/plain
 tests/test/tforin11.pp svneol=native#text/plain

+ 0 - 32
tests/test/tfma1.pp → tests/test/tfma1.inc

@@ -1,7 +1,3 @@
-{ %CPU=i386,x86_64 }
-{ %OPT=-Cfavx2 -Cpcoreavx2 }
-uses
-  cpu;
 var
   d0,d1,d2,d3 : double;
   s0,s1,s2,s3 : single;
@@ -484,31 +480,3 @@ procedure testdouble;
     if l0<>-10.0 then
       halt(1);
   end;
-
-begin
-  if AVXSupport and FMASupport then
-    begin
-      d1:=2;
-      d2:=3;
-      d3:=4;
-      d0:=FMADouble(d1,d2,d3);
-      writeln(d0);
-      if d0<>10.0 then
-        halt(1);
-
-      s1:=2;
-      s2:=3;
-      s3:=4;
-      s0:=FMASingle(s1,s2,s3);
-      writeln(s0);
-      if s0<>10.0 then
-        halt(1);
-
-      testsingle;
-      testdouble;
-
-      writeln('ok');
-    end
-  else
-    writeln('Skipped because not supported by the CPU');
-end.

+ 34 - 0
tests/test/tfma1arm.pp

@@ -0,0 +1,34 @@
+{ %CPU=arm }
+{ %OPT=-Cfvfpv4 }
+uses
+  cpu;
+
+{$i tfma1.inc}  
+  
+begin
+  if VFPv4Support then
+    begin
+      d1:=2;
+      d2:=3;
+      d3:=4;
+      d0:=FMADouble(d1,d2,d3);
+      writeln(d0);
+      if d0<>10.0 then
+        halt(1);
+
+      s1:=2;
+      s2:=3;
+      s3:=4;
+      s0:=FMASingle(s1,s2,s3);
+      writeln(s0);
+      if s0<>10.0 then
+        halt(1);
+
+      testsingle;
+      testdouble;
+
+      writeln('ok');
+    end
+  else
+    writeln('Skipped because not supported by the CPU');
+end.

+ 34 - 0
tests/test/tfma1x86.pp

@@ -0,0 +1,34 @@
+{ %CPU=i386,x86_64 }
+{ %OPT=-Cfavx2 -Cpcoreavx2 }
+uses
+  cpu;
+
+{$i tfma1.inc}  
+  
+begin
+  if AVXSupport and FMASupport then
+    begin
+      d1:=2;
+      d2:=3;
+      d3:=4;
+      d0:=FMADouble(d1,d2,d3);
+      writeln(d0);
+      if d0<>10.0 then
+        halt(1);
+
+      s1:=2;
+      s2:=3;
+      s3:=4;
+      s0:=FMASingle(s1,s2,s3);
+      writeln(s0);
+      if s0<>10.0 then
+        halt(1);
+
+      testsingle;
+      testdouble;
+
+      writeln('ok');
+    end
+  else
+    writeln('Skipped because not supported by the CPU');
+end.