Browse Source

* additions

marco 22 years ago
parent
commit
3dc9241d0d
3 changed files with 29 additions and 13 deletions
  1. 8 2
      rtl/netbsd/signal.inc
  2. 15 10
      rtl/netbsd/sysofft.inc
  3. 6 1
      rtl/netbsd/unixsysc.inc

+ 8 - 2
rtl/netbsd/signal.inc

@@ -126,12 +126,15 @@ type sigset_t = array[0..3] of cardinal;
   SignalRestorer  = Procedure;cdecl;
   SignalRestorer  = Procedure;cdecl;
   PSignalRestorer = ^SignalRestorer;
   PSignalRestorer = ^SignalRestorer;
 
 
+{$ifdef powerpc}
+  TSigaction=  procedure(Sig: Longint); cdecl;
+{$else}
 {$define BSDHandler}
 {$define BSDHandler}
-
 {$ifdef BSDHandler}
 {$ifdef BSDHandler}
   TSigAction = procedure(Sig: Longint; code:longint;var SigContext: SigContextRec);cdecl;
   TSigAction = procedure(Sig: Longint; code:longint;var SigContext: SigContextRec);cdecl;
 {$else}
 {$else}
   TSigAction = procedure(Sig: Longint; var sininfo:tsiginfo_t;var SigContext: SigContextRec);cdecl;
   TSigAction = procedure(Sig: Longint; var sininfo:tsiginfo_t;var SigContext: SigContextRec);cdecl;
+{$endif}
 {$endif}
 {$endif}
 
 
   Sigset=sigset_t;
   Sigset=sigset_t;
@@ -161,7 +164,10 @@ type sigset_t = array[0..3] of cardinal;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.3  2004-01-04 01:11:28  marco
+  Revision 1.4  2004-01-04 15:55:47  marco
+   * additions
+
+  Revision 1.3  2004/01/04 01:11:28  marco
    * a new qod port of the freebsd rtl. To be refined in the coming days.
    * a new qod port of the freebsd rtl. To be refined in the coming days.
 
 
   Revision 1.2  2003/01/21 15:39:45  marco
   Revision 1.2  2003/01/21 15:39:45  marco

+ 15 - 10
rtl/netbsd/sysofft.inc

@@ -15,10 +15,11 @@ asm
   mr      r8,r12
   mr      r8,r12
   li      r6,0    
   li      r6,0    
   li      r4,199  
   li      r4,199  
-  crclr   4*cr1+eq
+//  crclr   cr1*4+eq
+  crxor   6,6,6
   li      r0,198
   li      r0,198
   sc
   sc
-  bso     cerrorlseek
+  bso     .Lcerrorlseek
 //  mr	  r0,r3
 //  mr	  r0,r3
 //  mr      r3,r4
 //  mr      r3,r4
 //  mr	  r4,r0
 //  mr	  r4,r0
@@ -26,7 +27,7 @@ asm
   mtlr    r0
   mtlr    r0
   addi    r1,r1,16
   addi    r1,r1,16
   blr
   blr
-cerrorlseek:
+.Lcerrorlseek:
   lis   r4,Errno@ha
   lis   r4,Errno@ha
   stw   r3,Errno@l(r4)
   stw   r3,Errno@l(r4)
   li    r3,-1
   li    r3,-1
@@ -48,16 +49,18 @@ mr      r5,r3
 li      r3,0  
 li      r3,0  
 li      r4,201
 li      r4,201
 li      r6,0  
 li      r6,0  
-crclr   4*cr1+eq
+
+//crclr   cr1*4+eq
+crxor  6,6,6
 li      r0,198  
 li      r0,198  
 sc
 sc
-bso     cerrortrunc
+bso     .Lcerrortrunc
 mr      r4,r3 
 mr      r4,r3 
 lwz     r0,20(r1)
 lwz     r0,20(r1)
 mtlr    r0
 mtlr    r0
 addi    r1,r1,16
 addi    r1,r1,16
 blr
 blr
-cerrortrunc:
+.Lcerrortrunc:
   lis     r4,Errno@ha
   lis     r4,Errno@ha
   stw     r3,Errno@l(r4)
   stw     r3,Errno@l(r4)
   li      r3,-1
   li      r3,-1
@@ -66,8 +69,9 @@ cerrortrunc:
   addi    r1,r1,16
   addi    r1,r1,16
 end;
 end;
 
 
+Function Fpmmap(start:pointer;len:size_t;prot:cint;flags:cint;fd:cint;offst:off_t):pointer; assembler;  [public, alias: 'FPC_SYSC_MMAP'];
 
 
-Function Fpmmap(adr,len,prot,flags,fdes,off:longint):longint;  assembler; [public, alias : 'FPC_SYSC_MMAP'];
+//Function Fpmmap(adr,len,prot,flags,fdes,off:longint):longint;  assembler; [public, alias : 'FPC_SYSC_MMAP'];
 
 
 asm
 asm
   stwu    r1,-16(r1)
   stwu    r1,-16(r1)
@@ -84,16 +88,17 @@ asm
   mr      r7,r0
   mr      r7,r0
   li      r4,197
   li      r4,197
   li      r10,0 
   li      r10,0 
-  crclr   4*cr1+eq
+//  crclr   cr1*4+eq
+  crxor  6,6,6
   li      r0,198
   li      r0,198
   sc
   sc
-  bso     cerrormmap
+  bso     .Lcerrormmap
   mr      r4,r3
   mr      r4,r3
   lwz     r0,20(r1)
   lwz     r0,20(r1)
   mtlr    r0
   mtlr    r0
   addi    r1,r1,16
   addi    r1,r1,16
   blr
   blr
-cerrormmap:
+.Lcerrormmap:
   lis     r4,Errno@ha
   lis     r4,Errno@ha
   stw     r3,Errno@l(r4)
   stw     r3,Errno@l(r4)
   li      r3,-1
   li      r3,-1

+ 6 - 1
rtl/netbsd/unixsysc.inc

@@ -106,6 +106,7 @@ Function intAssignPipe(var pipe_in,pipe_out:longint;var errn:cint):cint; {$ifnde
 }
 }
 
 
 begin
 begin
+{$ifdef i386}
  asm
  asm
    mov $42,%eax
    mov $42,%eax
    int $0x80
    int $0x80
@@ -124,6 +125,7 @@ begin
    mov Errn,%edx
    mov Errn,%edx
    mov %ebx,(%edx)
    mov %ebx,(%edx)
  end;
  end;
+{$endif}
 end;
 end;
 
 
 
 
@@ -275,7 +277,10 @@ end;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.5  2004-01-04 01:11:28  marco
+  Revision 1.6  2004-01-04 15:55:47  marco
+   * additions
+
+  Revision 1.5  2004/01/04 01:11:28  marco
    * a new qod port of the freebsd rtl. To be refined in the coming days.
    * a new qod port of the freebsd rtl. To be refined in the coming days.
 
 
   Revision 1.18  2004/01/01 17:07:21  marco
   Revision 1.18  2004/01/01 17:07:21  marco