Changeset 14771


Ignore:
Timestamp:
May 2, 2011, 6:35:21 PM (9 years ago)
Author:
gb
Message:

Use the LR to point into double-float vectors when getting/setting
constant-indexed elements. (Floating-point loads/stores can only
use indices that're a multiple of 4 bytes.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/compiler/ARM/arm-vinsns.lisp

    r14768 r14771  
    170170
    171171
    172 (define-arm-vinsn (misc-ref-c-double-float :predicatable)
     172
     173
     174(define-arm-vinsn (misc-ref-c-double-float :predicatable :sets-lr)
    173175    (((dest :double-float))
    174176     ((v :lisp)
    175       (idx :u32const))
    176      ((low (:u32 #.arm::imm0))
    177       (high (:u32 #.arm::imm1))))
    178   (ldrd low (:@ v (:$ (:apply + arm::misc-dfloat-offset (:apply ash idx 3)))))
    179   (fmdrr dest low high))
     177      (idx :u32const)))
     178  (add lr v (:$ arm::double-float.pad))
     179  (fldd dest (:@ lr (:$ (:apply + (:apply ash idx 3) (- arm::double-float.value arm::double-float.pad))))))
    180180
    181181(define-arm-vinsn (misc-set-c-double-float :predicatable)
    182182    (((val :double-float))
    183183     ((v :lisp)
    184       (idx :u32const))
    185      ((low (:u32 #.arm::imm0))
    186       (high (:u32 #.arm::imm1))))
    187   (fmrrd low high val)
    188   (strd low (:@ v (:$ (:apply + arm::misc-dfloat-offset (:apply ash idx 3))))))
     184      (idx :u32const)))
     185  (add lr v (:$ arm::double-float.pad))
     186  (fstd val (:@ lr (:$ (:apply + (:apply ash idx 3) (- arm::double-float.value arm::double-float.pad))))))
    189187
    190188(define-arm-vinsn (misc-set-double-float :predicatable)
     
    24062404  (mov result allocptr)
    24072405  (bic allocptr allocptr (:$ arm::fulltagmask))
    2408   (fmrrd header-temp high fpreg)
    2409   (strd header-temp (:@ result (:$ arm::double-float.value))))
     2406  (add lr result (:$ arm::double-float.pad))
     2407  (fstd fpreg (:@ lr (:$ (- arm::double-float.value arm::double-float.pad)))))
    24102408
    24112409
Note: See TracChangeset for help on using the changeset viewer.