X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86-64%2Finsts.lisp;h=fef01fe38390aa6bfa5b1e4873a8ea88838f6dad;hb=33a45339444f8418c8c537c43d59fc3d5ea3098b;hp=28ac79498435ba1265c5a68bc541139f24da9841;hpb=2230ea0c1765a95fd2aa0a8996b3555b93ba3745;p=sbcl.git diff --git a/src/compiler/x86-64/insts.lisp b/src/compiler/x86-64/insts.lisp index 28ac794..fef01fe 100644 --- a/src/compiler/x86-64/insts.lisp +++ b/src/compiler/x86-64/insts.lisp @@ -1124,7 +1124,8 @@ (sb!disassem:define-instruction-format (xmm-xmm/mem-imm 24 :default-printer - '(:name :tab reg ", " reg/mem " " imm)) + '(:name + :tab reg ", " reg/mem ", " imm)) (x0f :field (byte 8 0) :value #x0f) (op :field (byte 8 8)) (reg/mem :fields (list (byte 2 22) (byte 3 16)) @@ -1134,7 +1135,8 @@ (sb!disassem:define-instruction-format (rex-xmm-xmm/mem-imm 32 :default-printer - '(:name :tab reg ", " reg/mem " " imm)) + '(:name + :tab reg ", " reg/mem ", " imm)) (rex :field (byte 4 4) :value #b0100) (wrxb :field (byte 4 0) :type 'wrxb) (x0f :field (byte 8 8) :value #x0f) @@ -1146,7 +1148,8 @@ (sb!disassem:define-instruction-format (ext-xmm-xmm/mem-imm 32 :default-printer - '(:name :tab reg ", " reg/mem " " imm)) + '(:name + :tab reg ", " reg/mem ", " imm)) (prefix :field (byte 8 0)) (x0f :field (byte 8 8) :value #x0f) (op :field (byte 8 16)) @@ -1157,7 +1160,8 @@ (sb!disassem:define-instruction-format (ext-rex-xmm-xmm/mem-imm 40 :default-printer - '(:name :tab reg ", " reg/mem " " imm)) + '(:name + :tab reg ", " reg/mem ", " imm)) (prefix :field (byte 8 0)) (rex :field (byte 4 12) :value #b0100) (wrxb :field (byte 4 8) :type 'wrxb) @@ -1880,7 +1884,7 @@ (cond (ea-p (ea-base src)) ((tn-p src) src) (t nil))) - (emit-byte segment #x63) ;movsxd + (emit-byte segment (if signed-p #x63 #x8b)) ;movsxd or straight mov ;;(emit-byte segment opcode) (emit-ea segment src (reg-tn-encoding dst))))))))) @@ -2900,13 +2904,13 @@ (defun break-control (chunk inst stream dstate) (declare (ignore inst)) (flet ((nt (x) (if stream (sb!disassem:note x dstate)))) - ;; FIXME: Make sure that BYTE-IMM-CODE is defined. The genesis - ;; map has it undefined; and it should be easier to look in the target - ;; Lisp (with (DESCRIBE 'BYTE-IMM-CODE)) than to definitively deduce - ;; from first principles whether it's defined in some way that genesis - ;; can't grok. - (case #!-darwin (byte-imm-code chunk dstate) - #!+darwin (word-imm-code chunk dstate) + ;; XXX: {BYTE,WORD}-IMM-CODE below is a macro defined by the + ;; DEFINE-INSTRUCTION-FORMAT for {BYTE,WORD}-IMM above. Due to + ;; the spectacular design for DEFINE-INSTRUCTION-FORMAT (involving + ;; a call to EVAL in order to define the macros at compile-time + ;; only) they do not even show up as symbols in the target core. + (case #!-ud2-breakpoints (byte-imm-code chunk dstate) + #!+ud2-breakpoints (word-imm-code chunk dstate) (#.error-trap (nt "error trap") (sb!disassem:handle-break-args #'snarf-error-junk stream dstate)) @@ -2928,17 +2932,17 @@ (define-instruction break (segment code) (:declare (type (unsigned-byte 8) code)) - #!-darwin (:printer byte-imm ((op #b11001100)) '(:name :tab code) - :control #'break-control) - #!+darwin (:printer word-imm ((op #b0000101100001111)) '(:name :tab code) - :control #'break-control) + #!-ud2-breakpoints (:printer byte-imm ((op #b11001100)) '(:name :tab code) + :control #'break-control) + #!+ud2-breakpoints (:printer word-imm ((op #b0000101100001111)) '(:name :tab code) + :control #'break-control) (:emitter - #!-darwin (emit-byte segment #b11001100) + #!-ud2-breakpoints (emit-byte segment #b11001100) ;; On darwin, trap handling via SIGTRAP is unreliable, therefore we ;; throw a sigill with 0x0b0f instead and check for this in the ;; SIGILL handler and pass it on to the sigtrap handler if ;; appropriate - #!+darwin (emit-word segment #b0000101100001111) + #!+ud2-breakpoints (emit-word segment #b0000101100001111) (emit-byte segment code))) (define-instruction int (segment number)