From 2837aa68a7de6cd9cf8ebc116f08603ed411b0e3 Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 3 Nov 1987 15:04:21 +0000 Subject: [PATCH] fixed some minor problems with copying conformant arrays, and a LB that pointed below SP in transfer --- lang/m2/libm2/confarray.c | 6 +++--- lang/m2/libm2/transfer.e | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lang/m2/libm2/confarray.c b/lang/m2/libm2/confarray.c index 0226a32b8..2e89d8dbe 100644 --- a/lang/m2/libm2/confarray.c +++ b/lang/m2/libm2/confarray.c @@ -37,13 +37,13 @@ _copy_array(p, a) char dummy; ppdescr--; - sz = (((*ppdescr)->highminlow + 1) * (*ppdescr)->size + - (EM_WSIZE -1)) & ~ (EM_WSIZE - 1); + sz = ((*ppdescr)->highminlow + 1) * (*ppdescr)->size; if ((char *) &a - (char *) &dummy > 0) { (*ppdescr)->addr = q = (char *) &a; } - else (*ppdescr)->addr = q = (char *) &a - sz; + else (*ppdescr)->addr = q = (char *) &a - + ((sz + (EM_WSIZE - 1)) & ~ (EM_WSIZE - 1)); while (sz--) *q++ = *p++; } diff --git a/lang/m2/libm2/transfer.e b/lang/m2/libm2/transfer.e index e3b388edd..8d18160f1 100644 --- a/lang/m2/libm2/transfer.e +++ b/lang/m2/libm2/transfer.e @@ -130,6 +130,11 @@ _target adp -EM_PSIZE loi EM_PSIZE str 1 ; temporary stackpointer + + lae _MainLB + loi EM_PSIZE + str 0 + lae _CurrentProcess loi EM_PSIZE lae _MainProcess @@ -137,10 +142,6 @@ _target cmp zeq *2 - lae _MainLB - loi EM_PSIZE - str 0 - lae _StackBase loi EM_PSIZE lae _CurrentProcess