Raymond Toy pushed to branch master at cmucl / cmucl
Commits: 0cbb2264 by Raymond Toy at 2024-04-10T03:10:16+00:00 Fix #296: Fix disassembly of MOVD instruction
- - - - - df78595e by Raymond Toy at 2024-04-10T03:10:20+00:00 Merge branch 'issue-296-fix-movd-disassembly' into 'master'
Fix #296: Fix disassembly of MOVD instruction
Closes #296 and #300
See merge request cmucl/cmucl!207 - - - - -
1 changed file:
- src/compiler/x86/insts.lisp
Changes:
===================================== src/compiler/x86/insts.lisp ===================================== @@ -509,6 +509,14 @@ (print-byte-reg value stream dstate) (print-mem-access value stream t dstate)))
+(defun print-word-reg/mem (value stream dstate) + (declare (type (or list reg) value) + (type stream stream) + (type disassem:disassem-state dstate)) + (if (typep value 'reg) + (print-word-reg value stream dstate) + (print-mem-access value stream nil dstate))) + (defun print-label (value stream dstate) (declare (ignore dstate)) (princ (if (and (numberp value) (minusp value)) @@ -716,7 +724,11 @@ (disassem:define-argument-type byte-reg/mem :prefilter #'prefilter-reg/mem :printer #'print-byte-reg/mem) - +(disassem:define-argument-type word-reg/mem + ;; Like reg/mem but if the reg/mem field is a register, it's a word + ;; register. + :prefilter #'prefilter-reg/mem + :printer #'print-word-reg/mem) ;;; ;;; added by jrd ;;; @@ -3478,7 +3490,7 @@ ;;; We do not support the MMX version of this instruction. (define-instruction movd (segment dst src) (:printer ext-xmm-reg/mem ((prefix #x66) (op #x6e))) - (:printer ext-xmm-reg/mem ((prefix #x66) (op #x7e)) + (:printer ext-xmm-reg/mem ((prefix #x66) (op #x7e) (reg/mem nil :type 'word-reg/mem)) '(:name :tab reg/mem ", " reg)) (:emitter (cond ((xmm-register-p dst)
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/d9983ea57162a21367d9ffa...