Commit d95f1e64 authored by Paul Khuong's avatar Paul Khuong
Browse files

1.0.24.35: Flag-setting VOPs on x86[-64] and conditional moves

 * Most :CONDITIONAL VOPs only specify which condition flags they set

 * GENERIC-{EQL,=,<,>} are :CONDITIONAL VOPs, but don't show up as
   calls anymore

 * Values may be selected with CMOVcc if applicable (and :CMOV is
   in *backend-subfeatures*, for x86):
    - Values that are represented, unboxed, in GPRs are CMOVed using
      custom VOPs
    - Unboxed float and complex types aren't converted
    - Other types are assumed to be boxed and CMOVed as descriptors

 * A test to try and to cover an interesting cross-section of flags
   and values to move conditionally.
parent 5cf3c425
Loading
Loading
Loading
Loading
+138 −77
Original line number Diff line number Diff line
@@ -151,64 +151,79 @@
;;;; comparison

(macrolet ((define-cond-assem-rtn (name translate static-fn test)
               (declare (ignorable translate static-fn))
             #+sb-assembling
             `(define-assembly-routine (,name
                                        (:cost 10)
                                        (:return-style :full-call)
                                        (:policy :safe)
                                        (:translate ,translate)
                                        (:save-p t))
                                        (:return-style :none))
                  ((:arg x (descriptor-reg any-reg) rdx-offset)
                   (:arg y (descriptor-reg any-reg) rdi-offset)

                 (:res res descriptor-reg rdx-offset)

                 (:temp eax unsigned-reg rax-offset)
                 (:temp ecx unsigned-reg rcx-offset))
                   (:temp rcx unsigned-reg rcx-offset))

                (inst mov ecx x)
                (inst or ecx y)
                (inst test ecx fixnum-tag-mask)
                (inst mov rcx x)
                (inst or rcx y)
                (inst test rcx fixnum-tag-mask)
                (inst jmp :nz DO-STATIC-FUN)

                (inst cmp x y)
                (load-symbol res t)
                (inst mov eax nil-value)
                (inst cmov ,test res eax)
                (inst clc)   ; single-value return
                (inst ret)

                DO-STATIC-FUN
                (inst pop eax)
                (inst push rbp-tn)
                (inst lea rbp-tn (make-ea :qword
                                          :base rsp-tn
                                          :disp n-word-bytes))
                (inst sub rsp-tn (fixnumize 2)) ; FIXME: Push 2 words on stack,
                                                ; weirdly?
                (inst push eax)
                (inst mov ecx (fixnumize 2)) ; FIXME: FIXNUMIZE and
                                        ; SINGLE-FLOAT-BITS are parallel,
                                        ; should be named parallelly.
                (inst jmp (make-ea :qword
                (move rcx rsp-tn)
                (inst sub rsp-tn (fixnumize 3))
                (inst mov (make-ea :qword
                                   :base rcx
                                   :disp (fixnumize -1))
                      rbp-tn)
                (move rbp-tn rcx)
                (inst mov rcx (fixnumize 2))
                (inst call (make-ea :qword
                                    :disp (+ nil-value
                                            (static-fun-offset ',static-fn)))))))

  (define-cond-assem-rtn generic-< < two-arg-< :ge)
  (define-cond-assem-rtn generic-> > two-arg-> :le))

(define-assembly-routine (generic-eql
                          (:cost 10)
                          (:return-style :full-call)
                                             (static-fun-offset ',static-fn))))
                ;; HACK: We depend on NIL having the lowest address of all
                ;; static symbols (including T)
                ,@(ecase test
                    (:l `((inst mov y (1+ nil-value))
                          (inst cmp y x)))
                    (:g `((inst cmp x (1+ nil-value)))))
                (inst ret))
             #-sb-assembling
             `(define-vop (,name)
                (:translate ,translate)
                (:policy :safe)
                          (:translate eql)
                          (:save-p t))
                (:save-p t)
                (:args (x :scs (descriptor-reg any-reg) :target rdx)
                       (y :scs (descriptor-reg any-reg) :target rdi))

                (:temporary (:sc unsigned-reg :offset rdx-offset
                                 :from (:argument 0))
                            rdx)
                (:temporary (:sc unsigned-reg :offset rdi-offset
                                 :from (:argument 1))
                            rdi)

                (:temporary (:sc unsigned-reg :offset rcx-offset
                                 :from :eval)
                            rcx)
                (:conditional ,test)
                (:generator 10
                   (move rdx x)
                   (move rdi y)
                   (inst lea rcx (make-ea :qword
                                          :disp (make-fixup ',name :assembly-routine)))
                   (inst call rcx)))))

  (define-cond-assem-rtn generic-< < two-arg-< :l)
  (define-cond-assem-rtn generic-> > two-arg-> :g))

#+sb-assembling
(define-assembly-routine (generic-eql
                          (:return-style :none))
                         ((:arg x (descriptor-reg any-reg) rdx-offset)
                          (:arg y (descriptor-reg any-reg) rdi-offset)

                          (:res res descriptor-reg rdx-offset)

                          (:temp rax unsigned-reg rax-offset)
                          (:temp rcx unsigned-reg rcx-offset))

  (inst mov rcx x)
  (inst and rcx y)
  (inst test rcx fixnum-tag-mask)
@@ -216,34 +231,55 @@

  ;; At least one fixnum
  (inst cmp x y)
  (load-symbol res t)
  (inst mov rax nil-value)
  (inst cmov :ne res rax)
  (inst clc)
  (inst ret)

  DO-STATIC-FUN
  (inst pop rax)
  (inst push rbp-tn)
  (inst lea rbp-tn (make-ea :qword :base rsp-tn :disp n-word-bytes))
  (inst sub rsp-tn (fixnumize 2))
  (inst push rax)
  (move rcx rsp-tn)
  (inst sub rsp-tn (fixnumize 3))
  (inst mov (make-ea :qword
                     :base rcx
                     :disp (fixnumize -1))
        rbp-tn)
  (move rbp-tn rcx)
  (inst mov rcx (fixnumize 2))
  (inst jmp (make-ea :qword
                     :disp (+ nil-value (static-fun-offset 'eql)))))
  (inst call (make-ea :qword
                      :disp (+ nil-value (static-fun-offset 'eql))))
  (load-symbol y t)
  (inst cmp x y)
  (inst ret))

(define-assembly-routine (generic-=
                          (:cost 10)
                          (:return-style :full-call)
#-sb-assembling
(define-vop (generic-eql)
  (:translate eql)
  (:policy :safe)
                          (:translate =)
                          (:save-p t))
  (:save-p t)
  (:args (x :scs (descriptor-reg any-reg) :target rdx)
         (y :scs (descriptor-reg any-reg) :target rdi))

  (:temporary (:sc unsigned-reg :offset rdx-offset
               :from (:argument 0))
              rdx)
  (:temporary (:sc unsigned-reg :offset rdi-offset
               :from (:argument 1))
              rdi)

  (:temporary (:sc unsigned-reg :offset rcx-offset
               :from :eval)
              rcx)
  (:conditional :e)
  (:generator 10
    (move rdx x)
    (move rdi y)
    (inst lea rcx (make-ea :qword
                           :disp (make-fixup 'generic-eql :assembly-routine)))
    (inst call rcx)))

#+sb-assembling
(define-assembly-routine (generic-=
                          (:return-style :none))
                         ((:arg x (descriptor-reg any-reg) rdx-offset)
                          (:arg y (descriptor-reg any-reg) rdi-offset)

                          (:res res descriptor-reg rdx-offset)

                          (:temp rax unsigned-reg rax-offset)
                          (:temp rcx unsigned-reg rcx-offset))
  (inst mov rcx x)
  (inst or rcx y)
@@ -252,20 +288,45 @@

  ;; Both fixnums
  (inst cmp x y)
  (load-symbol res t)
  (inst mov rax nil-value)
  (inst cmov :ne res rax)
  (inst clc)
  (inst ret)

  DO-STATIC-FUN
  (inst pop rax)
  (inst push rbp-tn)
  (inst lea rbp-tn (make-ea :qword :base rsp-tn :disp n-word-bytes))
  (inst sub rsp-tn (fixnumize 2))
  (inst push rax)
  (move rcx rsp-tn)
  (inst sub rsp-tn (fixnumize 3))
  (inst mov (make-ea :qword
                     :base rcx
                     :disp (fixnumize -1))
        rbp-tn)
  (move rbp-tn rcx)
  (inst mov rcx (fixnumize 2))
  (inst jmp (make-ea :qword
                     :disp (+ nil-value (static-fun-offset 'two-arg-=)))))

  (inst call (make-ea :qword
                      :disp (+ nil-value (static-fun-offset 'two-arg-=))))
  (load-symbol y t)
  (inst cmp x y)
  (inst ret))

#-sb-assembling
(define-vop (generic-=)
  (:translate =)
  (:policy :safe)
  (:save-p t)
  (:args (x :scs (descriptor-reg any-reg) :target rdx)
         (y :scs (descriptor-reg any-reg) :target rdi))

  (:temporary (:sc unsigned-reg :offset rdx-offset
               :from (:argument 0))
              rdx)
  (:temporary (:sc unsigned-reg :offset rdi-offset
               :from (:argument 1))
              rdi)

  (:temporary (:sc unsigned-reg :offset rcx-offset
               :from :eval)
              rcx)
  (:conditional :e)
  (:generator 10
    (move rdx x)
    (move rdi y)
    (inst lea rcx (make-ea :qword
                           :disp (make-fixup 'generic-= :assembly-routine)))
    (inst call rcx)))
+139 −91
Original line number Diff line number Diff line
@@ -154,18 +154,12 @@
;;;; comparison

(macrolet ((define-cond-assem-rtn (name translate static-fn test)
             #+sb-assembling
             `(define-assembly-routine (,name
                                        (:cost 10)
                                        (:return-style :full-call)
                                        (:policy :safe)
                                        (:translate ,translate)
                                        (:save-p t))
                                        (:return-style :none))
                ((:arg x (descriptor-reg any-reg) edx-offset)
                 (:arg y (descriptor-reg any-reg) edi-offset)

                 (:res res descriptor-reg edx-offset)

                 (:temp eax unsigned-reg eax-offset)
                 (:temp ecx unsigned-reg ecx-offset))

                (inst mov ecx x)
@@ -174,120 +168,174 @@
                (inst jmp :nz DO-STATIC-FUN)  ; are both fixnums?

                (inst cmp x y)
                (cond ((member :cmov *backend-subfeatures*)
                       (load-symbol res t)
                       (inst mov eax nil-value)
                       (inst cmov ,test res eax))
                      (t
                       (inst mov res nil-value)
                       (inst jmp ,test RETURN)
                       (load-symbol res t)))
                RETURN
                (inst clc)     ; single-value return
                (inst ret)

                DO-STATIC-FUN
                (inst pop eax)
                (inst push ebp-tn)
                (inst lea ebp-tn (make-ea :dword
                                          :base esp-tn
                                          :disp n-word-bytes))
                (inst sub esp-tn (fixnumize 2)) ; FIXME: Push 2 words on stack,
                                                ; weirdly?
                (inst push eax)
                (inst mov ecx (fixnumize 2)) ; FIXME: FIXNUMIZE and
                                        ; SINGLE-FLOAT-BITS are parallel,
                                        ; should be named parallelly.
                (inst jmp (make-ea :dword
                (move ecx esp-tn)
                (inst sub esp-tn (fixnumize 3))
                (inst mov (make-ea :dword
                                   :base ecx :disp (fixnumize -1))
                      ebp-tn)
                (move ebp-tn ecx)
                (inst mov ecx (fixnumize 2))
                (inst call (make-ea :dword
                                    :disp (+ nil-value
                                            (static-fun-offset ',static-fn)))))))

  (define-cond-assem-rtn generic-< < two-arg-< :ge)
  (define-cond-assem-rtn generic-> > two-arg-> :le))

(define-assembly-routine (generic-eql
                          (:cost 10)
                          (:return-style :full-call)
                                             (static-fun-offset ',static-fn))))
                ;; HACK: We depend on NIL having the lowest address of all
                ;; static symbols (including T)
                ,@(ecase test
                    (:l `((inst mov y (1+ nil-value))
                          (inst cmp y x)))
                    (:g `((inst cmp x (1+ nil-value)))))
                (inst ret))
             #-sb-assembling
                          `(define-vop (,name)
                (:translate ,translate)
                (:policy :safe)
                          (:translate eql)
                          (:save-p t))
                (:save-p t)
                (:args (x :scs (descriptor-reg any-reg) :target edx)
                       (y :scs (descriptor-reg any-reg) :target edi))

                (:temporary (:sc unsigned-reg :offset edx-offset
                                 :from (:argument 0))
                            edx)
                (:temporary (:sc unsigned-reg :offset edi-offset
                                 :from (:argument 1))
                            edi)

                (:temporary (:sc unsigned-reg :offset ecx-offset
                                 :from :eval)
                            ecx)
                (:conditional ,test)
                (:generator 10
                   (move edx x)
                   (move edi y)
                   (inst lea ecx (make-ea :dword
                                          :disp (make-fixup ',name :assembly-routine)))
                   (inst call ecx)))))

  (define-cond-assem-rtn generic-< < two-arg-< :l)
  (define-cond-assem-rtn generic-> > two-arg-> :g))

#+sb-assembling
(define-assembly-routine (generic-eql
                          (:return-style :none))
                         ((:arg x (descriptor-reg any-reg) edx-offset)
                          (:arg y (descriptor-reg any-reg) edi-offset)

                          (:res res descriptor-reg edx-offset)

                          (:temp eax unsigned-reg eax-offset)
                          (:temp ecx unsigned-reg ecx-offset))
  (inst mov ecx x)
  (inst and ecx y)
  (inst test ecx fixnum-tag-mask)
  (inst jmp :nz DO-STATIC-FUN)
  (inst and ecx lowtag-mask)
  (inst cmp ecx other-pointer-lowtag)
  (inst jmp :e DO-STATIC-FUN)

  ;; At least one fixnum
  ;; Not both other pointers
  (inst cmp x y)
  (load-symbol res t)
  (cond ((member :cmov *backend-subfeatures*)
         (inst mov eax nil-value)
         (inst cmov :ne res eax))
        (t
         (inst jmp :e RETURN)
         (inst mov res nil-value)))
  RETURN
  (inst clc)
  RET
  (inst ret)

  ;; FIXME: We could handle all non-numbers here easily enough: go to
  ;; TWO-ARG-EQL only if lowtags and widetags match, lowtag is
  ;; other-pointer-lowtag and widetag is < code-header-widetag.
  DO-STATIC-FUN
  (inst pop eax)
  (inst push ebp-tn)
  (inst lea ebp-tn (make-ea :dword :base esp-tn :disp n-word-bytes))
  (inst sub esp-tn (fixnumize 2))
  (inst push eax)
  ;; Might as well fast path that...
  (inst cmp x y)
  (inst jmp :e RET)

  (move ecx esp-tn)
  (inst sub esp-tn (fixnumize 3))
  (inst mov (make-ea :dword
                     :base ecx
                     :disp (fixnumize -1))
        ebp-tn)
  (move ebp-tn ecx)
  (inst mov ecx (fixnumize 2))
  (inst jmp (make-ea :dword
                     :disp (+ nil-value (static-fun-offset 'eql)))))
  (inst call (make-ea :dword
                      :disp (+ nil-value (static-fun-offset 'eql))))
  (load-symbol y t)
  (inst cmp x y)
  (inst ret))

(define-assembly-routine (generic-=
                          (:cost 10)
                          (:return-style :full-call)
#-sb-assembling
(define-vop (generic-eql)
  (:translate eql)
  (:policy :safe)
                          (:translate =)
                          (:save-p t))
  (:save-p t)
  (:args (x :scs (descriptor-reg any-reg) :target edx)
         (y :scs (descriptor-reg any-reg) :target edi))

  (:temporary (:sc unsigned-reg :offset edx-offset
               :from (:argument 0))
              edx)
  (:temporary (:sc unsigned-reg :offset edi-offset
               :from (:argument 1))
              edi)

  (:temporary (:sc unsigned-reg :offset ecx-offset
               :from :eval)
              ecx)
  (:conditional :e)
  (:generator 10
    (move edx x)
    (move edi y)
    (inst lea ecx (make-ea :dword
                           :disp (make-fixup 'generic-eql :assembly-routine)))
    (inst call ecx)))

#+sb-assembling
(define-assembly-routine (generic-=
                          (:return-style :none))
                         ((:arg x (descriptor-reg any-reg) edx-offset)
                          (:arg y (descriptor-reg any-reg) edi-offset)

                          (:res res descriptor-reg edx-offset)

                          (:temp eax unsigned-reg eax-offset)
                          (:temp ecx unsigned-reg ecx-offset))
  (inst mov ecx x)
  (inst or ecx y)
  (inst test ecx fixnum-tag-mask)        ; both fixnums?
  (inst test ecx fixnum-tag-mask)
  (inst jmp :nz DO-STATIC-FUN)

  ;; Both fixnums
  (inst cmp x y)
  (load-symbol res t)
  (cond ((member :cmov *backend-subfeatures*)
         (inst mov eax nil-value)
         (inst cmov :ne res eax))
        (t
         (inst jmp :e RETURN)
         (inst mov res nil-value)))
  RETURN
  (inst clc)
  (inst ret)

  DO-STATIC-FUN
  (inst pop eax)
  (inst push ebp-tn)
  (inst lea ebp-tn (make-ea :dword :base esp-tn :disp n-word-bytes))
  (inst sub esp-tn (fixnumize 2))
  (inst push eax)
  (move ecx esp-tn)
  (inst sub esp-tn (fixnumize 3))
  (inst mov (make-ea :dword
                     :base ecx
                     :disp (fixnumize -1))
        ebp-tn)
  (move ebp-tn ecx)
  (inst mov ecx (fixnumize 2))
  (inst jmp (make-ea :dword
                     :disp (+ nil-value (static-fun-offset 'two-arg-=)))))
  (inst call (make-ea :dword
                      :disp (+ nil-value (static-fun-offset 'two-arg-=))))
  (load-symbol y t)
  (inst cmp x y)
  (inst ret))

#-sb-assembling
(define-vop (generic-=)
  (:translate =)
  (:policy :safe)
  (:save-p t)
  (:args (x :scs (descriptor-reg any-reg) :target edx)
         (y :scs (descriptor-reg any-reg) :target edi))

  (:temporary (:sc unsigned-reg :offset edx-offset
               :from (:argument 0))
              edx)
  (:temporary (:sc unsigned-reg :offset edi-offset
               :from (:argument 1))
              edi)

  (:temporary (:sc unsigned-reg :offset ecx-offset
               :from :eval)
              ecx)
  (:conditional :e)
  (:generator 10
    (move edx x)
    (move edi y)
    (inst lea ecx (make-ea :dword
                           :disp (make-fixup 'generic-= :assembly-routine)))
    (inst call ecx)))


;;; Support for the Mersenne Twister, MT19937, random number generator
+17 −32
Original line number Diff line number Diff line
@@ -1008,8 +1008,8 @@
;;;; binary conditional VOPs

(define-vop (fast-conditional)
  (:conditional)
  (:info target not-p)
  (:conditional :e)
  (:info)
  (:effects)
  (:affected)
  (:policy :fast-safe))
@@ -1028,7 +1028,7 @@
(define-vop (fast-conditional-c/fixnum fast-conditional/fixnum)
  (:args (x :scs (any-reg control-stack)))
  (:arg-types tagged-num (:constant (signed-byte 29)))
  (:info target not-p y))
  (:info y))

(define-vop (fast-conditional/signed fast-conditional)
  (:args (x :scs (signed-reg)
@@ -1041,7 +1041,7 @@
(define-vop (fast-conditional-c/signed fast-conditional/signed)
  (:args (x :scs (signed-reg signed-stack)))
  (:arg-types signed-num (:constant (signed-byte 31)))
  (:info target not-p y))
  (:info y))

(define-vop (fast-conditional/unsigned fast-conditional)
  (:args (x :scs (unsigned-reg)
@@ -1054,7 +1054,7 @@
(define-vop (fast-conditional-c/unsigned fast-conditional/unsigned)
  (:args (x :scs (unsigned-reg unsigned-stack)))
  (:arg-types unsigned-num (:constant (unsigned-byte 31)))
  (:info target not-p y))
  (:info y))

(macrolet ((define-conditional-vop (tran cond unsigned not-cond not-unsigned)
             `(progn
@@ -1068,19 +1068,12 @@
                                     (format nil "~:@(FAST-CONDITIONAL~A~)"
                                             suffix)))
                        (:translate ,tran)
                        (:conditional ,(if signed cond unsigned))
                        (:generator ,cost
                                    (inst cmp x
                                          ,(if (eq suffix '-c/fixnum)
                                               '(fixnumize y)
                                               'y))
                                    (inst jmp (if not-p
                                                  ,(if signed
                                                       not-cond
                                                       not-unsigned)
                                                  ,(if signed
                                                       cond
                                                       unsigned))
                                          target))))
                                               'y)))))
                   '(/fixnum -c/fixnum /signed -c/signed /unsigned -c/unsigned)
;                  '(/fixnum  /signed  /unsigned)
                   '(4 3 6 5 6 5)
@@ -1092,8 +1085,7 @@
(define-vop (fast-if-eql/signed fast-conditional/signed)
  (:translate eql)
  (:generator 6
    (inst cmp x y)
    (inst jmp (if not-p :ne :e) target)))
    (inst cmp x y)))

(define-vop (fast-if-eql-c/signed fast-conditional-c/signed)
  (:translate eql)
@@ -1101,14 +1093,12 @@
    (cond ((and (sc-is x signed-reg) (zerop y))
           (inst test x x))  ; smaller instruction
          (t
           (inst cmp x y)))
    (inst jmp (if not-p :ne :e) target)))
           (inst cmp x y)))))

(define-vop (fast-if-eql/unsigned fast-conditional/unsigned)
  (:translate eql)
  (:generator 6
    (inst cmp x y)
    (inst jmp (if not-p :ne :e) target)))
    (inst cmp x y)))

(define-vop (fast-if-eql-c/unsigned fast-conditional-c/unsigned)
  (:translate eql)
@@ -1116,8 +1106,7 @@
    (cond ((and (sc-is x unsigned-reg) (zerop y))
           (inst test x x))  ; smaller instruction
          (t
           (inst cmp x y)))
    (inst jmp (if not-p :ne :e) target)))
           (inst cmp x y)))))

;;; EQL/FIXNUM is funny because the first arg can be of any type, not just a
;;; known fixnum.
@@ -1137,8 +1126,8 @@
  (:note "inline fixnum comparison")
  (:translate eql)
  (:generator 4
    (inst cmp x y)
    (inst jmp (if not-p :ne :e) target)))
    (inst cmp x y)))

(define-vop (generic-eql/fixnum fast-eql/fixnum)
  (:args (x :scs (any-reg descriptor-reg)
            :load-if (not (and (sc-is x control-stack)
@@ -1147,18 +1136,16 @@
  (:arg-types * tagged-num)
  (:variant-cost 7))


(define-vop (fast-eql-c/fixnum fast-conditional/fixnum)
  (:args (x :scs (any-reg control-stack)))
  (:arg-types tagged-num (:constant (signed-byte 29)))
  (:info target not-p y)
  (:info y)
  (:translate eql)
  (:generator 2
    (cond ((and (sc-is x any-reg) (zerop y))
           (inst test x x))  ; smaller instruction
          (t
           (inst cmp x (fixnumize y))))
    (inst jmp (if not-p :ne :e) target)))
           (inst cmp x (fixnumize y))))))

(define-vop (generic-eql-c/fixnum fast-eql-c/fixnum)
  (:args (x :scs (any-reg descriptor-reg control-stack)))
@@ -1413,11 +1400,9 @@
  (:policy :fast-safe)
  (:args (digit :scs (unsigned-reg)))
  (:arg-types unsigned-num)
  (:conditional)
  (:info target not-p)
  (:conditional :ns)
  (:generator 3
    (inst or digit digit)
    (inst jmp (if not-p :s :ns) target)))
    (inst or digit digit)))


;;; For add and sub with carry the sc of carry argument is any-reg so
+4 −8
Original line number Diff line number Diff line
@@ -221,8 +221,7 @@
  (:translate boundp)
  (:policy :fast-safe)
  (:args (object :scs (descriptor-reg)))
  (:conditional)
  (:info target not-p)
  (:conditional :ne)
  (:temporary (:sc descriptor-reg #+nil(:from (:argument 0))) value)
  (:generator 9
    (let ((check-unbound-label (gen-label)))
@@ -233,21 +232,18 @@
      (inst jmp :ne check-unbound-label)
      (loadw value object symbol-value-slot other-pointer-lowtag)
      (emit-label check-unbound-label)
      (inst cmp value unbound-marker-widetag)
      (inst jmp (if not-p :e :ne) target))))
      (inst cmp value unbound-marker-widetag))))

#!-sb-thread
(define-vop (boundp)
  (:translate boundp)
  (:policy :fast-safe)
  (:args (object :scs (descriptor-reg)))
  (:conditional)
  (:info target not-p)
  (:conditional :ne)
  (:generator 9
    (inst cmp (make-ea-for-object-slot object symbol-value-slot
                                       other-pointer-lowtag)
          unbound-marker-widetag)
    (inst jmp (if not-p :e :ne) target)))
          unbound-marker-widetag)))


(define-vop (symbol-hash)
+10 −16

File changed.

Preview size limit exceeded, changes collapsed.

Loading