Raymond Toy pushed to branch master at cmucl / cmucl

Commits:

3 changed files:

Changes:

  • .gitlab-ci.yml
    1 1
     variables:
    
    2 2
       download_url: "https://common-lisp.net/project/cmucl/downloads/snapshots/2021/07"
    
    3 3
       version: "2021-07-x86"
    
    4
    -  bootstrap: "-B boot-2021-07-1"
    
    4
    +  bootstrap: "-B boot-2021-07-1 -B boot-2021-07-2"
    
    5 5
     
    
    6 6
     stages:
    
    7 7
       - install
    

  • src/bootfiles/21d/boot-2021-07-2.lisp
    1
    +;; Bootstrap file for x86 to choose the non-negated forms of the
    
    2
    +;; condition flag for conditional jumps.
    
    3
    +;;
    
    4
    +;; Use bin/build.sh -B boot-2021-07-2 to build this.
    
    5
    +
    
    6
    +(in-package :x86)
    
    7
    +
    
    8
    +(ext:without-package-locks
    
    9
    +  (handler-bind
    
    10
    +      ((error
    
    11
    +	 (lambda (c)
    
    12
    +	   (declare (ignore c))
    
    13
    +	   (invoke-restart 'continue))))
    
    14
    +    (defconstant conditions
    
    15
    +      '((:o . 0)
    
    16
    +	(:no . 1)
    
    17
    +	(:b . 2) (:nae . 2) (:c . 2)
    
    18
    +	(:ae . 3) (:nb . 3) (:nc . 3)
    
    19
    +	(:e . 4) (:eq . 4) (:z . 4)
    
    20
    +	(:ne . 5) (:nz . 5)
    
    21
    +	(:be . 6) (:na . 6)
    
    22
    +	(:a . 7) (:nbe . 7)
    
    23
    +	(:s . 8)
    
    24
    +	(:ns . 9)
    
    25
    +	(:p . 10) (:pe . 10)
    
    26
    +	(:np . 11) (:po . 11)
    
    27
    +	(:l . 12) (:nge . 12)
    
    28
    +	(:ge . 13) (:nl . 13)
    
    29
    +	(:le . 14) (:ng . 14)
    
    30
    +	(:g . 15) (:nle . 15)))))

  • src/compiler/x86/insts.lisp
    ... ... @@ -259,22 +259,39 @@
    259 259
     ;; the first one is the one that is preferred when printing the
    
    260 260
     ;; condition code out.
    
    261 261
     (defconstant conditions
    
    262
    -  '((:o . 0)
    
    262
    +  '(
    
    263
    +    ;; OF = 1
    
    264
    +    (:o . 0)
    
    265
    +    ;; OF = 0
    
    263 266
         (:no . 1)
    
    267
    +    ;; Unsigned <; CF = 1
    
    264 268
         (:b . 2) (:nae . 2) (:c . 2)
    
    265
    -    (:nb . 3) (:ae . 3) (:nc . 3)
    
    269
    +    ;; Unsigned >=; CF = 0
    
    270
    +    (:ae . 3) (:nb . 3) (:nc . 3)
    
    271
    +    ;; Equal; ZF = 1
    
    266 272
         (:e . 4) (:eq . 4) (:z . 4)
    
    273
    +    ;; Not equal; ZF = 0
    
    267 274
         (:ne . 5) (:nz . 5)
    
    275
    +    ;; Unsigned <=; CF = 1 or ZF = 1
    
    268 276
         (:be . 6) (:na . 6)
    
    269
    -    (:nbe . 7) (:a . 7)
    
    277
    +    ;; Unsigned >; CF = 1 and ZF = 0
    
    278
    +    (:a . 7) (:nbe . 7)
    
    279
    +    ;; SF = 1
    
    270 280
         (:s . 8)
    
    281
    +    ;; SF = 0
    
    271 282
         (:ns . 9)
    
    283
    +    ;; Parity even
    
    272 284
         (:p . 10) (:pe . 10)
    
    285
    +    ;; Parity odd
    
    273 286
         (:np . 11) (:po . 11)
    
    287
    +    ;; Signed <; SF /= OF
    
    274 288
         (:l . 12) (:nge . 12)
    
    275
    -    (:nl . 13) (:ge . 13)
    
    289
    +    ;; Signed >=; SF = OF
    
    290
    +    (:ge . 13) (:nl . 13)
    
    291
    +    ;; Signed <=; ZF = 1 or SF /= OF
    
    276 292
         (:le . 14) (:ng . 14)
    
    277
    -    (:nle . 15) (:g . 15)))
    
    293
    +    ;; Signed >; ZF =0 and SF = OF
    
    294
    +    (:g . 15) (:nle . 15)))
    
    278 295
     
    
    279 296
     (defun conditional-opcode (condition)
    
    280 297
       (cdr (assoc condition conditions :test #'eq))))