|
@@ -20,7 +20,7 @@ begin
|
|
result:=@HandleErrorAddrFrame;
|
|
result:=@HandleErrorAddrFrame;
|
|
end;
|
|
end;
|
|
|
|
|
|
-{$ifndef CPUTHUMB}
|
|
|
|
|
|
+{$if not(defined(CPUTHUMB)) and not(defined(CPUTHUMB2))}
|
|
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_FULLVERSION >= 30200}
|
|
{$if FPC_FULLVERSION >= 30200}
|
|
@@ -38,7 +38,7 @@ asm
|
|
pop {r0,r1,r2,pc}
|
|
pop {r0,r1,r2,pc}
|
|
.text
|
|
.text
|
|
end;
|
|
end;
|
|
-{$endif not CPUTHUMB}
|
|
|
|
|
|
+{$endif not(defined(CPUTHUMB)) and not(defined(CPUTHUMB2))}
|
|
|
|
|
|
{$if FPC_FULLVERSION >= 30200}
|
|
{$if FPC_FULLVERSION >= 30200}
|
|
Procedure SignalToHandleErrorAddrFrame_Thumb(Errno : longint;addr : CodePointer; frame : Pointer); nostackframe; assembler;
|
|
Procedure SignalToHandleErrorAddrFrame_Thumb(Errno : longint;addr : CodePointer; frame : Pointer); nostackframe; assembler;
|
|
@@ -57,9 +57,9 @@ asm
|
|
mov lr, r0
|
|
mov lr, r0
|
|
pop {r0,r1,r2,pc}
|
|
pop {r0,r1,r2,pc}
|
|
.text
|
|
.text
|
|
-{$ifndef CPUTHUMB}
|
|
|
|
|
|
+{$if not(defined(CPUTHUMB)) and not(defined(CPUTHUMB2))}
|
|
.code 32
|
|
.code 32
|
|
-{$endif CPUTHUMB}
|
|
|
|
|
|
+{$endif not(defined(CPUTHUMB)) and not(defined(CPUTHUMB2))}
|
|
end;
|
|
end;
|
|
{$endif}
|
|
{$endif}
|
|
|
|
|
|
@@ -102,13 +102,13 @@ begin
|
|
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_FULLVERSION >= 30200}
|
|
{$if FPC_FULLVERSION >= 30200}
|
|
-{$ifndef CPUTHUMB}
|
|
|
|
|
|
+{$if not(defined(CPUTHUMB)) and not(defined(CPUTHUMB2))}
|
|
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
|
|
ucontext^.uc_mcontext.arm_pc:=ptruint(@SignalToHandleErrorAddrFrame_ARM);
|
|
ucontext^.uc_mcontext.arm_pc:=ptruint(@SignalToHandleErrorAddrFrame_ARM);
|
|
end
|
|
end
|
|
else
|
|
else
|
|
-{$endif not CPUTHUMB}
|
|
|
|
|
|
+{$endif not(defined(CPUTHUMB)) and not(defined(CPUTHUMB2))}
|
|
begin
|
|
begin
|
|
ucontext^.uc_mcontext.arm_pc:=ptruint(@SignalToHandleErrorAddrFrame_Thumb);
|
|
ucontext^.uc_mcontext.arm_pc:=ptruint(@SignalToHandleErrorAddrFrame_Thumb);
|
|
end;
|
|
end;
|