@@ -1,6 +1,6 @@
{ %norun }
{ %cpu=x86_64,i386,powerpc,sparc}
-{ %skiptarget = macos }
+{ %skiptarget = go32v2,macos }
{ execute this test only on reasonable fast cpus }
library lib;
const
@@ -1,4 +1,5 @@
+{ %skiptarget=go32v2 }
{ %opt=-Cg }
{ Source provided for Free Pascal Bug Report 3402 }
@@ -2,12 +2,38 @@
{$asmmode intel}
program test;
+{$ifdef CPU386}
+ {$define USE_MMX_UNIT}
+ { I do not know if SSE2 is always true for x86_64
+ but mmx unit is i386 specific PM }
+{$endif CPU386}
+
+{$ifdef USE_MMX_UNIT}
+uses
+ mmx;
+{$endif USE_MMX_UNIT}
{$APPTYPE CONSOLE}
+procedure call_psrldq;
begin
-
-asm
-psrldq xmm2,4
+ asm
+ psrldq xmm2,4
+ end;
end;
+begin
+ if not is_sse2_cpu then
+ begin
+ Writeln('SSE2 extension not supported by CPU');
+ Writeln('SSE2 specific code not run');
+ end
+ else
+ Writeln('SSE2 extension supported by CPU');
+ call_psrldq;
+ Writeln('SSE2 extension code run');
end.