mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-23 01:09:27 +02:00
+ syscall directive support for MorphOS added
This commit is contained in:
parent
c7c1fe5414
commit
c68ea95074
compiler
arm
globals.pasglobtype.pasi386
m68k
ncgcal.pasparser.paspdecsub.paspowerpc
sparc
symconst.passystems
x86
x86_64
@ -80,7 +80,7 @@ Const
|
||||
jmp_buf_size = 220; { according to sizeof(jmp_buf) on my Zaurus (FK) }
|
||||
|
||||
{ calling conventions supported by the code generator }
|
||||
supported_calling_conventions = [
|
||||
supported_calling_conventions : tproccalloptions = [
|
||||
pocall_internproc,
|
||||
pocall_compilerproc,
|
||||
pocall_inline,
|
||||
@ -114,7 +114,10 @@ Implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.6 2004-03-06 20:35:19 florian
|
||||
Revision 1.7 2004-04-28 15:19:03 florian
|
||||
+ syscall directive support for MorphOS added
|
||||
|
||||
Revision 1.6 2004/03/06 20:35:19 florian
|
||||
* fixed arm compilation
|
||||
* cleaned up code generation for exported linux procedures
|
||||
|
||||
|
@ -1383,7 +1383,7 @@ implementation
|
||||
2: (a,b: cardinal);
|
||||
end;
|
||||
begin
|
||||
{ load currect control register contents }
|
||||
{ load current control register contents }
|
||||
asm
|
||||
mffs f0
|
||||
stfd f0,newmask.d
|
||||
@ -1524,7 +1524,7 @@ implementation
|
||||
'FPCCALL',
|
||||
'INLINE',
|
||||
'', { internproc }
|
||||
'', { palmossyscall }
|
||||
'', { syscall }
|
||||
'PASCAL',
|
||||
'REGISTER',
|
||||
'SAFECALL',
|
||||
@ -1897,7 +1897,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.126 2004-03-14 20:08:37 peter
|
||||
Revision 1.127 2004-04-28 15:19:03 florian
|
||||
+ syscall directive support for MorphOS added
|
||||
|
||||
Revision 1.126 2004/03/14 20:08:37 peter
|
||||
* packrecords fixed for settings from $PACKRECORDS
|
||||
* default packrecords now uses value 0 and uses info from aligment
|
||||
structure only, initpackrecords removed
|
||||
|
@ -147,8 +147,8 @@ interface
|
||||
pocall_inline,
|
||||
{ Procedure has compiler magic}
|
||||
pocall_internproc,
|
||||
{ procedure is a PalmOS system call }
|
||||
pocall_palmossyscall,
|
||||
{ procedure is a system call, applies e.g. to MorphOS and PalmOS }
|
||||
pocall_syscall,
|
||||
{ pascal standard left to right }
|
||||
pocall_pascal,
|
||||
{ procedure uses register (fastcall) calling }
|
||||
@ -177,7 +177,7 @@ interface
|
||||
'OldFPCCall',
|
||||
'Inline',
|
||||
'InternProc',
|
||||
'PalmOSSysCall',
|
||||
'SysCall',
|
||||
'Pascal',
|
||||
'Register',
|
||||
'SafeCall',
|
||||
@ -239,7 +239,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.51 2004-04-04 18:46:09 olle
|
||||
Revision 1.52 2004-04-28 15:19:03 florian
|
||||
+ syscall directive support for MorphOS added
|
||||
|
||||
Revision 1.51 2004/04/04 18:46:09 olle
|
||||
+ added $APPTYPE TOOL for MPW tools on MacOS
|
||||
|
||||
Revision 1.50 2004/03/10 22:52:57 peter
|
||||
|
@ -87,7 +87,7 @@ Const
|
||||
jmp_buf_size = 24;
|
||||
|
||||
{ calling conventions supported by the code generator }
|
||||
supported_calling_conventions = [
|
||||
supported_calling_conventions : tproccalloptions = [
|
||||
pocall_internproc,
|
||||
pocall_compilerproc,
|
||||
pocall_inline,
|
||||
@ -124,7 +124,10 @@ Implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.23 2004-02-27 10:21:05 florian
|
||||
Revision 1.24 2004-04-28 15:19:03 florian
|
||||
+ syscall directive support for MorphOS added
|
||||
|
||||
Revision 1.23 2004/02/27 10:21:05 florian
|
||||
* top_symbol killed
|
||||
+ refaddr to treference added
|
||||
+ refsymbol to treference added
|
||||
|
@ -75,7 +75,7 @@ Const
|
||||
target_cpu_string = 'm68k';
|
||||
|
||||
{ calling conventions supported by the code generator }
|
||||
supported_calling_conventions = [
|
||||
supported_calling_conventions : tproccalloptions = [
|
||||
pocall_internproc,
|
||||
pocall_compilerproc,
|
||||
pocall_inline,
|
||||
@ -105,7 +105,10 @@ Implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.9 2004-04-18 21:13:59 florian
|
||||
Revision 1.10 2004-04-28 15:19:03 florian
|
||||
+ syscall directive support for MorphOS added
|
||||
|
||||
Revision 1.9 2004/04/18 21:13:59 florian
|
||||
* more adaptions for m68k
|
||||
|
||||
Revision 1.8 2004/01/30 12:17:18 florian
|
||||
|
@ -67,6 +67,7 @@ interface
|
||||
procedure pop_parasize(pop_size:longint);virtual;
|
||||
procedure extra_interrupt_code;virtual;
|
||||
procedure extra_call_code;virtual;
|
||||
procedure do_syscall;virtual;abstract;
|
||||
public
|
||||
procedure pass_2;override;
|
||||
end;
|
||||
@ -915,12 +916,17 @@ implementation
|
||||
if cg.uses_registers(R_MMREGISTER) then
|
||||
cg.allocexplicitregisters(exprasmlist,R_MMREGISTER,paramanager.get_volatile_registers_mm(procdefinition.proccalloption));
|
||||
|
||||
{ Calling interrupt from the same code requires some
|
||||
extra code }
|
||||
if (po_interrupt in procdefinition.procoptions) then
|
||||
extra_interrupt_code;
|
||||
extra_call_code;
|
||||
cg.a_call_name(exprasmlist,tprocdef(procdefinition).mangledname);
|
||||
if procdefinition.proccalloption=pocall_syscall then
|
||||
do_syscall
|
||||
else
|
||||
begin
|
||||
{ Calling interrupt from the same code requires some
|
||||
extra code }
|
||||
if (po_interrupt in procdefinition.procoptions) then
|
||||
extra_interrupt_code;
|
||||
extra_call_code;
|
||||
cg.a_call_name(exprasmlist,tprocdef(procdefinition).mangledname);
|
||||
end;
|
||||
end;
|
||||
end
|
||||
else
|
||||
@ -1266,7 +1272,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.164 2004-03-14 20:10:56 peter
|
||||
Revision 1.165 2004-04-28 15:19:03 florian
|
||||
+ syscall directive support for MorphOS added
|
||||
|
||||
Revision 1.164 2004/03/14 20:10:56 peter
|
||||
* disable some debuginfo info when valgrind support is used
|
||||
|
||||
Revision 1.163 2004/03/13 21:23:21 florian
|
||||
|
@ -118,6 +118,12 @@ implementation
|
||||
{ codegen }
|
||||
if paraprintnodetree<>0 then
|
||||
printnode_reset;
|
||||
|
||||
{ target specific stuff }
|
||||
case target_info.system of
|
||||
system_powerpc_morphos:
|
||||
include(supported_calling_conventions,pocall_syscall);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@ -705,7 +711,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.63 2004-03-16 16:20:49 peter
|
||||
Revision 1.64 2004-04-28 15:19:03 florian
|
||||
+ syscall directive support for MorphOS added
|
||||
|
||||
Revision 1.63 2004/03/16 16:20:49 peter
|
||||
* reset current_module,current_procinfo so the destroy routines
|
||||
can't access their info anymore, because that can be already
|
||||
destroyed
|
||||
|
@ -1314,7 +1314,7 @@ const
|
||||
handler : {$ifdef FPCPROCVAR}@{$endif}pd_external;
|
||||
pocall : pocall_none;
|
||||
pooption : [po_external];
|
||||
mutexclpocall : [pocall_internproc,pocall_inline,pocall_palmossyscall];
|
||||
mutexclpocall : [pocall_internproc,pocall_inline,pocall_syscall];
|
||||
mutexclpotype : [potype_constructor,potype_destructor];
|
||||
mutexclpo : [po_exports,po_interrupt,po_assembler]
|
||||
),(
|
||||
@ -1520,9 +1520,9 @@ const
|
||||
mutexclpo : [po_external]
|
||||
),(
|
||||
idtok:_SYSCALL;
|
||||
pd_flags : [pd_interface,pd_implemen,pd_notobjintf];
|
||||
pd_flags : [pd_interface,pd_implemen,pd_notobject,pd_notobjintf];
|
||||
handler : {$ifdef FPCPROCVAR}@{$endif}pd_syscall;
|
||||
pocall : pocall_palmossyscall;
|
||||
pocall : pocall_syscall;
|
||||
pooption : [];
|
||||
mutexclpocall : [];
|
||||
mutexclpotype : [potype_constructor,potype_destructor];
|
||||
@ -2193,7 +2193,10 @@ const
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.167 2004-04-28 00:20:43 karoly
|
||||
Revision 1.168 2004-04-28 15:19:03 florian
|
||||
+ syscall directive support for MorphOS added
|
||||
|
||||
Revision 1.167 2004/04/28 00:20:43 karoly
|
||||
* fixed locationstr having nonsense values in some cases
|
||||
|
||||
Revision 1.166 2004/04/19 02:12:18 karoly
|
||||
|
@ -75,7 +75,7 @@ Const
|
||||
jmp_buf_size = 232;
|
||||
|
||||
{ calling conventions supported by the code generator }
|
||||
supported_calling_conventions = [
|
||||
supported_calling_conventions : tproccalloptions = [
|
||||
pocall_internproc,
|
||||
pocall_compilerproc,
|
||||
pocall_inline,
|
||||
@ -101,7 +101,10 @@ Implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.17 2004-02-27 10:21:05 florian
|
||||
Revision 1.18 2004-04-28 15:19:03 florian
|
||||
+ syscall directive support for MorphOS added
|
||||
|
||||
Revision 1.17 2004/02/27 10:21:05 florian
|
||||
* top_symbol killed
|
||||
+ refaddr to treference added
|
||||
+ refsymbol to treference added
|
||||
|
@ -66,7 +66,7 @@ const
|
||||
JMP_BUF_SIZE = 4; // 4 is used temporary to remove AllocTemp warning
|
||||
|
||||
{ calling conventions supported by the code generator }
|
||||
supported_calling_conventions = [
|
||||
supported_calling_conventions : tproccalloptions = [
|
||||
pocall_internproc,
|
||||
pocall_compilerproc,
|
||||
pocall_inline,
|
||||
@ -90,7 +90,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.15 2004-03-12 08:18:11 mazen
|
||||
Revision 1.16 2004-04-28 15:19:03 florian
|
||||
+ syscall directive support for MorphOS added
|
||||
|
||||
Revision 1.15 2004/03/12 08:18:11 mazen
|
||||
- revert '../' from include path
|
||||
|
||||
Revision 1.14 2004/03/11 16:22:28 mazen
|
||||
|
@ -369,13 +369,13 @@ const
|
||||
|
||||
const
|
||||
savestdregs_pocalls = [
|
||||
pocall_cdecl,pocall_cppdecl,pocall_palmossyscall,
|
||||
pocall_cdecl,pocall_cppdecl,pocall_syscall,
|
||||
pocall_stdcall,pocall_safecall,pocall_compilerproc,
|
||||
pocall_register,pocall_softfloat
|
||||
];
|
||||
|
||||
clearstack_pocalls = [
|
||||
pocall_cdecl,pocall_cppdecl,pocall_palmossyscall
|
||||
pocall_cdecl,pocall_cppdecl,pocall_syscall
|
||||
];
|
||||
|
||||
pushleftright_pocalls : tproccalloptions = [pocall_register,pocall_pascal];
|
||||
@ -407,7 +407,10 @@ initialization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.79 2004-04-18 15:22:24 florian
|
||||
Revision 1.80 2004-04-28 15:19:03 florian
|
||||
+ syscall directive support for MorphOS added
|
||||
|
||||
Revision 1.79 2004/04/18 15:22:24 florian
|
||||
+ location support for arguments, currently PowerPC/MorphOS only
|
||||
|
||||
Revision 1.78 2004/03/23 22:34:49 peter
|
||||
|
@ -102,7 +102,7 @@ begin
|
||||
s:=HPath.Str;
|
||||
if not (cs_link_on_target in aktglobalswitches) then
|
||||
s:=GetShortName(s);
|
||||
if s<>'' then
|
||||
if s<>'' then
|
||||
LinkRes.Add('SEARCH_DIR('+s+')');
|
||||
HPath:=TStringListItem(HPath.Next);
|
||||
end;
|
||||
@ -187,7 +187,7 @@ begin
|
||||
StripStr:='';
|
||||
{ FIXME!!! - Need to add proper stripping support with }
|
||||
{ separate strip command, to avoid stripping __abox__ symbol, }
|
||||
{ which is required to be present in current MorphOS executables! }
|
||||
{ which is required to be present in current MorphOS executables! }
|
||||
{ if (cs_link_strip in aktglobalswitches) then
|
||||
StripStr:='-s';}
|
||||
|
||||
@ -224,7 +224,10 @@ initialization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.3 2004-04-09 01:32:46 karoly
|
||||
Revision 1.4 2004-04-28 15:19:03 florian
|
||||
+ syscall directive support for MorphOS added
|
||||
|
||||
Revision 1.3 2004/04/09 01:32:46 karoly
|
||||
* disable stripping in mos linking scripts.
|
||||
|
||||
Revision 1.2 2004/04/08 17:11:02 karoly
|
||||
|
@ -202,12 +202,11 @@ unit cgx86;
|
||||
end;
|
||||
|
||||
function Tcgx86.getmmxregister(list:Taasmoutput):Tregister;
|
||||
|
||||
begin
|
||||
if not assigned(rg[R_MMXREGISTER]) then
|
||||
internalerror(200312124);
|
||||
result:=rg[R_MMXREGISTER].getregister(list,R_SUBNONE);
|
||||
end;
|
||||
begin
|
||||
if not assigned(rg[R_MMXREGISTER]) then
|
||||
internalerror(200312124);
|
||||
result:=rg[R_MMXREGISTER].getregister(list,R_SUBNONE);
|
||||
end;
|
||||
|
||||
procedure Tcgx86.getexplicitregister(list:Taasmoutput;r:Tregister);
|
||||
begin
|
||||
@ -1791,7 +1790,10 @@ unit cgx86;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.120 2004-04-09 14:36:05 peter
|
||||
Revision 1.121 2004-04-28 15:19:03 florian
|
||||
+ syscall directive support for MorphOS added
|
||||
|
||||
Revision 1.120 2004/04/09 14:36:05 peter
|
||||
* A_MOVSL renamed to A_MOVSD
|
||||
|
||||
Revision 1.119 2004/03/11 19:35:05 peter
|
||||
@ -2272,4 +2274,4 @@ end.
|
||||
* splitting of i386\cgcpu.pas into x86\cgx86.pas and i386\cgcpu.pas
|
||||
cgx86.pas will contain the common code for i386 and x86_64
|
||||
|
||||
}
|
||||
}
|
@ -84,7 +84,7 @@ Const
|
||||
|
||||
|
||||
{ calling conventions supported by the code generator }
|
||||
supported_calling_conventions = [
|
||||
supported_calling_conventions : tproccalloptions = [
|
||||
pocall_internproc,
|
||||
pocall_compilerproc,
|
||||
pocall_inline,
|
||||
@ -111,7 +111,10 @@ Implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.11 2004-04-12 18:25:26 florian
|
||||
Revision 1.12 2004-04-28 15:19:03 florian
|
||||
+ syscall directive support for MorphOS added
|
||||
|
||||
Revision 1.11 2004/04/12 18:25:26 florian
|
||||
+ AInt added
|
||||
|
||||
Revision 1.10 2003/12/25 01:07:09 florian
|
||||
|
Loading…
Reference in New Issue
Block a user