Ignore:
Timestamp:
Dec 22, 2009, 10:28:03 PM (10 years ago)
Author:
gz
Message:

Improved compilation for some fixnum operations, %svref (r13247-r13253 from trunk)

Location:
branches/working-0711/ccl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl

  • branches/working-0711/ccl/compiler/nx2.lisp

    r13165 r13332  
    242242      (cadr x)
    243243      (compiler-bug "not an immediate: ~s" x))))
     244
     245(defun nx2-constant-index-ok-for-type-keyword (idx keyword)
     246  (when (>= idx 0)
     247    (let* ((arch (backend-target-arch *target-backend*))
     248           (limit
     249            (case keyword
     250              ((:bignum
     251                :single-float
     252                :double-float
     253                :xcode-vector
     254                :signed-32-bit-vector
     255                :unsigned-32-bit-vector
     256                :single-float-vector
     257                :simple-string)
     258               (arch::target-max-32-bit-constant-index arch))
     259              (:bit-vector (arch::target-max-1-bit-constant-index arch))
     260              ((:signed-8-bit-vector :unsigned-8-bit-vector)
     261               (arch::target-max-8-bit-constant-index arch))
     262              ((:signed-16-bit-vector :unsigned-16-bit-vector)
     263               (arch::target-max-16-bit-constant-index arch))
     264              ((:signed-64-bit-vector
     265                :unsigned-64-bit-vector
     266                :double-float-vector)
     267               (arch::target-max-64-bit-constant-index arch))
     268              (t
     269               ;; :fixnum or node
     270               (target-word-size-case
     271                (32 (arch::target-max-32-bit-constant-index arch))
     272                (64 (arch::target-max-64-bit-constant-index arch)))))))
     273      (and limit (< idx limit)))))
Note: See TracChangeset for help on using the changeset viewer.