From owner-poplog-dev@cs.bham.ac.uk Sun Mar 13 01:12:54 2005 Return-path: Subject: Re: progress on AMD64 Poplog To: poplog-dev@cs.bham.ac.uk Date: Sun, 13 Mar 2005 02:09:09 +0100 (CET) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII From: Waldek Hebisch Sender: owner-poplog-dev@cs.bham.ac.uk Precedence: bulk Aaron Sloman wrote: > 6. I cannot suspend a pop11 process using ctrl Z. > The patch below should fix the problem. I fact, the patch fixes three bugs: - machine independent bug in sig_async.p (cought by more strict internal checks that I added), - updater of popmemlim was treating all bigints as no limit (a least ATM on AMD64 some bignints are not normalized and may be small) - bad definition of POPINT_BITS (and unnecessery change to int_convert.p) Index: getstore.p =================================================================== RCS file: /mn/a8/cvsroot/pop/src/getstore.p,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- src/getstore.p 12 Mar 2005 03:30:11 -0000 1.2 +++ src/getstore.p 13 Mar 2005 00:29:24 -0000 1.3 @@ -1024,11 +1024,17 @@ ;;; define updaterof active popmemlim n; lvars n; +;;; lconstant _MAX_MEM_MAX = _int(1<= 0 NEEDED', ':type-integral-nonneg') else + if n > #_< 1<_# then false -> n + else + _pint(Pint_->_uint(n, + #_< _int(1<_#)) -> n + endif endif endif; if n then Index: int_convert.p =================================================================== RCS file: /mn/a8/cvsroot/pop/src/int_convert.p,v retrieving revision 1.2 retrieving revision 1.4 diff -u -r1.2 -r1.4 --- src/int_convert.p 11 Feb 2005 05:34:43 -0000 1.2 +++ src/int_convert.p 13 Mar 2005 00:44:36 -0000 1.4 @@ -15,7 +15,7 @@ ;;; values used for converting between sysints and bigints, etc lconstant - ICVT_SHIFT = WORD_BITS-POPINT_BITS+1, + ICVT_SHIFT = WORD_BITS-POPINT_BITS, _ICVT_SHIFT = _int(ICVT_SHIFT), _ICVT_LOMASK = _int(2**ICVT_SHIFT-1), _ICVT_HIMASK = _int(2**POPINT_BITS-1), Index: sig_async.p =================================================================== RCS file: /mn/a8/cvsroot/pop/src/sig_async.p,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- src/sig_async.p 11 Feb 2005 05:34:43 -0000 1.2 +++ src/sig_async.p 12 Mar 2005 03:30:11 -0000 1.3 @@ -9,6 +9,7 @@ #_INCLUDE 'declare.ph'; #_INCLUDE 'signals.ph'; +lconstant _WORD_RANGE_MASK = _int(2**(WORD_BITS-1)-1); ;;; controlling asynchronous interrupts define active pop_enable_interrupts; @@ -29,7 +30,7 @@ define sys_send_signal(pid, signum); lvars pid, signum; Sys$-Check_integer(signum, 0); - (_extern kill(Sys$-Pint_->_sint(pid, _-1), _int(signum))) + (_extern kill(Sys$-Pint_->_sint(pid, _WORD_RANGE_MASK), _int(signum))) _lteq _2147483647 enddefine; Index: syscomp/sysdefs.p =================================================================== RCS file: /mn/a8/cvsroot/pop/src/syscomp/sysdefs.p,v retrieving revision 1.2 retrieving revision 1.4 diff -u -r1.2 -r1.4 --- src/syscomp/sysdefs.p 11 Feb 2005 05:34:43 -0000 1.2 +++ src/syscomp/sysdefs.p 13 Mar 2005 00:29:33 -0000 1.4 @@ -31,7 +31,7 @@ WORD_BITS = 64, - POPINT_BITS = 62, + POPINT_BITS = 61, SHORT_ALIGN_BITS = 8, ;;; alignment in bits for short access INT_ALIGN_BITS = 8, ;;; alignment in bits for int access -- Waldek Hebisch hebisch@math.uni.wroc.pl