* some arm issues fixed

This commit is contained in:
florian 2003-11-21 00:40:06 +00:00
parent 4fff5fd44d
commit b9376da0aa
6 changed files with 131 additions and 18 deletions

View File

@ -16,6 +16,7 @@
**********************************************************************}
{$asmmode gas}
{****************************************************************************
stack frame related stuff
@ -55,7 +56,7 @@ end ['R0'];
{$define FPC_SYSTEM_HAS_SPTR}
Function Sptr : Longint;assembler;{$ifdef SYSTEMINLINE}inline;{$endif}
Function Sptr : pointer;assembler;{$ifdef SYSTEMINLINE}inline;{$endif}
asm
mov r0,sp
end ['R0'];
@ -118,7 +119,10 @@ end;
{
$Log$
Revision 1.2 2003-09-03 14:09:37 florian
Revision 1.3 2003-11-21 00:40:06 florian
* some arm issues fixed
Revision 1.2 2003/09/03 14:09:37 florian
* arm fixes to the common rtl code
* some generic math code fixed
* ...

23
rtl/arm/strings.inc Normal file
View File

@ -0,0 +1,23 @@
{
$Id$
This file is part of the Free Pascal run time library.
Copyright (c) 2000 by Jonas Maebe, member of the
Free Pascal development team
Processor dependent part of strings.pp, that can be shared with
sysutils unit.
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
{
$Log$
Revision 1.1 2003-11-21 00:40:06 florian
* some arm issues fixed
}

23
rtl/arm/stringss.inc Normal file
View File

@ -0,0 +1,23 @@
{
$Id$
This file is part of the Free Pascal run time library.
Copyright (c) 1999-2000 by Jonas Maebe, member of the
Free Pascal development team
Processor dependent part of strings.pp, not shared with
sysutils unit.
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
{
$Log$
Revision 1.1 2003-11-21 00:40:06 florian
* some arm issues fixed
}

47
rtl/linux/arm/sighnd.inc Normal file
View File

@ -0,0 +1,47 @@
{
$Id$
This file is part of the Free Pascal run time library.
Copyright (c) 1999-2000 by Michael Van Canneyt,
member of the Free Pascal development team.
Signal handler is arch dependant due to processor to language
exception conversion.
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
procedure SignalToRunerror(Sig: longint; SigContext: SigContextRec); cdecl;
var
res,fpustate : word;
begin
res:=0;
case sig of
SIGFPE :
begin
{ don't know how to find the different causes, maybe via xer? }
res := 207;
end;
SIGILL,
SIGBUS,
SIGSEGV :
res:=216;
end;
{ give runtime error at the position where the signal was raised }
if res<>0 then
HandleErrorAddrFrame(res,pointer(SigContext.arm_ip),pointer(SigContext.arm_fp));
end;
{
$Log$
Revision 1.1 2003-11-21 00:40:06 florian
* some arm issues fixed
}

View File

@ -41,15 +41,10 @@ end;
{
$Log$
Revision 1.1 2003-11-02 14:53:06 jonas
Revision 1.2 2003-11-21 00:40:06 florian
* some arm issues fixed
Revision 1.1 2003/11/02 14:53:06 jonas
+ sighand and associated record definitions for ppc. Untested.
Revision 1.2 2003/11/01 01:58:11 marco
* more small fixes.
Revision 1.1 2003/11/01 01:27:20 marco
* initial version from 1.0.x branch
}

View File

@ -15,8 +15,6 @@
{$packrecords C}
{********************
Signal
********************}
@ -90,8 +88,8 @@ type
status: cardinal;
end;
SigSet = array[0..wordsinsigset-1] of Longint;
sigset_t= SigSet;
SigSet = array[0..wordsinsigset-1] of Longint;
sigset_t= SigSet;
PSigSet = ^SigSet;
psigset_t=psigset;
TSigSet = SigSet;
@ -248,7 +246,27 @@ type
{$ifdef cpuarm}
PSigContextRec = ^SigContextRec;
SigContextRec = record
{ dummy for now PM }
trap_no : dword;
error_code : dword;
oldmask : dword;
arm_r0 : dword;
arm_r1 : dword;
arm_r2 : dword;
arm_r3 : dword;
arm_r4 : dword;
arm_r5 : dword;
arm_r6 : dword;
arm_r7 : dword;
arm_r8 : dword;
arm_r9 : dword;
arm_r10 : dword;
arm_fp : dword;
arm_ip : dword;
arm_sp : dword;
arm_lr : dword;
arm_pc : dword;
arm_cpsr : dword;
fault_address : dword;
end;
{$endif cpuarm}
(*
@ -324,7 +342,10 @@ type
{
$Log$
Revision 1.13 2003-11-02 14:53:06 jonas
Revision 1.14 2003-11-21 00:40:06 florian
* some arm issues fixed
Revision 1.13 2003/11/02 14:53:06 jonas
+ sighand and associated record definitions for ppc. Untested.
Revision 1.12 2003/09/14 20:15:01 marco