Index: /trunk/source/lisp-kernel/arm-gc.c
===================================================================
--- /trunk/source/lisp-kernel/arm-gc.c	(revision 15366)
+++ /trunk/source/lisp-kernel/arm-gc.c	(revision 15367)
@@ -801,117 +801,119 @@
   int mark_method = 3;
 
-  if (GCDebug) {
-    check_refmap_consistency(p, p+(num_memo_dnodes << 1), refbits);
-  }
-
-  /* The distinction between "inbits" and "outbits" is supposed to help us
-     detect cases where "uninteresting" setfs have been memoized.  Storing
-     NIL, fixnums, immediates (characters, etc.) or node pointers to static
-     or readonly areas is definitely uninteresting, but other cases are
-     more complicated (and some of these cases are hard to detect.)
-
-     Some headers are "interesting", to the forwarder if not to us. 
-
-     */
-
-  /*
-    We need to ensure that there are no bits set at or beyond
-    "num_memo_dnodes" in the bitvector.  (This can happen as the EGC
-    tenures/untenures things.)  We find bits by grabbing a fullword at
-    a time and doing a cntlzw instruction; and don't want to have to
-    check for (< memo_dnode num_memo_dnodes) in the loop.
+  if (num_memo_dnodes) {
+    if (GCDebug) {
+      check_refmap_consistency(p, p+(num_memo_dnodes << 1), refbits);
+    }
+
+    /* The distinction between "inbits" and "outbits" is supposed to help us
+       detect cases where "uninteresting" setfs have been memoized.  Storing
+       NIL, fixnums, immediates (characters, etc.) or node pointers to static
+       or readonly areas is definitely uninteresting, but other cases are
+       more complicated (and some of these cases are hard to detect.)
+
+       Some headers are "interesting", to the forwarder if not to us. 
+
     */
 
-  {
-    natural 
-      bits_in_last_word = (num_memo_dnodes & bitmap_shift_count_mask),
-      index_of_last_word = (num_memo_dnodes >> bitmap_shift);
-
-    if (bits_in_last_word != 0) {
-      natural mask = ~((1L<<(nbits_in_word-bits_in_last_word))-1L);
-      refbits[index_of_last_word] &= mask;
-    }
-  }
+    /*
+      We need to ensure that there are no bits set at or beyond
+      "num_memo_dnodes" in the bitvector.  (This can happen as the EGC
+      tenures/untenures things.)  We find bits by grabbing a fullword at
+      a time and doing a cntlzw instruction; and don't want to have to
+      check for (< memo_dnode num_memo_dnodes) in the loop.
+    */
+
+    {
+      natural 
+        bits_in_last_word = (num_memo_dnodes & bitmap_shift_count_mask),
+        index_of_last_word = (num_memo_dnodes >> bitmap_shift);
+
+      if (bits_in_last_word != 0) {
+        natural mask = ~((1L<<(nbits_in_word-bits_in_last_word))-1L);
+        refbits[index_of_last_word] &= mask;
+      }
+    }
         
