From 9d1f8d1ef898dfaaaf71fe7cb28a08c53ea73779 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Tue, 29 Sep 2009 01:24:23 +0000 Subject: [PATCH] 1.0.31.24: add BSWAP instruction for x86 Kinda weird, lifting code for x86 from x86-64... --- src/compiler/x86/insts.lisp | 13 +++++++++++++ version.lisp-expr | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/compiler/x86/insts.lisp b/src/compiler/x86/insts.lisp index 2479299..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)))) diff --git a/version.lisp-expr b/version.lisp-expr index 4a273fc..25ce88e 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.31.23" +"1.0.31.24" -- 1.7.10.4