From 6f6e60b7239e6a5fb6796cce9b0a0d1e6eab95a1 Mon Sep 17 00:00:00 2001 From: florian <florian@freepascal.org> Date: Fri, 13 Jul 2007 21:16:48 +0000 Subject: [PATCH] * improved SSE check by Martin Schreiber git-svn-id: trunk@8040 - --- rtl/i386/i386.inc | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/rtl/i386/i386.inc b/rtl/i386/i386.inc index e296533719..c613194e28 100644 --- a/rtl/i386/i386.inc +++ b/rtl/i386/i386.inc @@ -1236,15 +1236,19 @@ Procedure SysResetFPU;{$ifdef SYSTEMINLINE}inline;{$endif} procedure fpc_cpucodeinit; begin os_supports_sse:=true; - sse_check:=true; - asm - { force an sse exception if no sse is supported, the exception handler sets - os_supports_sse to false then } - { don't change this instruction, the code above depends on its size } - movaps %xmm7, %xmm6 - end; - sse_check:=false; - has_sse_support:=sse_support; + os_supports_sse:=sse_support; + if os_supports_sse then + begin + sse_check:=true; + asm + { force an sse exception if no sse is supported, the exception handler sets + os_supports_sse to false then } + { don't change this instruction, the code above depends on its size } + movaps %xmm7, %xmm6 + end; + sse_check:=false; + end; + has_sse_support:=os_supports_sse; has_mmx_support:=mmx_support; SysResetFPU; {$ifdef USE_FASTMOVE}