-  set_bitidx_vars(refbits, 0, bitsp, bits, bitidx);
-  inbits = outbits = bits;
-  while (memo_dnode < num_memo_dnodes) {
-    if (bits == 0) {
-      int remain = nbits_in_word - bitidx;
-      memo_dnode += remain;
-      p += (remain+remain);
-      if (outbits != inbits) {
-        *bitsp = outbits;
-      }
-      bits = *++bitsp;
-      inbits = outbits = bits;
-      bitidx = 0;
-    } else {
-      nextbit = count_leading_zeros(bits);
-      if ((diff = (nextbit - bitidx)) != 0) {
-        memo_dnode += diff;
-        bitidx = nextbit;
-        p += (diff+diff);
-      }
-      x1 = *p++;
-      x2 = *p++;
-      bits &= ~(BIT0_MASK >> bitidx);
-
-      if (hashp) {
-        Boolean force_x1 = false;
-        if ((memo_dnode >= hash_dnode_limit) && (mark_method == 3)) {
-          /* if vector_header_count is odd, x1 might be the last word of the header */
-          force_x1 = (hash_table_vector_header_count & 1) && (memo_dnode == hash_dnode_limit);
-          /* was marking header, switch to data */
-          hash_dnode_limit = area_dnode(((LispObj *)hashp)
-                                        + 1
-                                        + header_element_count(hashp->header),
-                                        a->low);
-          /* In traditional weak method, don't mark vector entries at all. */
-          /* Otherwise mark the non-weak elements only */
-          mark_method = ((lisp_global(WEAK_GC_METHOD) == 0) ? 0 :
-                         ((hashp->flags & nhash_weak_value_mask)
-                          ? (1 + (hash_table_vector_header_count & 1))
-                          : (2 - (hash_table_vector_header_count & 1))));
-        }
-
-        if (memo_dnode < hash_dnode_limit) {
-          /* perhaps ignore one or both of the elements */
-          if (!force_x1 && !(mark_method & 1)) x1 = 0;
-          if (!(mark_method & 2)) x2 = 0;
-        } else {
-          hashp = NULL;
-        }
-      }
-
-      if (header_subtag(x1) == subtag_hash_vector) {
-        if (hashp) Bug(NULL, "header inside hash vector?");
-        hash_table_vector_header *hp = (hash_table_vector_header *)(p - 2);
-        if (hp->flags & nhash_weak_mask) {
-          /* Workaround for ticket:817 */
-          if (!(hp->flags & nhash_weak_value_mask)) {
-            /* If header_count is odd, this cuts off the last header field */
-            /* That case is handled specially above */
-            hash_dnode_limit = memo_dnode + ((hash_table_vector_header_count) >>1);
-            hashp = hp;
-            mark_method = 3;
+    set_bitidx_vars(refbits, 0, bitsp, bits, bitidx);
+    inbits = outbits = bits;
+    while (memo_dnode < num_memo_dnodes) {
+      if (bits == 0) {
+        int remain = nbits_in_word - bitidx;
+        memo_dnode += remain;
+        p += (remain+remain);
+        if (outbits != inbits) {
+          *bitsp = outbits;
+        }
+        bits = *++bitsp;
+        inbits = outbits = bits;
+        bitidx = 0;
+      } else {
+        nextbit = count_leading_zeros(bits);
+        if ((diff = (nextbit - bitidx)) != 0) {
+          memo_dnode += diff;
+          bitidx = nextbit;
+          p += (diff+diff);
+        }
+        x1 = *p++;
+        x2 = *p++;
+        bits &= ~(BIT0_MASK >> bitidx);
+
+        if (hashp) {
+          Boolean force_x1 = false;
+          if ((memo_dnode >= hash_dnode_limit) && (mark_method == 3)) {
+            /* if vector_header_count is odd, x1 might be the last word of the header */
+            force_x1 = (hash_table_vector_header_count & 1) && (memo_dnode == hash_dnode_limit);
+            /* was marking header, switch to data */
+            hash_dnode_limit = area_dnode(((LispObj *)hashp)
+                                          + 1
+                                          + header_element_count(hashp->header),
+                                          a->low);
+            /* In traditional weak method, don't mark vector entries at all. */
+            /* Otherwise mark the non-weak elements only */
+            mark_method = ((lisp_global(WEAK_GC_METHOD) == 0) ? 0 :
+                           ((hashp->flags & nhash_weak_value_mask)
+                            ? (1 + (hash_table_vector_header_count & 1))
+                            : (2 - (hash_table_vector_header_count & 1))));
           }
-        }
-      }
-
-      keep_x1 = mark_ephemeral_root(x1);
-      keep_x2 = mark_ephemeral_root(x2);
-      if ((keep_x1 == false) && 
-          (keep_x2 == false) &&
-          (hashp == NULL)) {
-        outbits &= ~(BIT0_MASK >> bitidx);
-      }
-      memo_dnode++;
-      bitidx++;
-    }
-  }
-  if (GCDebug) {
-    p = (LispObj *) a->low;
-    check_refmap_consistency(p, p+(num_memo_dnodes << 1), refbits);
+
+          if (memo_dnode < hash_dnode_limit) {
+            /* perhaps ignore one or both of the elements */
+            if (!force_x1 && !(mark_method & 1)) x1 = 0;
+            if (!(mark_method & 2)) x2 = 0;
+          } else {
+            hashp = NULL;
+          }
+        }
+
+        if (header_subtag(x1) == subtag_hash_vector) {
+          if (hashp) Bug(NULL, "header inside hash vector?");
+          hash_table_vector_header *hp = (hash_table_vector_header *)(p - 2);
+          if (hp->flags & nhash_weak_mask) {
+            /* Workaround for ticket:817 */
+            if (!(hp->flags & nhash_weak_value_mask)) {
+              /* If header_count is odd, this cuts off the last header field */
+              /* That case is handled specially above */
+              hash_dnode_limit = memo_dnode + ((hash_table_vector_header_count) >>1);
+              hashp = hp;
+              mark_method = 3;
+            }
+          }
+        }
+
+        keep_x1 = mark_ephemeral_root(x1);
+        keep_x2 = mark_ephemeral_root(x2);
+        if ((keep_x1 == false) && 
+            (keep_x2 == false) &&
+            (hashp == NULL)) {
+          outbits &= ~(BIT0_MASK >> bitidx);
+        }
+        memo_dnode++;
+        bitidx++;
+      }
+    }
+    if (GCDebug) {
+      p = (LispObj *) a->low;
+      check_refmap_consistency(p, p+(num_memo_dnodes << 1), refbits);
+    }
   }
 }
Index: /trunk/source/lisp-kernel/arm-spentry.s
===================================================================
--- /trunk/source/lisp-kernel/arm-spentry.s	(revision 15366)
+++ /trunk/source/lisp-kernel/arm-spentry.s	(revision 15367)
@@ -197,4 +197,5 @@
         __(ldmia vsp!,{arg_z,arg_y})
         __(bne 0b)
+        __(mov arg_z,#nil_value)
         __(bx lr)
 3:      __(cmp imm0,#subtag_bignum)
@@ -3185,4 +3186,5 @@
         __(mov r0,sp)
         __(sub sp,sp,#2*node_size) /* room for result */
+        __(fstmdbd sp!,{d0-d7})
         __(stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr})
         __(mov r4,r0)
@@ -3229,4 +3231,6 @@
         __(ldr sp,[sp,#node_size*2])   /* drop the ivector that hides foreign stack contents and restore (possibly misaligned) sp */
         __(ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr})
+        __(add sp,sp,#8*8)
+        __(fldd d0,[sp,#0])
         __(ldmia sp!,{r0,r1})
         __(add sp,sp,#4*node_size)
