Raymond Toy pushed to branch master at cmucl / cmucl

Commits:

2 changed files:

Changes:

  • src/bootfiles/21d/boot-2020-04-1.lisp
    ... ... @@ -10,3 +10,8 @@
    10 10
     ;; x86: cross-x86-x86
    
    11 11
     ;; sparc: cross-sparc-sparc
    
    12 12
     
    
    13
    +;; This is also used to easily change the order of x86::conditions
    
    14
    +;; constant so that we prefer je instead of jeq.  Without a
    
    15
    +;; cross-compile we'd need to handle the refefintion of the
    
    16
    +;; defconstant in a different way.  See issue #95.
    
    17
    +

  • src/compiler/x86/insts.lisp
    ... ... @@ -255,12 +255,15 @@
    255 255
            (= (tn-offset thing) 0)))
    
    256 256
     
    
    257 257
     (eval-when (compile load eval)
    
    258
    +;; If a line has more than one value, then these are all synonyms, but
    
    259
    +;; the first one is the one that is preferred when printing the
    
    260
    +;; condition code out.
    
    258 261
     (defconstant conditions
    
    259 262
       '((:o . 0)
    
    260 263
         (:no . 1)
    
    261 264
         (:b . 2) (:nae . 2) (:c . 2)
    
    262 265
         (:nb . 3) (:ae . 3) (:nc . 3)
    
    263
    -    (:eq . 4) (:e . 4) (:z . 4)
    
    266
    +    (:e . 4) (:eq . 4) (:z . 4)
    
    264 267
         (:ne . 5) (:nz . 5)
    
    265 268
         (:be . 6) (:na . 6)
    
    266 269
         (:nbe . 7) (:a . 7)
    
    ... ... @@ -794,7 +797,7 @@
    794 797
       (op      :field (byte 7 1))
    
    795 798
       (width   :field (byte 1 0)	:type 'width)
    
    796 799
       (reg/mem :fields (list (byte 2 14) (byte 3 8))
    
    797
    -	   			:type 'reg/mem)
    
    800
    +	   			:type 'sized-reg/mem)
    
    798 801
       (reg     :field (byte 3 11)	:type 'reg)
    
    799 802
       ;; optional fields
    
    800 803
       (imm))
    
    ... ... @@ -832,7 +835,10 @@
    832 835
     (disassem:define-instruction-format
    
    833 836
         (accum-reg/mem 16
    
    834 837
          :include 'reg/mem :default-printer '(:name :tab accum ", " reg/mem))
    
    835
    -  (reg/mem :type 'reg/mem)		; don't need a size
    
    838
    +  ;; This format uses the accumulator, so the size is known; therefore
    
    839
    +  ;; we don't really need to print out the memory size, but let's do
    
    840
    +  ;; it for consistency.
    
    841
    +  (reg/mem :type 'sized-reg/mem)
    
    836 842
       (accum :type 'accum))
    
    837 843
     
    
    838 844
     ;;; Same as reg-reg/mem, but with a prefix of #b00001111
    
    ... ... @@ -843,7 +849,7 @@
    843 849
       (op      :field (byte 7 9))
    
    844 850
       (width   :field (byte 1 8)	:type 'width)
    
    845 851
       (reg/mem :fields (list (byte 2 22) (byte 3 16))
    
    846
    -	   			:type 'reg/mem)
    
    852
    +	   			:type 'sized-reg/mem)
    
    847 853
       (reg     :field (byte 3 19)	:type 'reg)
    
    848 854
       ;; optional fields
    
    849 855
       (imm))
    
    ... ... @@ -865,7 +871,7 @@
    865 871
       (prefix  :field (byte 8 0)  :value #b00001111)
    
    866 872
       (op      :field (byte 8 8))
    
    867 873
       (reg/mem :fields (list (byte 2 22) (byte 3 16))
    
    868
    -	                      :type 'reg/mem)
    
    874
    +	                      :type 'sized-reg/mem)
    
    869 875
       (reg     :field (byte 3 19) :type 'reg)
    
    870 876
       ;; optional fields
    
    871 877
       (imm))
    
    ... ... @@ -1129,7 +1135,8 @@
    1129 1135
     	      (error "Bogus args to XCHG: ~S ~S" operand1 operand2)))))))
    
    1130 1136
     
    
    1131 1137
     (define-instruction lea (segment dst src)
    
    1132
    -  (:printer reg-reg/mem ((op #b1000110) (width 1)))
    
    1138
    +  ;; Don't need to print out the width for the LEA instruction
    
    1139
    +  (:printer reg-reg/mem ((op #b1000110) (width 1) (reg/mem nil :type 'reg/mem)))
    
    1133 1140
       (:emitter
    
    1134 1141
        (assert (dword-reg-p dst))
    
    1135 1142
        (emit-byte segment #b10001101)
    
    ... ... @@ -2112,6 +2119,7 @@
    2112 2119
            (nt "Function end breakpoint trap"))
    
    2113 2120
         )))
    
    2114 2121
     
    
    2122
    +;; This is really the int3 instruction.
    
    2115 2123
     (define-instruction break (segment code)
    
    2116 2124
       (:declare (type (unsigned-byte 8) code))
    
    2117 2125
       (:printer byte-imm ((op #b11001100)) '(:name :tab code)