Skip to content
Snippets Groups Projects
Commit b7380bd5 authored by ch's avatar ch
Browse files

Fixed printing of MOVE pseudo-instruction.

Added ugly hack to print out a comment when loading symbol constants.
parent 176aaff9
No related branches found
No related tags found
No related merge requests found
;;; -*- Mode: Lisp; Package: MIPS -*- ;;; -*- Mode: Lisp; Package: MIPS -*-
;;; ;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/pmax-disassem.lisp,v 1.7 1990/02/18 05:26:48 wlott Exp $ ;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/pmax-disassem.lisp,v 1.8 1990/02/18 06:23:22 ch Exp $
;;; ;;;
;;; A simple dissambler for the MIPS R2000. ;;; A simple dissambler for the MIPS R2000.
;;; ;;;
...@@ -124,6 +124,13 @@ ...@@ -124,6 +124,13 @@
(cond ((and (zerop rs) (or (string= name "ADDI") (string= name "ADDIU"))) (cond ((and (zerop rs) (or (string= name "ADDI") (string= name "ADDIU")))
(format stream "~16,8TLOADI~8,8T~A, #x~X~%" (format stream "~16,8TLOADI~8,8T~A, #x~X~%"
(register-name rt) immed)) (register-name rt) immed))
;; I'm not proud of this ...
((and (= rs c::null-offset) (string= name "ADDI")
(eq register-name-style :lisp))
(format stream "~16,8T~A~8,8T~A, ~A, #x~X~48,8T; ~S~%"
name (register-name rt) (register-name rs) immed
(nth (1- (floor immed vm:symbol-size))
vm:initial-symbols)))
(t (t
(format stream "~16,8T~A~8,8T~A, ~A, #x~X~%" (format stream "~16,8T~A~8,8T~A, ~A, #x~X~%"
name (register-name rt) (register-name rs) immed))))) name (register-name rt) (register-name rs) immed)))))
...@@ -185,7 +192,7 @@ ...@@ -185,7 +192,7 @@
(cond ((zerop rd) (cond ((zerop rd)
;; Hack for NOP ;; Hack for NOP
(format stream "~16,8TNOP~%")) (format stream "~16,8TNOP~%"))
((and (zerop rt) (or (string= name "OR") (string= name "ANDU"))) ((and (zerop rt) (or (string= name "OR") (string= name "ADDU")))
;; Hack for MOVE ;; Hack for MOVE
(format stream "~16,8TMOVE~8,8T~A, ~A~%" (format stream "~16,8TMOVE~8,8T~A, ~A~%"
(register-name rd) (register-name rs))) (register-name rd) (register-name rs)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment