fixed some minor problems with copying conformant arrays,
authorceriel <none@none>
Tue, 3 Nov 1987 15:04:21 +0000 (15:04 +0000)
committerceriel <none@none>
Tue, 3 Nov 1987 15:04:21 +0000 (15:04 +0000)
and a LB that pointed below SP in transfer

lang/m2/libm2/confarray.c
lang/m2/libm2/transfer.e

index 0226a32..2e89d8d 100644 (file)
@@ -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++;
 }
index e3b388e..8d18160 100644 (file)
@@ -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