[Git][cmucl/cmucl][sparc64-dev] Adjust offset computation for lisp-return
Raymond Toy pushed to branch sparc64-dev at cmucl / cmucl Commits: 47d140f4 by Raymond Toy at 2018-01-03T10:53:22-08:00 Adjust offset computation for lisp-return The offset is the number of instructions to skip over, so the multiplier should be 4 not word-bytes (8). And the LRA header word is 8 bytes long, so we need to skip over that to get to the correct instruction. I think. - - - - - 1 changed file: - src/compiler/sparc64/macros.lisp Changes: ===================================== src/compiler/sparc64/macros.lisp ===================================== --- a/src/compiler/sparc64/macros.lisp +++ b/src/compiler/sparc64/macros.lisp @@ -133,8 +133,10 @@ (defmacro lisp-return (return-pc &key (offset 0) (frob-code t)) "Return to RETURN-PC." `(progn + ;; 8 to skip over the lra object, and 4*offset to get to the + ;; right instruction since each instruction is 4 bytes long. (inst j ,return-pc - (- (* (1+ ,offset) word-bytes) other-pointer-type)) + (- (+ 8 (* ,offset 4)) other-pointer-type)) ,(if frob-code `(move code-tn ,return-pc) '(inst nop)))) View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/47d140f4b307a9b3f60822df6e... --- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/47d140f4b307a9b3f60822df6e... You're receiving this email because of your account on gitlab.common-lisp.net.
participants (1)
-
Raymond Toy