Changeset 9443


Ignore:
Timestamp:
May 9, 2008, 10:27:20 AM (11 years ago)
Author:
gb
Message:

%EXTEND-VECTOR changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711-perf/ccl/level-0/X86/x86-array.lisp

    r7847 r9443  
    195195(defun %extend-vector (start oldv newsize)
    196196  (declare (fixnum start))
    197   (let* ((new (%alloc-misc newsize (typecode oldv)))
     197  (let* ((typecode (typecode oldv))
     198         (new (%alloc-misc newsize typecode))
    198199         (oldsize (uvsize oldv)))
    199     (declare (fixnum oldsize))
    200     (do* ((i 0 (1+ i))
    201           (j start (1+ j)))
    202          ((= i oldsize) new)
    203       (declare (fixnum i j))
    204       (setf (uvref new j) (uvref oldv i)))))
     200    (declare (fixnum oldsize typecode))
     201    (if (gvectorp oldv)
     202      (%extend-gvector oldv start oldsize new)
     203      (if (not (zerop start))
     204        (do* ((i 0 (1+ i))
     205              (j start (1+ j)))
     206             ((= i oldsize) new)
     207          (declare (fixnum i j))
     208          (setf (uvref new j) (uvref oldv i)))
     209        (%copy-ivector-to-ivector oldv 0 new 0 (subtag-bytes typecode oldsize))))))
    205210   
    206 
    207 
     211(defx86lapfunction %extend-gvector ((oldv 8)
     212                                    #|(ra 0)|#
     213                                    (start arg_x)
     214                                    (oldsize arg_y)
     215                                    (new arg_z))
     216  (let ((rold temp0)
     217        (val temp1)
     218        (out temp2))
     219    (movq (@ oldv (% rsp)) (% rold))
     220    (xorl (%l out) (%l out))
     221    (jmp @test)
     222    @loop
     223    (movq (@ x8664::misc-data-offset (% rold) (% start)) (% val))
     224    (movq (% val) (@ x8664::misc-data-offset (% new) (% out)))
     225    (addq ($ '1) (% out))
     226    (addq ($ '1) (% start))
     227    @test
     228    (cmpq (% start) (% oldsize))
     229    (jne @loop)
     230    (single-value-return 3)))
    208231
    209232
Note: See TracChangeset for help on using the changeset viewer.