[Wisp-cvs] wisp/modules io.wrti,1.9,1.10 linux.wrti,1.18,1.19 universal.wrti,1.16,1.17 wisptyp.wrti,
Status: Alpha
Brought to you by:
digg
From: <di...@us...> - 2002-09-18 20:58:37
|
Update of /cvsroot/wisp/wisp/modules In directory usw-pr-cvs1:/tmp/cvs-serv26569/modules Modified Files: io.wrti linux.wrti universal.wrti wisptyp.wrti Log Message: Moved file descriptor set manipulation from the Wisp level to the Worth level. Index: io.wrti =================================================================== RCS file: /cvsroot/wisp/wisp/modules/io.wrti,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- io.wrti 26 Aug 2002 16:14:54 -0000 1.9 +++ io.wrti 18 Sep 2002 20:58:04 -0000 1.10 @@ -42,6 +42,9 @@ 2drop) (defun dhexprint - -rot hexprint hexprint)) + -rot hexprint hexprint) + + (macro probe + type " = [" type dup hexprint "]\n" type)) ; vim:ft=worth Index: linux.wrti =================================================================== RCS file: /cvsroot/wisp/wisp/modules/linux.wrti,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- linux.wrti 18 Sep 2002 20:54:23 -0000 1.18 +++ linux.wrti 18 Sep 2002 20:58:04 -0000 1.19 @@ -313,6 +313,30 @@ (macro TCSETSW #x5403) (macro TCSETSF #x5404) + ;;;; <linux/posix_types.h> and <asm/posix_types.h> + (macro FD_SETSIZE 1024) + (macro sizeof.fd_set 128) + (macro sizeof.fd_set.aligned 128) + (macro sizeof.fd_set.tetras 32) + (macro FD_ZERO sizeof.fd_set.tetras 0 tetrafill) + (macro FD_SET ; ( fd fdset ) + swap dup 3 rshift -4 and + swap #x1F and swap + ; Cropping is necessary here: apparently, some processors + ; (AMD 6.7.0, to be specific; and even Intel 5.2.C) will + ; happily modify a following word if the bit index argument + ; is a register and the value exceeds 31. The comment in + ; Nasm manual is apparently not entirely correct. + (stack>=! 3) ,(bts (tetra ,0 ,2) ,1) drop drop drop) + (macro FD_CLR ; ( fd fdset ) + swap dup 3 rshift -4 and swap #x1F and swap + ,(btr (tetra ,0 ,2) ,1) drop drop drop) + (macro FD_ISSET ; ( fd fdset ) + swap dup 3 rshift -4 and + swap #x1F and swap + (register %eax %ebx %ecx %edx) + ,(bt (tetra ,1 ,3) ,2) ,(mov ,0 %?c) nip nip nip) + ;;;; <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.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- universal.wrti 11 Sep 2002 17:36:55 -0000 1.16 +++ universal.wrti 18 Sep 2002 20:58:04 -0000 1.17 @@ -598,21 +598,24 @@ (macro cell! tetra!) (macro fill - (flush) - ,(pop %eax) - ,(pop %ecx) - ,(pop %edi) + (conform %edi %ecx %eax) ,(cld) ,(rep) - ,(stos %al)) + ,(stos %al) + (believe)) + + (macro tetrafill + (conform %edi %ecx %eax) + ,(cld) + ,(rep) + ,(stos %eax) + (believe)) (macro move - (flush) - ,(pop %ecx) - ,(pop %edi) - ,(pop %esi) + (conform %esi %edi %ecx) ,(cld) ,(rep) - ,(movs \byte))) + ,(movs \byte) + (believe))) ; vim:ft=worth Index: wisptyp.wrti =================================================================== RCS file: /cvsroot/wisp/wisp/modules/wisptyp.wrti,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- wisptyp.wrti 18 Sep 2002 20:54:23 -0000 1.13 +++ wisptyp.wrti 18 Sep 2002 20:58:04 -0000 1.14 @@ -45,6 +45,9 @@ (macro require-c8string dup get-type NC_C8STRING <> if 'WB_c8string_huh swap go-raise then) + (macro require-string-length + over string-length <> if 'WB_range swap go-raise then) + (macro string-length cell+ cell@) |