mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-29 14:40:25 +02:00
* merged m68k updates
This commit is contained in:
parent
efa2d5f05e
commit
9663f60c00
@ -755,42 +755,61 @@ type
|
|||||||
PointerMethod = function(Obj: pointer; Param1: pointer): pointer;
|
PointerMethod = function(Obj: pointer; Param1: pointer): pointer;
|
||||||
|
|
||||||
function PreviousFramePointer: FramePointer;assembler;
|
function PreviousFramePointer: FramePointer;assembler;
|
||||||
|
{$undef FPC_PreviousFramePointer_Implemented}
|
||||||
asm
|
asm
|
||||||
{$ifdef i386}
|
{$ifdef i386}
|
||||||
|
{$define FPC_PreviousFramePointer_Implemented}
|
||||||
movl (%ebp), %eax
|
movl (%ebp), %eax
|
||||||
|
end ['EAX'];
|
||||||
{$endif}
|
{$endif}
|
||||||
{$ifdef m68k}
|
{$ifdef m68k}
|
||||||
|
{$define FPC_PreviousFramePointer_Implemented}
|
||||||
move.l a6,d0
|
move.l a6,d0
|
||||||
|
end ['D0'];
|
||||||
{$endif}
|
{$endif}
|
||||||
end ['EAX'];
|
{$ifndef FPC_PreviousFramePointer_Implemented}
|
||||||
|
{$error PreviousFramePointer function not implemented}
|
||||||
|
{$endif not FPC_PreviousFramePointer_Implemented}
|
||||||
|
|
||||||
|
|
||||||
function CallPointerConstructor(Ctor: pointer; Obj: pointer; VMT: pointer; Param1: pointer): pointer;
|
function CallPointerConstructor(Ctor: pointer; Obj: pointer; VMT: pointer; Param1: pointer): pointer;
|
||||||
|
{$undef FPC_CallPointerConstructor_Implemented}
|
||||||
begin
|
begin
|
||||||
asm
|
asm
|
||||||
{$ifdef i386}
|
{$ifdef i386}
|
||||||
|
{$define FPC_CallPointerConstructor_Implemented}
|
||||||
movl Obj, %esi
|
movl Obj, %esi
|
||||||
{$endif}
|
{$endif}
|
||||||
{$ifdef m68k}
|
{$ifdef m68k}
|
||||||
|
{$define FPC_CallPointerConstructor_Implemented}
|
||||||
move.l Obj, a5
|
move.l Obj, a5
|
||||||
{$endif}
|
{$endif}
|
||||||
end;
|
end;
|
||||||
CallPointerConstructor := PointerConstructor(Ctor)(VMT, Obj, Param1)
|
CallPointerConstructor := PointerConstructor(Ctor)(VMT, Obj, Param1)
|
||||||
end;
|
end;
|
||||||
|
{$ifndef FPC_CallPointerConstructor_Implemented}
|
||||||
|
{$error CallPointerConstructor function not implemented}
|
||||||
|
{$endif not FPC_CallPointerConstructor_Implemented}
|
||||||
|
|
||||||
|
|
||||||
function CallPointerMethod(Method: pointer; Obj: pointer; Param1: pointer): pointer;
|
function CallPointerMethod(Method: pointer; Obj: pointer; Param1: pointer): pointer;
|
||||||
|
{$undef FPC_CallPointerMethod_Implemented}
|
||||||
begin
|
begin
|
||||||
asm
|
asm
|
||||||
{$ifdef i386}
|
{$ifdef i386}
|
||||||
|
{$define FPC_CallPointerMethod_Implemented}
|
||||||
movl Obj, %esi
|
movl Obj, %esi
|
||||||
{$endif}
|
{$endif}
|
||||||
{$ifdef m68k}
|
{$ifdef m68k}
|
||||||
|
{$define FPC_CallPointerMethod_Implemented}
|
||||||
move.l Obj, a5
|
move.l Obj, a5
|
||||||
{$endif}
|
{$endif}
|
||||||
end;
|
end;
|
||||||
CallPointerMethod := PointerMethod(Method)(Obj, Param1)
|
CallPointerMethod := PointerMethod(Method)(Obj, Param1)
|
||||||
end;
|
end;
|
||||||
|
{$ifndef FPC_CallPointerMethod_Implemented}
|
||||||
|
{$error CallPointerMethod function not implemented}
|
||||||
|
{$endif not FPC_CallPointerMethod_Implemented}
|
||||||
|
|
||||||
|
|
||||||
function CallPointerLocal(Func: pointer; Frame: FramePointer; Param1: pointer): pointer;
|
function CallPointerLocal(Func: pointer; Frame: FramePointer; Param1: pointer): pointer;
|
||||||
@ -2814,7 +2833,10 @@ END;
|
|||||||
END.
|
END.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.5 2001-05-06 17:13:22 jonas
|
Revision 1.6 2001-07-15 11:57:16 peter
|
||||||
|
* merged m68k updates
|
||||||
|
|
||||||
|
Revision 1.5 2001/05/06 17:13:22 jonas
|
||||||
* completed incomplete typed constant records
|
* completed incomplete typed constant records
|
||||||
|
|
||||||
Revision 1.4 2001/04/16 18:36:41 florian
|
Revision 1.4 2001/04/16 18:36:41 florian
|
||||||
|
@ -73,6 +73,8 @@ Type
|
|||||||
ValUInt = Cardinal;
|
ValUInt = Cardinal;
|
||||||
ValReal = Real;
|
ValReal = Real;
|
||||||
|
|
||||||
|
{ Comp type does not exist on fpu }
|
||||||
|
Comp = int64;
|
||||||
{$define SUPPORT_SINGLE}
|
{$define SUPPORT_SINGLE}
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
@ -515,7 +517,10 @@ const
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.27 2001-07-10 18:04:37 peter
|
Revision 1.28 2001-07-15 11:57:16 peter
|
||||||
|
* merged m68k updates
|
||||||
|
|
||||||
|
Revision 1.27 2001/07/10 18:04:37 peter
|
||||||
* merged textfile, readlink and concat ansistring fixes
|
* merged textfile, readlink and concat ansistring fixes
|
||||||
|
|
||||||
Revision 1.26 2001/07/09 21:15:41 peter
|
Revision 1.26 2001/07/09 21:15:41 peter
|
||||||
|
@ -130,6 +130,11 @@ RTL=..
|
|||||||
INC=$(RTL)/inc
|
INC=$(RTL)/inc
|
||||||
PROCINC=$(RTL)/$(CPU_TARGET)
|
PROCINC=$(RTL)/$(CPU_TARGET)
|
||||||
UNIXINC=$(RTL)/unix
|
UNIXINC=$(RTL)/unix
|
||||||
|
ifeq ($(CPU_TARGET),i386)
|
||||||
|
CPU_UNITS=ports cpu mmx graph
|
||||||
|
else
|
||||||
|
CPU_UNITS=
|
||||||
|
endif
|
||||||
UNITPREFIX=rtl
|
UNITPREFIX=rtl
|
||||||
ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
|
ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
|
||||||
SYSTEMUNIT=system
|
SYSTEMUNIT=system
|
||||||
@ -149,7 +154,7 @@ GRAPHDIR=$(INC)/graph
|
|||||||
ifndef USELIBGGI
|
ifndef USELIBGGI
|
||||||
USELIBGGI=NO
|
USELIBGGI=NO
|
||||||
endif
|
endif
|
||||||
override TARGET_UNITS+=$(SYSTEMUNIT) objpas strings $(LINUXUNIT) unix ports initc dos crt objects printer graph ggigraph sysutils typinfo math varutils cpu mmx getopts heaptrc lineinfo errors sockets gpm ipc serial terminfo dl dynlibs video mouse keyboard
|
override TARGET_UNITS+=$(SYSTEMUNIT) objpas strings $(LINUXUNIT) unix initc $(CPU_UNITS) dos crt objects printer ggigraph sysutils typinfo math varutils getopts heaptrc lineinfo errors sockets gpm ipc serial terminfo dl dynlibs video mouse keyboard
|
||||||
override TARGET_LOADERS+=prt0 dllprt0 cprt0 gprt0 cprt21 gprt21
|
override TARGET_LOADERS+=prt0 dllprt0 cprt0 gprt0 cprt21 gprt21
|
||||||
override TARGET_RSTS+=math varutils typinfo
|
override TARGET_RSTS+=math varutils typinfo
|
||||||
override CLEAN_UNITS+=syslinux linux
|
override CLEAN_UNITS+=syslinux linux
|
||||||
|
@ -8,10 +8,10 @@ main=rtl
|
|||||||
[target]
|
[target]
|
||||||
loaders=prt0 dllprt0 cprt0 gprt0 cprt21 gprt21
|
loaders=prt0 dllprt0 cprt0 gprt0 cprt21 gprt21
|
||||||
units=$(SYSTEMUNIT) objpas strings \
|
units=$(SYSTEMUNIT) objpas strings \
|
||||||
$(LINUXUNIT) unix ports initc \
|
$(LINUXUNIT) unix initc $(CPU_UNITS) \
|
||||||
dos crt objects printer graph ggigraph \
|
dos crt objects printer ggigraph \
|
||||||
sysutils typinfo math varutils \
|
sysutils typinfo math varutils \
|
||||||
cpu mmx getopts heaptrc lineinfo \
|
getopts heaptrc lineinfo \
|
||||||
errors sockets gpm ipc serial terminfo dl dynlibs \
|
errors sockets gpm ipc serial terminfo dl dynlibs \
|
||||||
video mouse keyboard
|
video mouse keyboard
|
||||||
rsts=math varutils typinfo
|
rsts=math varutils typinfo
|
||||||
@ -50,6 +50,12 @@ INC=$(RTL)/inc
|
|||||||
PROCINC=$(RTL)/$(CPU_TARGET)
|
PROCINC=$(RTL)/$(CPU_TARGET)
|
||||||
UNIXINC=$(RTL)/unix
|
UNIXINC=$(RTL)/unix
|
||||||
|
|
||||||
|
ifeq ($(CPU_TARGET),i386)
|
||||||
|
CPU_UNITS=ports cpu mmx graph
|
||||||
|
else
|
||||||
|
CPU_UNITS=
|
||||||
|
endif
|
||||||
|
|
||||||
UNITPREFIX=rtl
|
UNITPREFIX=rtl
|
||||||
|
|
||||||
ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
|
ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
|
||||||
|
@ -36,6 +36,7 @@ begin
|
|||||||
LinuxError:=Sys_EInval;
|
LinuxError:=Sys_EInval;
|
||||||
exit(-1); // give an error result
|
exit(-1); // give an error result
|
||||||
end;
|
end;
|
||||||
|
{$ifdef i386}
|
||||||
asm
|
asm
|
||||||
{ Insert the argument onto the new stack. }
|
{ Insert the argument onto the new stack. }
|
||||||
movl sp,%ecx
|
movl sp,%ecx
|
||||||
@ -68,6 +69,44 @@ begin
|
|||||||
.Lclone_end:
|
.Lclone_end:
|
||||||
movl %eax,__RESULT
|
movl %eax,__RESULT
|
||||||
end;
|
end;
|
||||||
|
{$endif i386}
|
||||||
|
{$ifdef m68k}
|
||||||
|
{ No yet translated, my m68k assembler is too weak for such things PM }
|
||||||
|
(*
|
||||||
|
asm
|
||||||
|
{ Insert the argument onto the new stack. }
|
||||||
|
movl sp,%ecx
|
||||||
|
subl $8,%ecx
|
||||||
|
movl args,%eax
|
||||||
|
movl %eax,4(%ecx)
|
||||||
|
|
||||||
|
{ Save the function pointer as the zeroth argument.
|
||||||
|
It will be popped off in the child in the ebx frobbing below. }
|
||||||
|
movl func,%eax
|
||||||
|
movl %eax,0(%ecx)
|
||||||
|
|
||||||
|
{ Do the system call }
|
||||||
|
pushl %ebx
|
||||||
|
movl flags,%ebx
|
||||||
|
movl SysCall_nr_clone,%eax
|
||||||
|
int $0x80
|
||||||
|
popl %ebx
|
||||||
|
test %eax,%eax
|
||||||
|
jnz .Lclone_end
|
||||||
|
|
||||||
|
{ We're in the new thread }
|
||||||
|
subl %ebp,%ebp { terminate the stack frame }
|
||||||
|
call *%ebx
|
||||||
|
{ exit process }
|
||||||
|
movl %eax,%ebx
|
||||||
|
movl $1,%eax
|
||||||
|
int $0x80
|
||||||
|
|
||||||
|
.Lclone_end:
|
||||||
|
movl %eax,__RESULT
|
||||||
|
end;
|
||||||
|
*)
|
||||||
|
{$endif m68k}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -927,7 +966,10 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.3 2001-06-03 20:19:09 peter
|
Revision 1.4 2001-07-15 11:57:16 peter
|
||||||
|
* merged m68k updates
|
||||||
|
|
||||||
|
Revision 1.3 2001/06/03 20:19:09 peter
|
||||||
* FSStat to StatFS
|
* FSStat to StatFS
|
||||||
* StatFS structure to TStatFS
|
* StatFS structure to TStatFS
|
||||||
|
|
||||||
|
@ -44,30 +44,15 @@ var
|
|||||||
|
|
||||||
procedure prthaltproc;external name '_haltproc';
|
procedure prthaltproc;external name '_haltproc';
|
||||||
|
|
||||||
procedure System_exit;
|
Procedure System_exit;
|
||||||
{$undef fpc_system_exit_ok}
|
Begin
|
||||||
begin
|
prthaltproc;
|
||||||
{$ifdef i386}
|
|
||||||
{$define fpc_system_exit_ok}
|
|
||||||
asm
|
|
||||||
jmp prthaltproc
|
|
||||||
end;
|
|
||||||
{$endif i386}
|
|
||||||
{$ifdef m68k}
|
|
||||||
{$undef fpc_system_exit_ok}
|
|
||||||
asm
|
|
||||||
bra prthaltproc
|
|
||||||
end;
|
|
||||||
{$endif m68k}
|
|
||||||
{$ifndef fpc_system_exit_ok}
|
|
||||||
{$error System_exit code is not implemented }
|
|
||||||
{$endif not fpc_system_exit_ok}
|
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
Function ParamCount: Longint;
|
Function ParamCount: Longint;
|
||||||
Begin
|
Begin
|
||||||
Paramcount:=argc-1
|
Paramcount:=argc-1;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
@ -111,7 +96,7 @@ End;
|
|||||||
*****************************************************************************}
|
*****************************************************************************}
|
||||||
|
|
||||||
var
|
var
|
||||||
_HEAP : longint;external name 'HEAP';
|
_HEAP : pointer;external name 'HEAP';
|
||||||
_HEAPSIZE : longint;external name 'HEAPSIZE';
|
_HEAPSIZE : longint;external name 'HEAPSIZE';
|
||||||
|
|
||||||
function getheapstart:pointer;assembler;
|
function getheapstart:pointer;assembler;
|
||||||
@ -727,7 +712,10 @@ End.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.13 2001-07-13 22:05:09 peter
|
Revision 1.14 2001-07-15 11:57:16 peter
|
||||||
|
* merged m68k updates
|
||||||
|
|
||||||
|
Revision 1.13 2001/07/13 22:05:09 peter
|
||||||
* cygwin updates
|
* cygwin updates
|
||||||
|
|
||||||
Revision 1.12 2001/06/02 19:24:49 peter
|
Revision 1.12 2001/06/02 19:24:49 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user