Browse Source

+ routines in baseunix can be overriden by processor specifics in bsyscall.inc

florian 20 years ago
parent
commit
314fe14247

+ 20 - 0
rtl/freebsd/i386/bsyscall.inc

@@ -0,0 +1,20 @@
+{
+    $Id$
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2005 by Michael Van Canneyt,
+    member of the Free Pascal development team.
+
+    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  2005-03-03 20:58:38  florian
+    + routines in baseunix can be overriden by processor specifics in bsyscall.inc
+}

+ 20 - 0
rtl/freebsd/x86_64/bsyscall.inc

@@ -0,0 +1,20 @@
+{
+    $Id$
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2005 by Michael Van Canneyt,
+    member of the Free Pascal development team.
+
+    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  2005-03-03 20:58:38  florian
+    + routines in baseunix can be overriden by processor specifics in bsyscall.inc
+}

+ 20 - 0
rtl/linux/arm/bsyscall.inc

@@ -0,0 +1,20 @@
+{
+    $Id$
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2005 by Michael Van Canneyt,
+    member of the Free Pascal development team.
+
+    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  2005-03-03 20:58:38  florian
+    + routines in baseunix can be overriden by processor specifics in bsyscall.inc
+}

+ 6 - 3
rtl/linux/bunxsysc.inc

@@ -338,13 +338,13 @@ begin
 end;
 end;
 
 
 
 
-{$ifndef FPC_SYSTEM_HAS_FPPIPE}
+{$ifndef FPC_BASEUNIX_HAS_FPPIPE}
 Function fppipe(var fildes : tfildes):cint;
 Function fppipe(var fildes : tfildes):cint;
 
 
 begin
 begin
  fppipe:=do_syscall(syscall_nr_pipe,TSysParam(@fildes));
  fppipe:=do_syscall(syscall_nr_pipe,TSysParam(@fildes));
 end;
 end;
-{$endif FPC_SYSTEM_HAS_FPPIPE}
+{$endif FPC_BASEUNIX_HAS_FPPIPE}
 
 
 
 
 function fpfcntl(fildes:cint;Cmd:cint;Arg:cint):cint;
 function fpfcntl(fildes:cint;Cmd:cint;Arg:cint):cint;
