* merged m68k updates

This commit is contained in:
peter 2001-07-15 11:57:16 +00:00
parent efa2d5f05e
commit 9663f60c00
6 changed files with 97 additions and 29 deletions

View File

@ -755,42 +755,61 @@ type
PointerMethod = function(Obj: pointer; Param1: pointer): pointer;
function PreviousFramePointer: FramePointer;assembler;
{$undef FPC_PreviousFramePointer_Implemented}
asm
{$ifdef i386}
{$define FPC_PreviousFramePointer_Implemented}
movl (%ebp), %eax
end ['EAX'];
{$endif}
{$ifdef m68k}
{$define FPC_PreviousFramePointer_Implemented}
move.l a6,d0
end ['D0'];
{$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;
{$undef FPC_CallPointerConstructor_Implemented}
begin
asm
{$ifdef i386}
{$define FPC_CallPointerConstructor_Implemented}
movl Obj, %esi
{$endif}
{$ifdef m68k}
{$define FPC_CallPointerConstructor_Implemented}
move.l Obj, a5
{$endif}
end;
CallPointerConstructor := PointerConstructor(Ctor)(VMT, Obj, Param1)
end;
{$ifndef FPC_CallPointerConstructor_Implemented}
{$error CallPointerConstructor function not implemented}
{$endif not FPC_CallPointerConstructor_Implemented}
function CallPointerMethod(Method: pointer; Obj: pointer; Param1: pointer): pointer;
{$undef FPC_CallPointerMethod_Implemented}
begin
asm
{$ifdef i386}
{$define FPC_CallPointerMethod_Implemented}
movl Obj, %esi
{$endif}
{$ifdef m68k}
{$define FPC_CallPointerMethod_Implemented}
move.l Obj, a5
{$endif}
end;
CallPointerMethod := PointerMethod(Method)(Obj, Param1)
end;
{$ifndef FPC_CallPointerMethod_Implemented}
{$error CallPointerMethod function not implemented}
{$endif not FPC_CallPointerMethod_Implemented}
function CallPointerLocal(Func: pointer; Frame: FramePointer; Param1: pointer): pointer;
@ -2814,7 +2833,10 @@ END;
END.
{
$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
Revision 1.4 2001/04/16 18:36:41 florian

View File

@ -73,6 +73,8 @@ Type
ValUInt = Cardinal;
ValReal = Real;
{ Comp type does not exist on fpu }
Comp = int64;
{$define SUPPORT_SINGLE}
{$endif}
@ -515,7 +517,10 @@ const
{
$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
Revision 1.26 2001/07/09 21:15:41 peter

View File

@ -130,6 +130,11 @@ RTL=..
INC=$(RTL)/inc
PROCINC=$(RTL)/$(CPU_TARGET)
UNIXINC=$(RTL)/unix
ifeq ($(CPU_TARGET),i386)
CPU_UNITS=ports cpu mmx graph
else
CPU_UNITS=
endif
UNITPREFIX=rtl
ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
SYSTEMUNIT=system
@ -149,7 +154,7 @@ GRAPHDIR=$(INC)/graph
ifndef USELIBGGI
USELIBGGI=NO
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_RSTS+=math varutils typinfo
override CLEAN_UNITS+=syslinux linux

View File

@ -8,10 +8,10 @@ main=rtl
[target]
loaders=prt0 dllprt0 cprt0 gprt0 cprt21 gprt21
units=$(SYSTEMUNIT) objpas strings \
$(LINUXUNIT) unix ports initc \
dos crt objects printer graph ggigraph \
$(LINUXUNIT) unix initc $(CPU_UNITS) \
dos crt objects printer ggigraph \
sysutils typinfo math varutils \
cpu mmx getopts heaptrc lineinfo \
getopts heaptrc lineinfo \
errors sockets gpm ipc serial terminfo dl dynlibs \
video mouse keyboard
rsts=math varutils typinfo
@ -50,6 +50,12 @@ INC=$(RTL)/inc
PROCINC=$(RTL)/$(CPU_TARGET)
UNIXINC=$(RTL)/unix
ifeq ($(CPU_TARGET),i386)
CPU_UNITS=ports cpu mmx graph
else
CPU_UNITS=
endif
UNITPREFIX=rtl
ifeq ($(findstring 1.0.,$(FPC_VERSION)),)

View File

@ -36,6 +36,7 @@ begin
LinuxError:=Sys_EInval;
exit(-1); // give an error result
end;
{$ifdef i386}
asm
{ Insert the argument onto the new stack. }
movl sp,%ecx
@ -68,6 +69,44 @@ begin
.Lclone_end:
movl %eax,__RESULT
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;
@ -927,7 +966,10 @@ end;
{
$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
* StatFS structure to TStatFS

View File

@ -44,30 +44,15 @@ var
procedure prthaltproc;external name '_haltproc';
procedure System_exit;
{$undef fpc_system_exit_ok}
begin
{$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}
Procedure System_exit;
Begin
prthaltproc;
End;
Function ParamCount: Longint;
Begin
Paramcount:=argc-1
Paramcount:=argc-1;
End;
@ -111,7 +96,7 @@ End;
*****************************************************************************}
var
_HEAP : longint;external name 'HEAP';
_HEAP : pointer;external name 'HEAP';
_HEAPSIZE : longint;external name 'HEAPSIZE';
function getheapstart:pointer;assembler;
@ -727,7 +712,10 @@ End.
{
$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
Revision 1.12 2001/06/02 19:24:49 peter