mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-28 20:40:37 +02:00
* set SSE CSR if sse is supported by the CPU
git-svn-id: trunk@6021 -
This commit is contained in:
parent
5d2b592ed4
commit
685844b61c
@ -65,6 +65,8 @@ var
|
||||
begin
|
||||
CtlWord := Get8087CW;
|
||||
Set8087CW((CtlWord and $F3FF) or (Ord(RoundMode) shl 10));
|
||||
if has_sse_support then
|
||||
SetSSECSR((GetSSECSR and $ffff9fff) or (dword(RoundMode) shl 13));
|
||||
Result := TFPURoundingMode((CtlWord shr 10) and 3);
|
||||
end;
|
||||
|
||||
@ -93,6 +95,9 @@ var
|
||||
begin
|
||||
CtlWord := Get8087CW;
|
||||
Set8087CW( (CtlWord and $FFC0) or Byte(Longint(Mask)) );
|
||||
if has_sse_support then
|
||||
SetSSECSR((GetSSECSR and $ffffe07f) or (dword(Mask) shl 7));
|
||||
softfloat_exception_mask:=dword(Mask);
|
||||
Result := TFPUExceptionMask(Longint(CtlWord and $3F));
|
||||
end;
|
||||
|
||||
@ -104,4 +109,3 @@ asm
|
||||
.Lclear:
|
||||
fnclex
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user