Raymond Toy pushed to branch issue-284-optimize-signed-byte-32-int-len-vop at cmucl / cmucl
Commits:
-
4ffad32e
by Raymond Toy at 2024-03-22T13:08:11-07:00
1 changed file:
Changes:
... | ... | @@ -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.
|