X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86%2Finsts.lisp;h=4edb1a433ba372ec9e8314acb2ea9bdfe2bb7394;hb=8c564b785ae1dab0f1e04331f47638dde625372b;hp=6ed33adc076b70e590c3ac17b00333112ffccdc6;hpb=2230ea0c1765a95fd2aa0a8996b3555b93ba3745;p=sbcl.git diff --git a/src/compiler/x86/insts.lisp b/src/compiler/x86/insts.lisp index 6ed33ad..4edb1a4 100644 --- a/src/compiler/x86/insts.lisp +++ b/src/compiler/x86/insts.lisp @@ -608,6 +608,13 @@ ;; optional fields (imm)) +;;; reg-no-width with #x0f prefix +(sb!disassem:define-instruction-format (ext-reg-no-width 16 + :default-printer '(:name :tab reg)) + (prefix :field (byte 8 0) :value #b00001111) + (op :field (byte 5 11)) + (reg :field (byte 3 8) :type 'reg)) + ;;; Same as reg/mem, but with a prefix of #b00001111 (sb!disassem:define-instruction-format (ext-reg/mem 24 :default-printer '(:name :tab reg/mem)) @@ -1593,6 +1600,12 @@ (emit-byte segment #b11010100) (emit-byte segment #b00001010))) +(define-instruction bswap (segment dst) + (:printer ext-reg-no-width ((op #b11001))) + (:emitter + (emit-byte segment #x0f) + (emit-byte-with-reg segment #b11001 (reg-tn-encoding dst)))) + ;;; CBW -- Convert Byte to Word. AX <- sign_xtnd(AL) (define-instruction cbw (segment) (:printer two-bytes ((op '(#b01100110 #b10011000)))) @@ -2642,9 +2655,8 @@ (define-instruction fxch (segment source) (:printer floating-point-fp ((op '(#b001 #b001)))) (:emitter - (unless (and (tn-p source) - (eq (sb-name (sc-sb (tn-sc source))) 'float-registers)) - (cl:break)) + (aver (and (tn-p source) + (eq (sb-name (sc-sb (tn-sc source))) 'float-registers))) (emit-byte segment #b11011001) (emit-fp-op segment source #b001)))