@@ -534,7 +534,10 @@ end;
 
 
 {
 {
  $Log$
  $Log$
- Revision 1.3  2005-03-03 20:13:44  florian
+ Revision 1.4  2005-03-03 20:58:38  florian
+   + routines in baseunix can be overriden by processor specifics in bsyscall.inc
+
+ Revision 1.3  2005/03/03 20:13:44  florian
    + sparc specific pipe implementation
    + sparc specific pipe implementation
 
 
  Revision 1.2  2005/02/14 17:13:30  peter
  Revision 1.2  2005/02/14 17:13:30  peter

+ 20 - 0
rtl/linux/i386/bsyscall.inc

@@ -0,0 +1,20 @@
+{
+    $Id$
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2005 by Michael Van Canneyt,
+    member of the Free Pascal development team.
+
+    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  2005-03-03 20:58:38  florian
+    + routines in baseunix can be overriden by processor specifics in bsyscall.inc
+}

+ 20 - 0
rtl/linux/m68k/bsyscall.inc

@@ -0,0 +1,20 @@
+{
+    $Id$
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2005 by Michael Van Canneyt,
+    member of the Free Pascal development team.
+
+    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  2005-03-03 20:58:38  florian
+    + routines in baseunix can be overriden by processor specifics in bsyscall.inc
+}

+ 20 - 0
rtl/linux/powerpc/bsyscall.inc

@@ -0,0 +1,20 @@
+{
+    $Id$
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2005 by Michael Van Canneyt,
+    member of the Free Pascal development team.
+
+    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  2005-03-03 20:58:38  florian
+    + routines in baseunix can be overriden by processor specifics in bsyscall.inc
+}

+ 56 - 0
rtl/linux/sparc/bsyscall.inc

@@ -0,0 +1,56 @@
+{
+    $Id$
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2005 by Michael Van Canneyt,
+    member of the Free Pascal development team.
+
+    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.
+
+ **********************************************************************}
+
+
+{$define FPC_BASEUNIX_HAS_FPPIPE}
+Function fppipe(var fildes : tfildes):cint;assembler;
+{
+  This function puts the registers in place, does the call, and then
+  copies back the registers as they are after the SysCall.
+}
+asm
+				mov     42,%g1
+        mov     %i0,%o0        
+        ta      0x10
+        bcc     .LSyscOK
+        nop
+        mov     %o0,%l0
+        sethi   %hi(fpc_threadvar_relocate_proc),%o2
+        or      %o2,%lo(fpc_threadvar_relocate_proc),%o2
+        ld      [%o2],%o3
+        subcc   %o3,%g0,%g0
+        bne     .LThread
+        nop
+        sethi   %hi(Errno+4),%o0
+        ba      .LNoThread
+        or      %o0,%lo(Errno+4),%o0
+.LThread:
+        sethi   %hi(Errno),%o0
+        or      %o0,%lo(Errno),%o0
+        call    %o3
+        ld      [%o0],%o0
+.LNoThread:
+        st      %l0,[%o0]
+        mov     -1,%o0
+.LSyscOK:
+        st      [%i0],%o0
+        st      [%i0+4],%o1
+end;
+
+{
+  $Log$
+  Revision 1.1  2005-03-03 20:58:38  florian
+    + routines in baseunix can be overriden by processor specifics in bsyscall.inc
+}

+ 4 - 38
rtl/linux/sparc/syscall.inc

@@ -58,43 +58,6 @@ asm
 end;
 end;
 
 
 
 
-{$define FPC_SYSTEM_HAS_FPPIPE}
-Function fppipe(var fildes : tfildes):cint;assembler;
-{
-  This function puts the registers in place, does the call, and then
-  copies back the registers as they are after the SysCall.
-}
-asm
-				mov     42,%g1
-        mov     %i0,%o0        
-        ta      0x10
-        bcc     .LSyscOK
-        nop
-        mov     %o0,%l0
-        sethi   %hi(fpc_threadvar_relocate_proc),%o2
-        or      %o2,%lo(fpc_threadvar_relocate_proc),%o2
-        ld      [%o2],%o3
-        subcc   %o3,%g0,%g0
-        bne     .LThread
-        nop
-        sethi   %hi(Errno+4),%o0
-        ba      .LNoThread
-        or      %o0,%lo(Errno+4),%o0
-.LThread:
-        sethi   %hi(Errno),%o0
-        or      %o0,%lo(Errno),%o0
-        call    %o3
-        ld      [%o0],%o0
-.LNoThread:
-        st      %l0,[%o0]
-        mov     -1,%o0
-.LSyscOK:
-        st      [%i0],%o0
-        st      [%i0+4],%o1
-end;
-
-
-
 {*****************************************************************************
 {*****************************************************************************
                      --- Main:The System Call Self ---
                      --- Main:The System Call Self ---
 *****************************************************************************}
 *****************************************************************************}
@@ -354,7 +317,10 @@ end;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.18  2005-03-03 20:13:44  florian
+  Revision 1.19  2005-03-03 20:58:38  florian
+    + routines in baseunix can be overriden by processor specifics in bsyscall.inc
+
+  Revision 1.18  2005/03/03 20:13:44  florian
     + sparc specific pipe implementation
     + sparc specific pipe implementation
 
 
   Revision 1.17  2005/02/14 17:13:30  peter
   Revision 1.17  2005/02/14 17:13:30  peter

+ 20 - 0
rtl/linux/x86_64/bsyscall.inc

@@ -0,0 +1,20 @@
+{
+    $Id$
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2005 by Michael Van Canneyt,
+    member of the Free Pascal development team.
+
+    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  2005-03-03 20:58:38  florian
+    + routines in baseunix can be overriden by processor specifics in bsyscall.inc
+}

+ 5 - 1
rtl/unix/baseunix.pp

@@ -82,6 +82,7 @@ end;
 {$ifndef FPC_USE_LIBC}
 {$ifndef FPC_USE_LIBC}
   {$i syscallh.inc}       // do_syscall declarations themselves
   {$i syscallh.inc}       // do_syscall declarations themselves
   {$i sysnr.inc}          // syscall numbers.
   {$i sysnr.inc}          // syscall numbers.
+  {$i bsyscall.inc}  			// cpu specific syscalls
   {$i bunxsysc.inc}       // syscalls in system unit.
   {$i bunxsysc.inc}       // syscalls in system unit.
   {$i settimeo.inc}
   {$i settimeo.inc}
 {$endif}
 {$endif}
@@ -92,7 +93,10 @@ end;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.3  2005-02-14 17:13:31  peter
+  Revision 1.4  2005-03-03 20:58:38  florian
+    + routines in baseunix can be overriden by processor specifics in bsyscall.inc
+
+  Revision 1.3  2005/02/14 17:13:31  peter
     * truncate log
     * truncate log
 
 
   Revision 1.2  2005/02/13 21:47:56  peter
   Revision 1.2  2005/02/13 21:47:56  peter