Skip to content
Snippets Groups Projects
Commit b43bde5a authored by dtc's avatar dtc
Browse files

Add the XADD instruction.

parent 53f0ecbe
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/insts.lisp,v 1.9 1997/09/29 04:47:04 dtc Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/insts.lisp,v 1.10 1997/09/29 16:51:18 dtc Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -1375,6 +1375,17 @@
(maybe-emit-operand-size-prefix segment :dword)
(emit-byte segment #b10011001)))
(define-instruction xadd (segment dst src)
;; Register/Memory with Register.
(:printer ext-reg-reg/mem ((op #b1100000)) '(:name :tab reg/mem ", " reg))
(:emitter
(assert (register-p src))
(let ((size (matching-operand-size src dst)))
(maybe-emit-operand-size-prefix segment size)
(emit-byte segment #b00001111)
(emit-byte segment (if (eq size :byte) #b11000000 #b11000001))
(emit-ea segment dst (reg-tn-encoding src)))))
;;;; Logic.
......
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