Changeset 5470


Ignore:
Timestamp:
Nov 3, 2006, 10:08:59 PM (18 years ago)
Author:
Gary Byers
Message:

aref2: new operator name(s), always call subprim.

ppc2-fixed-call-builtin: (tail-)call subprims even if they aren't in the
builtin functions table.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/compiler/PPC/ppc2.lisp

    r5399 r5470  
    50925092  (with-ppc-local-vinsn-macros (seg vreg xfer)
    50935093    (let* ((index (arch::builtin-function-name-offset name))
    5094            (idx-subprim (ppc2-builtin-index-subprim index))
     5094           (idx-subprim (if index (ppc2-builtin-index-subprim index)))
    50955095           (tail-p (ppc2-tailcallok xfer)))
    50965096      (when tail-p
     
    50995099      (if idx-subprim
    51005100        (setq subprim idx-subprim)
    5101         (! lri ($ ppc::imm0) (ash index *ppc2-target-fixnum-shift*)))
     5101        (if index (! lri ($ ppc::imm0) (ash index *ppc2-target-fixnum-shift*))))
    51025102      (if tail-p
    51035103        (! jump-subprim subprim)
     
    74627462    (ppc2-use-operator op seg vreg xfer n0 n1 *nx-t*)))
    74637463
    7464 (defppc2 ppc2-%aref2 aref2 (seg vreg xfer typename arr i j &optional dim0 dim1)
    7465   (if (null vreg)
    7466     (progn
    7467       (ppc2-form seg nil nil arr)
    7468       (ppc2-form seg nil nil i)
    7469       (ppc2-form seg nil xfer j)))
    7470   (let* ((type-keyword (ppc2-immediate-operand typename))
    7471          (fixtype (nx-lookup-target-uvector-subtag type-keyword ))
    7472          (safe (unless *ppc2-reckless* fixtype))
    7473          (dim0 (acode-fixnum-form-p dim0))
    7474          (dim1 (acode-fixnum-form-p dim1)))
    7475     (case type-keyword
    7476       (:double-float-vector
    7477        (if (= (hard-regspec-class vreg) hard-reg-class-fpr)
    7478          (ppc2-aref2 seg vreg xfer arr i j safe type-keyword dim0 dim1)
    7479          (with-fp-target () (target :double-float)
    7480            (ppc2-aref2 seg target nil arr i j safe type-keyword dim0 dim1)
    7481            (<- target)
    7482            (^))))
    7483       (:single-float-vector
    7484        (if (= (hard-regspec-class vreg) hard-reg-class-fpr)
    7485          (ppc2-aref2 seg vreg xfer arr i j safe fixtype dim0 dim1)
    7486          (with-fp-target () (target :single-float)
    7487            (ppc2-aref2 seg target nil arr i j safe type-keyword dim0 dim1)
    7488            (<- target)
    7489            (^))))
    7490       (t (error "Bug: shouldn't have tried to open-code %AREF2 call.")))))
     7464(eval-when (:compile-toplevel)
     7465  (warn "fix ppc2-%aref2"))
     7466
     7467(defppc2 ppc2-%aref2 simple-typed-aref2 (seg vreg xfer typename arr i j &optional dim0 dim1)
     7468  (declare (ignore typename dim0 dim1))
     7469  (ppc2-three-targeted-reg-forms seg arr ($ ppc::arg_x) i ($ ppc::arg_y) j ($ ppc::arg_z))
     7470  (ppc2-fixed-call-builtin seg vreg xfer nil (subprim-name->offset '.SParef2)))
     7471
     7472(defppc2 ppc2-general-aref2 general-aref2 (seg vreg xfer arr i j)
     7473  (ppc2-three-targeted-reg-forms seg arr ($ ppc::arg_x) i ($ ppc::arg_y) j ($ ppc::arg_z))
     7474  (ppc2-fixed-call-builtin seg vreg xfer nil (subprim-name->offset '.SParef2)))
    74917475
    74927476(defppc2 ppc2-%aset2 aset2 (seg vreg xfer typename arr i j new &optional dim0 dim1)
Note: See TracChangeset for help on using the changeset viewer.