Fix compilation with release 3.0.4 ppcarm

git-svn-id: trunk@42175 -
This commit is contained in:
pierre 2019-06-05 12:00:53 +00:00
parent 109abf3d99
commit 8e5e877417

View File

@ -23,7 +23,9 @@ end;
{$ifndef CPUTHUMB} {$ifndef CPUTHUMB}
Procedure SignalToHandleErrorAddrFrame_ARM(Errno : longint;addr : CodePointer; frame : Pointer); nostackframe; assembler; Procedure SignalToHandleErrorAddrFrame_ARM(Errno : longint;addr : CodePointer; frame : Pointer); nostackframe; assembler;
asm asm
{$if FPC_VERSION >= 30200}
.code 32 .code 32
{$endif}
// the address is of the faulting instruction, and sigreturn will // the address is of the faulting instruction, and sigreturn will
// skip it -> start with a nop // skip it -> start with a nop
nop nop
@ -38,6 +40,7 @@ asm
end; end;
{$endif not CPUTHUMB} {$endif not CPUTHUMB}
{$if FPC_VERSION >= 30200}
Procedure SignalToHandleErrorAddrFrame_Thumb(Errno : longint;addr : CodePointer; frame : Pointer); nostackframe; assembler; Procedure SignalToHandleErrorAddrFrame_Thumb(Errno : longint;addr : CodePointer; frame : Pointer); nostackframe; assembler;
asm asm
.thumb_func .thumb_func
@ -55,6 +58,7 @@ asm
pop {r0,r1,r2,pc} pop {r0,r1,r2,pc}
.text .text
end; end;
{$endif}
procedure SignalToRunerror(Sig: longint; { _a2,_a3,_a4 : dword; } SigContext: PSigInfo; uContext : PuContext); public name '_FPC_DEFAULTSIGHANDLER'; cdecl; procedure SignalToRunerror(Sig: longint; { _a2,_a3,_a4 : dword; } SigContext: PSigInfo; uContext : PuContext); public name '_FPC_DEFAULTSIGHANDLER'; cdecl;
var var
@ -93,6 +97,7 @@ begin
ucontext^.uc_mcontext.arm_r0:=res; ucontext^.uc_mcontext.arm_r0:=res;
ucontext^.uc_mcontext.arm_r1:=uContext^.uc_mcontext.arm_pc; ucontext^.uc_mcontext.arm_r1:=uContext^.uc_mcontext.arm_pc;
ucontext^.uc_mcontext.arm_r2:=uContext^.uc_mcontext.arm_fp; ucontext^.uc_mcontext.arm_r2:=uContext^.uc_mcontext.arm_fp;
{$if FPC_VERSION >= 30200}
{$ifndef CPUTHUMB} {$ifndef CPUTHUMB}
if (ucontext^.uc_mcontext.arm_cpsr and (1 shl 5))=0 then if (ucontext^.uc_mcontext.arm_cpsr and (1 shl 5))=0 then
begin begin
@ -103,6 +108,9 @@ begin
begin begin
ucontext^.uc_mcontext.arm_pc:=ptruint(@SignalToHandleErrorAddrFrame_Thumb); ucontext^.uc_mcontext.arm_pc:=ptruint(@SignalToHandleErrorAddrFrame_Thumb);
end; end;
{$else}
ucontext^.uc_mcontext.arm_pc:=ptruint(@SignalToHandleErrorAddrFrame_ARM);
{$endif}
end; end;
end; end;