From rtoy at common-lisp.net Sat Feb 4 05:04:33 2017 From: rtoy at common-lisp.net (Raymond Toy) Date: Sat, 04 Feb 2017 05:04:33 +0000 Subject: [Git][cmucl/cmucl][sparc64-dev] Skip the inst in the branch delay slot Message-ID: <589560e22613e_62543fa4252dbc80241c7@lisp.not.org.mail> Raymond Toy pushed to branch sparc64-dev at cmucl / cmucl Commits: 7dd0a074 by Raymond Toy at 2017-02-03T21:04:10-08:00 Skip the inst in the branch delay slot When snarfing the not-implemented trap, we need to skip over the instruction in the branch delay slot too, to get to the desired string. - - - - - 1 changed file: - src/compiler/sparc64/insts.lisp Changes: ===================================== src/compiler/sparc64/insts.lisp ===================================== --- a/src/compiler/sparc64/insts.lisp +++ b/src/compiler/sparc64/insts.lisp @@ -1547,8 +1547,8 @@ about function addresses and register values.") ;; From the offset in the branch instruction, compute the max ;; length of the string that was encoded. (let ((max-length (+ (ash (ldb (byte 24 0) branch-inst) 2) 4))) - ;; Skip the branch instruction - (incf offset 4) + ;; Skip the branch instruction and the delay slot + (incf offset 8) ;; Print each following byte until max-length is reached or we ;; get a 0 byte. (with-output-to-string (s) View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/7dd0a074a3f9ca65a8b33f76bb925a61f9d7ae7f -------------- next part -------------- An HTML attachment was scrubbed... URL: From rtoy at common-lisp.net Sat Feb 4 05:50:10 2017 From: rtoy at common-lisp.net (Raymond Toy) Date: Sat, 04 Feb 2017 05:50:10 +0000 Subject: [Git][cmucl/cmucl][sparc64-dev] 2 commits: Turn off scheduler and disable some disassem notes Message-ID: <58956b941567a_62543fa4252ee4d42443@lisp.not.org.mail> Raymond Toy pushed to branch sparc64-dev at cmucl / cmucl Commits: 9b3fc084 by Raymond Toy at 2017-02-03T21:12:41-08:00 Turn off scheduler and disable some disassem notes Don't want the instruction scheduler running while we're still trying to bootstrap. And disable some disassem notes because they don't currently work. (Probably something simple, but we don't need them at this stage.) - - - - - e389c543 by Raymond Toy at 2017-02-03T21:49:53-08:00 Fix snarf-error-junk Use a simple explicit loop to copy the error bytes into the vector. copy-from-system-area is currently broken, and we only need this for disassembly so we cares if it's slower? This fix allows dumping a trace file from cross-compilation. Tested by dumping a trace file for lispinit.lisp. - - - - - 1 changed file: - src/compiler/sparc64/insts.lisp Changes: ===================================== src/compiler/sparc64/insts.lisp ===================================== --- a/src/compiler/sparc64/insts.lisp +++ b/src/compiler/sparc64/insts.lisp @@ -21,7 +21,7 @@ (use-package "C") (def-assembler-params - :scheduler-p t + :scheduler-p nil :max-locations 101) @@ -395,6 +395,7 @@ about function addresses and register values.") 'registers regname dstate) + #+nil (maybe-add-notes value dstate))) ) ; eval-when @@ -1273,6 +1274,7 @@ about function addresses and register values.") ;; Save the immediate value and the destination register from this ;; sethi instruction. This is used later to print some possible ;; notes about the value loaded by sethi. + #+nil (let* ((word (disassem::sap-ref-int (disassem:dstate-segment-sap dstate) (disassem:dstate-cur-offs dstate) vm:word-bytes @@ -1513,10 +1515,18 @@ about function addresses and register values.") (cond (length-only (values 0 (1+ length) nil nil)) (t - (kernel:copy-from-system-area sap (* sparc:byte-bits (1+ offset)) - vector (* sparc:word-bits - sparc:vector-data-offset) + #+nil + (kernel:copy-from-system-area sap + (* sparc:byte-bits (1+ offset)) + vector + (* sparc:word-bits + sparc:vector-data-offset) (* length sparc:byte-bits)) + (dotimes (k length) + (setf (aref vector k) + (sys:sap-ref-8 sap (+ offset 1 k)))) + #+nil + (format *debug-io* "vector = ~A~%" vector) (collect ((sc-offsets) (lengths)) (lengths 1) ; the length byte View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/compare/7dd0a074a3f9ca65a8b33f76bb925a61f9d7ae7f...e389c543fd95934887edab5a840b0f178b027c54 -------------- next part -------------- An HTML attachment was scrubbed... URL: