Add missing linux68k platform and liblinux support library.
--HG-- branch : dtrg-experimental-powerpc
This commit is contained in:
45
plat/linux68k/libsys/_syscall.s
Normal file
45
plat/linux68k/libsys/_syscall.s
Normal file
@@ -0,0 +1,45 @@
|
||||
#
|
||||
! $Source: /cvsroot/tack/Ack/plat/linux386/libsys/_syscall.s,v $
|
||||
! $State: Exp $
|
||||
! $Revision: 1.1 $
|
||||
|
||||
! Declare segments (the order is important).
|
||||
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
|
||||
.sect .text
|
||||
|
||||
EINVAL = 22
|
||||
|
||||
! Perform a Linux system call.
|
||||
|
||||
.define __syscall
|
||||
__syscall:
|
||||
move.l (4, sp), d0
|
||||
move.l (8, sp), d1
|
||||
move.l (12, sp), d2
|
||||
move.l (16, sp), d3
|
||||
trap #0
|
||||
|
||||
tst.l d0
|
||||
bmi 1f
|
||||
rts
|
||||
|
||||
1:
|
||||
neg.l d0
|
||||
! It just so happens that errnos 1-34 are the same in Linux as in ACK.
|
||||
cmp.l #1, d0
|
||||
blt 2f
|
||||
cmp.l #34, d0
|
||||
bgt 2f
|
||||
move.l d0, (_errno)
|
||||
3:
|
||||
move.l #-1, d0
|
||||
rts
|
||||
|
||||
2:
|
||||
move.l #EINVAL, (_errno)
|
||||
bra 3b
|
||||
13
plat/linux68k/libsys/pmfile
Normal file
13
plat/linux68k/libsys/pmfile
Normal file
@@ -0,0 +1,13 @@
|
||||
-- $Source: /cvsroot/tack/Ack/plat/linux386/libsys/pmfile,v $
|
||||
-- $State: Exp $
|
||||
-- $Revision: 1.1 $
|
||||
|
||||
local d = ROOTDIR.."plat/linux68k/libsys/"
|
||||
|
||||
libsys_linux68k = acklibrary {
|
||||
ACKINCLUDES = {"%BINDIR%include"},
|
||||
|
||||
ackfile (d.."_syscall.s"),
|
||||
|
||||
install = pm.install("%BINDIR%lib/%PLATFORM%/libsys.a"),
|
||||
}
|
||||
Reference in New Issue
Block a user