[Git][cmucl/cmucl][sparc64-dev] Fix error in printing NOT-IMPLEMENTED

Raymond Toy rtoy at common-lisp.net
Tue Jan 2 18:46:53 UTC 2018


Raymond Toy pushed to branch sparc64-dev at cmucl / cmucl


Commits:
608fadde by Raymond Toy at 2018-01-02T10:46:13-08:00
Fix error in printing NOT-IMPLEMENTED

The computed max string length was off by 4 because instruction
displacement is relative to the address of the branch instruction.
Need to subtract 2, one for the instruction itself and one for the
delay slot.

- - - - -


1 changed file:

- src/lisp/sparc-arch.c


Changes:

=====================================
src/lisp/sparc-arch.c
=====================================
--- a/src/lisp/sparc-arch.c
+++ b/src/lisp/sparc-arch.c
@@ -531,10 +531,10 @@ sigill_handler(HANDLER_ARGS)
               string = (unsigned char *) &pc[3];
               /*
                * The offset is in 32-bit words, so subtract one for
-               * the instruction in the branch delay slot and scale up
-               * the offet to be in bytes.
+               * the instruction itself and one for the branch delay
+               * slot and scale up the offet to be in bytes.
                */
-              length = 4 * ((pc[1] & 0x7FFFF) - 1);
+              length = 4 * ((pc[1] & 0x7FFFF) - 2);
 
               while (string[length - 1] == '\0') {
                   --length;



View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/608fadde188e963541d6f44e42d17861f067a77f

---
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/608fadde188e963541d6f44e42d17861f067a77f
You're receiving this email because of your account on gitlab.common-lisp.net.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20180102/89bc000a/attachment.html>


More information about the cmucl-cvs mailing list