mips: Revert remaining badness from 0.9.1.45.
authorAlastair Bridgewater <nyef@kana.lisphacker.com>
Sat, 9 Jun 2012 15:50:49 +0000 (11:50 -0400)
committerAlastair Bridgewater <nyef@kana.lisphacker.com>
Fri, 9 Nov 2012 00:29:07 +0000 (19:29 -0500)
  * There were two pieces of badness in 0.9.1.45, both to do with
the call_into_lisp LRA handling, and each compensated for the other
to a limited extent.  One change (since reverted) was to decrease
the alignment requirement on positioning the LRA header, allowing
it to be placed on a non-doubleword boundary.  The second change
(being reverted here) was to change the LRA address calculation to
subtract the entry point offset from the address of the header
instead of adding OTHER_POINTER_LOWTAG.  If the header wound up on
a doubleword boundary (the correct alignment) then the LRA computed
would have LIST_POINTER_LOWTAG, leading to badness when doing a
backtrace.  In any event, typechecking the resulting LRA would
fail, and actually attempting to return to it would also fail.

  * Revert to computing the LRA by adding OTHER_POINTER_LOWTAG to
the address of the header, bringing MIPS inline with all of the
other RETURN-PC-HEADER (LRA) using backends.

src/runtime/mips-assem.S

index 4eabf21..1982ee8 100644 (file)
@@ -19,7 +19,6 @@
 #include "genesis/fdefn.h"
 #include "genesis/closure.h"
 #include "genesis/funcallable-instance.h"
-#include "genesis/return-pc.h"
 #include "genesis/simple-fun.h"
 #include "genesis/static-symbols.h"
                
@@ -166,7 +165,7 @@ symbol:
        lw      reg_A5, 20(reg_CFP)
 
        /* Calculate LRA */
-       la      reg_LRA, lra - RETURN_PC_RETURN_POINT_OFFSET
+       la      reg_LRA, lra + OTHER_POINTER_LOWTAG
 
        /* Indirect closure */
        lw      reg_CODE, CLOSURE_FUN_OFFSET(reg_LEXENV)