Update of /cvsroot/wisp/wisp/modules
In directory usw-pr-cvs1:/tmp/cvs-serv7142/modules
Modified Files:
linux.wrti universal.wrti
Log Message:
Replaced the C-written |sys:fstat|, |sys:lstat|, and |sys:stat| with the Worth-written |sys:ns:fstat|, |sys:ns:lstat|, and |sys:ns:stat|.
Index: linux.wrti
===================================================================
RCS file: /cvsroot/wisp/wisp/modules/linux.wrti,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- linux.wrti 7 Sep 2002 22:02:03 -0000 1.15
+++ linux.wrti 7 Sep 2002 22:03:51 -0000 1.16
@@ -271,6 +271,23 @@
(macro WNOHANG 1)
(macro WUNTRACED 2)
+ ; <asm/stat.h>
+ (macro stat.dev@ 0 + wyde@)
+ (macro stat.ino@ 4 + tetra@)
+ (macro stat.mode@ 8 + wyde@)
+ (macro stat.nlink@ 10 + wyde@)
+ (macro stat.uid@ 12 + wyde@)
+ (macro stat.gid@ 14 + wyde@)
+ (macro stat.rdev@ 16 + wyde@)
+ (macro stat.size@ 20 + tetra@)
+ (macro stat.blksize@ 24 + tetra@)
+ (macro stat.blocks@ 28 + tetra@)
+ (macro stat.atime@ 32 + tetra@)
+ (macro stat.mtime@ 40 + tetra@)
+ (macro stat.ctime@ 48 + tetra@)
+ (macro sizeof.struct-stat 64)
+ (macro sizeof.struct-stat.aligned 64)
+
; <linux/socket.h>
(macro AF_UNSPEC 0) (macro PF_UNSPEC 0)
(macro AF_UNIX 1) (macro PF_UNIX 1)
Index: universal.wrti
===================================================================
RCS file: /cvsroot/wisp/wisp/modules/universal.wrti,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- universal.wrti 7 Sep 2002 22:02:40 -0000 1.13
+++ universal.wrti 7 Sep 2002 22:03:51 -0000 1.14
@@ -40,8 +40,12 @@
(macro ?dup
dup if dup then)
+ ; Note that |sp@| gets the machine stack pointer
+ ; whereas some items apparently in stack might actually
+ ; be in registers. Usage of explicit |stack=!| is
+ ; strongly recommended before |sp@|.
+
(macro sp@
- (flush)
(register)
,(mov ,0 %esp))
@@ -55,6 +59,16 @@
,(mov %esp ,0)
drop)
+ (macro allocate ; takes: (size regcount)
+ ; size must be a multiple of cell size
+ ; regcount must be less than the number
+ ; of machine registers
+ ; regcount must be an integer constant
+ 1 + stack=! ,(sub %esp ,0) drop sp@)
+
+ (macro deallocate ; takes (size regcount), see |allocate|
+ 1 + stack=! ,(add %esp ,0) drop)
+
;; Double-cell stack operations
(macro 2dup
over swap dup -rot)
@@ -516,11 +530,11 @@
;; Memory operations
(macro byte@
(->ureg 0)
- ,(movzx ,0 (byte ,0)))
+ ,(zex ,0 (byte ,0)))
(macro wyde@
(->ureg 0)
- ,(movzx ,0 (wyde ,0)))
+ ,(zex ,0 (wyde ,0)))
(macro tetra@
(->ureg 0)
|