Changeset 16347


Ignore:
Timestamp:
Jan 26, 2015, 9:12:48 PM (5 years ago)
Author:
rme
Message:

Remove the 128 bit flavors of %copy-ivector-to-ivector.

Simple timing tests showed no improvement over the 64-bit flavors.

Incidentally closes ticket:1262.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-0/X86/x86-misc.lisp

    r16323 r16347  
    109109                     (logand dest-byte-offset 3))))
    110110         (%copy-ivector-to-ivector-postincrement-8bit src src-byte-offset dest dest-byte-offset nbytes))
    111         ((and (>= nbytes 80)
    112               (= (logand src-byte-offset 15)
    113                  (logand dest-byte-offset 15)))
    114          (let* ((prefix-size (- 16 (logand (the fixnum (+ src-byte-offset 8)) 15))))
    115            (declare (fixnum prefix-size))
    116            (unless (= 16 prefix-size)
    117              (%copy-ivector-to-ivector-postincrement-8bit src src-byte-offset dest dest-byte-offset prefix-size)
    118              (incf src-byte-offset prefix-size)
    119              (incf dest-byte-offset prefix-size)
    120              (decf nbytes prefix-size)))
    121          (let* ((tail-size (logand nbytes 15))
    122                 (dqsize (- nbytes tail-size)))
    123            (declare (fixnum tail-size dqsize))
    124            (%copy-ivector-to-ivector-postincrement-128bit src src-byte-offset dest dest-byte-offset dqsize)
    125            (unless (zerop tail-size)
    126              (%copy-ivector-to-ivector-postincrement-8bit src (the fixnum (+ src-byte-offset dqsize)) dest (the fixnum (+ dest-byte-offset dqsize)) tail-size))))
    127111        ((= (logand src-byte-offset 7) (logand dest-byte-offset 7))
    128112         (let* ((prefix-size (- 8 (logand src-byte-offset 7))))
     
    162146                     (logand dest-byte-offset 3))))
    163147         (%copy-ivector-to-ivector-predecrement-8bit src src-byte-offset dest dest-byte-offset nbytes))
    164         ((and (>= nbytes 80)
    165               (= (logand src-byte-offset 15)
    166                  (logand dest-byte-offset 15)))
    167       (let* ((suffix-size (logand src-byte-offset 15)))
    168         (declare (fixnum suffix-size))
    169         (unless (zerop suffix-size)
    170           (%copy-ivector-to-ivector-predecrement-8bit src src-byte-offset dest dest-byte-offset suffix-size)
    171           (decf src-byte-offset suffix-size)
    172           (decf dest-byte-offset suffix-size)
    173           (decf nbytes suffix-size)))
    174       (let* ((head-size (logand nbytes 15))
    175              (fullword-size (- nbytes head-size)))
    176         (declare (fixnum head-size fullword-size))
    177         (unless (zerop fullword-size)
    178           (%copy-ivector-to-ivector-predecrement-128bit src src-byte-offset dest dest-byte-offset fullword-size))
    179         (unless (zerop head-size)
    180           (%copy-ivector-to-ivector-predecrement-8bit src (the fixnum (- src-byte-offset fullword-size)) dest (the fixnum (- dest-byte-offset fullword-size)) head-size))))
    181     ((= (logand src-byte-offset 7) (logand dest-byte-offset 7))
    182       (let* ((suffix-size (logand src-byte-offset 7)))
    183         (declare (fixnum suffix-size))
    184         (unless (zerop suffix-size)
    185           (%copy-ivector-to-ivector-predecrement-8bit src src-byte-offset dest dest-byte-offset suffix-size)
    186           (decf src-byte-offset suffix-size)
    187           (decf dest-byte-offset suffix-size)
    188           (decf nbytes suffix-size)))
    189       (let* ((head-size (logand nbytes 7))
    190              (fullword-size (- nbytes head-size)))
    191         (declare (fixnum head-size fullword-size))
    192         (unless (zerop fullword-size)
    193           (%copy-ivector-to-ivector-predecrement-64bit src src-byte-offset dest dest-byte-offset fullword-size))
    194         (unless (zerop head-size)
    195           (%copy-ivector-to-ivector-predecrement-8bit src (the fixnum (- src-byte-offset fullword-size)) dest (the fixnum (- dest-byte-offset fullword-size)) head-size))))
    196     (t
    197       (let* ((suffix-size (logand src-byte-offset 3)))
    198         (declare (fixnum suffix-size))
    199         (unless (zerop suffix-size)
    200           (%copy-ivector-to-ivector-predecrement-8bit src src-byte-offset dest dest-byte-offset suffix-size)
    201           (decf src-byte-offset suffix-size)
    202           (decf dest-byte-offset suffix-size)
    203           (decf nbytes suffix-size)))
    204       (let* ((head-size (logand nbytes 3))
    205              (fullword-size (- nbytes head-size)))
    206         (declare (fixnum head-size fullword-size))
    207         (unless (zerop fullword-size)
    208           (%copy-ivector-to-ivector-predecrement-32bit src src-byte-offset dest dest-byte-offset fullword-size))
    209         (unless (zerop head-size)
    210           (%copy-ivector-to-ivector-predecrement-8bit src (the fixnum (- src-byte-offset fullword-size)) dest (the fixnum (- dest-byte-offset fullword-size)) head-size))))))
     148        ((= (logand src-byte-offset 7) (logand dest-byte-offset 7))
     149         (let* ((suffix-size (logand src-byte-offset 7)))
     150           (declare (fixnum suffix-size))
     151           (unless (zerop suffix-size)
     152             (%copy-ivector-to-ivector-predecrement-8bit src src-byte-offset dest dest-byte-offset suffix-size)
     153             (decf src-byte-offset suffix-size)
     154             (decf dest-byte-offset suffix-size)
     155             (decf nbytes suffix-size)))
     156         (let* ((head-size (logand nbytes 7))
     157                (fullword-size (- nbytes head-size)))
     158           (declare (fixnum head-size fullword-size))
     159           (unless (zerop fullword-size)
     160             (%copy-ivector-to-ivector-predecrement-64bit src src-byte-offset dest dest-byte-offset fullword-size))
     161           (unless (zerop head-size)
     162             (%copy-ivector-to-ivector-predecrement-8bit src (the fixnum (- src-byte-offset fullword-size)) dest (the fixnum (- dest-byte-offset fullword-size)) head-size))))
     163        (t
     164         (let* ((suffix-size (logand src-byte-offset 3)))
     165           (declare (fixnum suffix-size))
     166           (unless (zerop suffix-size)
     167             (%copy-ivector-to-ivector-predecrement-8bit src src-byte-offset dest dest-byte-offset suffix-size)
     168             (decf src-byte-offset suffix-size)
     169             (decf dest-byte-offset suffix-size)
     170             (decf nbytes suffix-size)))
     171         (let* ((head-size (logand nbytes 3))
     172                (fullword-size (- nbytes head-size)))
     173           (declare (fixnum head-size fullword-size))
     174           (unless (zerop fullword-size)
     175             (%copy-ivector-to-ivector-predecrement-32bit src src-byte-offset dest dest-byte-offset fullword-size))
     176           (unless (zerop head-size)
     177             (%copy-ivector-to-ivector-predecrement-8bit src (the fixnum (- src-byte-offset fullword-size)) dest (the fixnum (- dest-byte-offset fullword-size)) head-size))))))
    211178
    212179(defx86lapfunction %copy-ivector-to-ivector-postincrement-8bit ((src 16) (src-byte-offset 8) #||(ra 0)||# (dest arg_x) (dest-byte-offset arg_y) (nbytes arg_z))
     
    366333    (movq (% dest) (% arg_z))
    367334    (single-value-return 4)))
    368 
    369 (defx86lapfunction %copy-ivector-to-ivector-postincrement-128bit ((src 16) (src-byte-offset 8) #||(ra 0)||# (dest arg_x) (dest-byte-offset arg_y) (nbytes arg_z))
    370   (let ((rsrc temp0)
    371         (srcidx imm0)
    372         (destidx imm1))
    373     (movq (@ src (% rsp)) (% rsrc))
    374     (movq (@ src-byte-offset (% rsp)) (% srcidx))
    375     (sarq ($ target::fixnumshift) (% srcidx))
    376     (movq (% dest-byte-offset) (% destidx))
    377     (sarq ($ target::fixnumshift) (% destidx))
    378     (jmp @test)
    379     @loop
    380     (movdqa (@ target::misc-data-offset (% rsrc) (% srcidx)) (% xmm0))
    381     (movdqa (@ (+ 16 target::misc-data-offset) (% rsrc) (% srcidx)) (% xmm1))
    382     (movdqa (@ (+ 32 target::misc-data-offset) (% rsrc) (% srcidx)) (% xmm2))
    383     (movdqa (@ (+ 48 target::misc-data-offset) (% rsrc) (% srcidx)) (% xmm3))
    384     (movdqa (% xmm0) (@ target::misc-data-offset (% dest) (% destidx)))
    385     (movdqa (% xmm1) (@ (+ 16 target::misc-data-offset) (% dest) (% destidx)))
    386     (movdqa (% xmm2) (@ (+ 32 target::misc-data-offset) (% dest) (% destidx)))
    387     (movdqa (% xmm3) (@ (+ 48 target::misc-data-offset) (% dest) (% destidx)))
    388     (lea (@ 64 (% destidx)) (% destidx))
    389     (lea (@ 64 (% srcidx)) (% srcidx))
    390     (subq ($ '64) (% nbytes))
    391     @test
    392     (cmpq ($ '64) (% nbytes))
    393     (jge @loop)
    394     (testq (% nbytes) (% nbytes))
    395     (je @done)
    396     (cmpq ($ '32) (% nbytes))
    397     (je @two)
    398     (jl @one)
    399     (movdqa (@ target::misc-data-offset (% rsrc) (% srcidx)) (% xmm0))
    400     (movdqa (% xmm0) (@ target::misc-data-offset (% dest) (% destidx)))
    401     (lea (@ 16 (% srcidx)) (% srcidx))
    402     (lea (@ 16 (% destidx)) (% destidx))
    403     @two
    404     (movdqa (@ target::misc-data-offset (% rsrc) (% srcidx)) (% xmm0))
    405     (movdqa (% xmm0) (@ target::misc-data-offset (% dest) (% destidx)))
    406     (lea (@ 16 (% srcidx)) (% srcidx))
    407     (lea (@ 16 (% destidx)) (% destidx))
    408     @one
    409     (movdqa (@ target::misc-data-offset (% rsrc) (% srcidx)) (% xmm0))
    410     (movdqa (% xmm0) (@ target::misc-data-offset (% dest) (% destidx)))
    411     @done
    412     (movq (% dest) (% arg_z))
    413     (single-value-return 4)))
    414 
    415 (defx86lapfunction %copy-ivector-to-ivector-predecrement-128bit ((src 16) (src-byte-offset 8) #||(ra 0)||# (dest arg_x) (dest-byte-offset arg_y) (nbytes arg_z))
    416   (let ((rsrc temp0)
    417         (srcidx imm0)
    418         (destidx imm1))
    419     (movq (@ src (% rsp)) (% rsrc))
    420     (movq (@ src-byte-offset (% rsp)) (% srcidx))
    421     (sarq ($ target::fixnumshift) (% srcidx))
    422     (movq (% dest-byte-offset) (% destidx))
    423     (sarq ($ target::fixnumshift) (% destidx))
    424     (jmp @test)
    425     @loop
    426     (lea (@ -64 (% destidx)) (% destidx))
    427     (lea (@ -64 (% srcidx)) (% srcidx))
    428     (movdqa (@ target::misc-data-offset (% rsrc) (% srcidx)) (% xmm0))
    429     (movdqa (@ (+ 16 target::misc-data-offset) (% rsrc) (% srcidx)) (% xmm1))
    430     (movdqa (@ (+ 32 target::misc-data-offset) (% rsrc) (% srcidx)) (% xmm2))
    431     (movdqa (@ (+ 48 target::misc-data-offset) (% rsrc) (% srcidx)) (% xmm3))
    432     (movdqa (% xmm0) (@ target::misc-data-offset (% dest) (% destidx)))
    433     (movdqa (% xmm1) (@ (+ 16 target::misc-data-offset) (% dest) (% destidx)))
    434     (movdqa (% xmm2) (@ (+ 32 target::misc-data-offset) (% dest) (% destidx)))
    435     (movdqa (% xmm3) (@ (+ 48 target::misc-data-offset) (% dest) (% destidx)))
    436     (subq ($ '64) (% nbytes))
    437     @test
    438     (cmpq ($ '64) (% nbytes))
    439     (jge @loop)
    440     (testq (% nbytes) (% nbytes))
    441     (je @done)
    442     (cmpq ($ '32) (% nbytes))
    443     (je @two)
    444     (jl @one)
    445     (lea (@ -16 (% srcidx)) (% srcidx))
    446     (lea (@ -16 (% destidx)) (% destidx))
    447     (movdqa (@ target::misc-data-offset (% rsrc) (% srcidx)) (% xmm0))
    448     (movdqa (% xmm0) (@ target::misc-data-offset (% dest) (% destidx)))
    449     @two
    450     (lea (@ -16 (% srcidx)) (% srcidx))
    451     (lea (@ -16 (% destidx)) (% destidx))
    452     (movdqa (@ target::misc-data-offset (% rsrc) (% srcidx)) (% xmm0))
    453     (movdqa (% xmm0) (@ target::misc-data-offset (% dest) (% destidx)))
    454     @one
    455     (lea (@ -16 (% srcidx)) (% srcidx))
    456     (lea (@ -16 (% destidx)) (% destidx))
    457     (movdqa (@ target::misc-data-offset (% rsrc) (% srcidx)) (% xmm0))
    458     (movdqa (% xmm0) (@ target::misc-data-offset (% dest) (% destidx)))
    459     @done
    460     (movq (% dest) (% arg_z))
    461     (single-value-return 4)))
    462 
    463335
    464336(defx86lapfunction %copy-gvector-to-gvector ((src (* 2 x8664::node-size))
Note: See TracChangeset for help on using the changeset viewer.