mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-12 14:38:24 +02:00
Use mmx_support to decide to use xmState or x87state part of sigcontext
git-svn-id: trunk@20784 -
This commit is contained in:
parent
d3e32d4fa7
commit
8d6c5f1ecc
@ -27,7 +27,12 @@ end;
|
|||||||
function getaltfpustate(sigcontext:psigcontextrec):longint; {inline;}
|
function getaltfpustate(sigcontext:psigcontextrec):longint; {inline;}
|
||||||
begin
|
begin
|
||||||
if assigned(sigcontext) then
|
if assigned(sigcontext) then
|
||||||
getaltfpustate:=sigcontext^.sc_fpustate^.en_sw
|
begin
|
||||||
|
if mmx_support then
|
||||||
|
getaltfpustate:=sigcontext^.sc_fpustate^.xmmState.fx_fsw
|
||||||
|
else
|
||||||
|
getaltfpustate:=sigcontext^.sc_fpustate^.x87state.en_sw
|
||||||
|
end
|
||||||
else
|
else
|
||||||
getaltfpustate:=0;
|
getaltfpustate:=0;
|
||||||
end;
|
end;
|
||||||
@ -37,6 +42,7 @@ procedure SignalToRunerror(Sig: longint;sininfo:psiginfo; SigContext: PSigContex
|
|||||||
|
|
||||||
var
|
var
|
||||||
res,fpustate : word;
|
res,fpustate : word;
|
||||||
|
oldact: SigActionRec;
|
||||||
begin
|
begin
|
||||||
res:=0;
|
res:=0;
|
||||||
{$ifdef BSD}
|
{$ifdef BSD}
|
||||||
@ -87,6 +93,10 @@ begin
|
|||||||
SIGQUIT:
|
SIGQUIT:
|
||||||
res:=233;
|
res:=233;
|
||||||
end;
|
end;
|
||||||
|
{$ifdef DEBUG_SIGNAL_HANDLER}
|
||||||
|
InstallDefaultSignalHandler(sig,oldact);
|
||||||
|
InstallDefaultSignalHandler(sig,oldact);
|
||||||
|
{$endif}
|
||||||
reenable_signal(sig);
|
reenable_signal(sig);
|
||||||
{ give runtime error at the position where the signal was raised }
|
{ give runtime error at the position where the signal was raised }
|
||||||
if res<>0 then
|
if res<>0 then
|
||||||
|
Loading…
Reference in New Issue
Block a user