summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStas Boukarev <stassats@gmail.com>2024-09-15 00:23:43 +0300
committerStas Boukarev <stassats@gmail.com>2024-09-15 00:23:43 +0300
commiteae344b725c49fae5340a643265db842fe61fbab (patch)
tree4ee118f35f8e321e224a6e467c5dff82ea9f52e7
parent6fd6f12f1888e04334e1497355c11f4f7b5f2b83 (diff)
arm64, logand-word-mask: accept all words.
-rw-r--r--src/compiler/arm64/arith.lisp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/compiler/arm64/arith.lisp b/src/compiler/arm64/arith.lisp
index 6b7b7f3ec..0c8293306 100644
--- a/src/compiler/arm64/arith.lisp
+++ b/src/compiler/arm64/arith.lisp
@@ -1394,8 +1394,7 @@
(:translate logand)
(:policy :fast-safe)
(:args (x :scs (descriptor-reg)))
- (:arg-types t (:constant (member #.most-positive-word
- #.(ash most-positive-word -1))))
+ (:arg-types t (:constant word))
(:results (r :scs (unsigned-reg)))
(:info mask)
(:result-types unsigned-num)
@@ -1407,8 +1406,11 @@
(inst b DONE)
BIGNUM
(loadw r x bignum-digits-offset other-pointer-lowtag)
- (unless (= mask most-positive-word)
- (inst ubfm r r 0 (- n-word-bits 2)))
+ (cond ((= mask most-positive-word))
+ ((encode-logical-immediate mask)
+ (inst and r r mask))
+ (t
+ (inst and r r (load-immediate-word tmp-tn mask))))
DONE))
;;;; Bignum stuff.