Add missing linux68k platform and liblinux support library.

--HG--
branch : dtrg-experimental-powerpc
This commit is contained in:
David Given
2013-05-09 00:56:10 +01:00
parent c93cb69959
commit 8d0261473d
29 changed files with 1192 additions and 0 deletions

View 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

View 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"),
}