Raymond Toy pushed to branch issue-284-optimize-signed-byte-32-int-len-vop at cmucl / cmucl

Commits:

1 changed file:

Changes:

  • src/compiler/x86/arith.lisp
    ... ... @@ -760,12 +760,11 @@
    760 760
       (:results (res :scs (any-reg)))
    
    761 761
       (:result-types positive-fixnum)
    
    762 762
       (:generator 30
    
    763
    -    (move res arg)
    
    764 763
         ;; The Intel docs say that BSR leaves the destination register
    
    765
    -    ;; undefined if the source is 0.  But AMD64 says the destination
    
    766
    -    ;; register is unchanged.  This also appears to be the case for
    
    767
    -    ;; GCC and LLVM.
    
    768
    -    (inst bsr res res)
    
    764
    +    ;; undefined if the source is 0.  However, gcc, LLVM, and MSVC
    
    765
    +    ;; generate code that pretty much says BSR basically moves the
    
    766
    +    ;; source to the destination if the source is 0.
    
    767
    +    (inst bsr res arg)
    
    769 768
         (inst jmp :z DONE)
    
    770 769
         ;; The result of BSR is one too small for what we want, so
    
    771 770
         ;; increment the result.