Update of /cvsroot/wisp/wisp/modules
In directory usw-pr-cvs1:/tmp/cvs-serv3540/modules
Modified Files:
linux.wrti wisptyp.wrti
Log Message:
Dropped |sys:raw:nanosleep|.
Index: linux.wrti
===================================================================
RCS file: /cvsroot/wisp/wisp/modules/linux.wrti,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- linux.wrti 4 Sep 2002 14:35:17 -0000 1.13
+++ linux.wrti 7 Sep 2002 21:51:45 -0000 1.14
@@ -107,6 +107,10 @@
(macro sys.munlock (conform %ebx %ecx) 151 \sys (believe %eax))
(macro sys.mlockall (conform %ebx) 152 \sys (believe %eax))
(macro sys.munlockall (conform) 153 \sys (believe %eax))
+ ; |sys.nanosleep| takes ( sec nsec ) and returns ( sec nsec result ).
+ ; The returned time is not always meaningful.
+ (macro sys.nanosleep swap (flush) ,(mov %ebx %esp) ,(mov %ecx %esp)
+ 162 \sys (believe %eax) -rot swap rot)
(macro sys.getcwd (conform %ebx %ecx) 183 \sys (believe %eax))
(macro sys.socket swap rot 1 \skt (believe %eax) nip nip nip)
Index: wisptyp.wrti
===================================================================
RCS file: /cvsroot/wisp/wisp/modules/wisptyp.wrti,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- wisptyp.wrti 4 Sep 2002 14:26:24 -0000 1.8
+++ wisptyp.wrti 7 Sep 2002 21:51:45 -0000 1.9
@@ -34,6 +34,9 @@
(macro cons?
2 xor 7 and 0 =)
+ (macro utdecons ; (cons) -> (car cdr)
+ dup utcar@ swap utcdr@)
+
;; Node manipulation
(macro untag-node
@@ -121,6 +124,18 @@
(macro go-raise
(flush) 'raise$2 jump)
+
+ ;; Arithmetics
+
+ (extern binary_add)
+ (extern binary_sub)
+ (extern binary_mul)
+ (extern binary_div)
+
+ (macro w+ <: -rot 2 (conform %ecx) 'binary_add jump :> (believe %eax))
+ (macro w- <: -rot 2 (conform %ecx) 'binary_sub jump :> (believe %eax))
+ (macro w* <: -rot 2 (conform %ecx) 'binary_mul jump :> (believe %eax))
+ (macro w/ <: -rot 2 (conform %ecx) 'binary_div jump :> (believe %eax))
;; Records
|