Changeset 14079 for branches


Ignore:
Timestamp:
Jul 29, 2010, 3:52:59 PM (9 years ago)
Author:
gb
Message:

REQUIRE-REAL, REQUIRE-NUMBER: use arm::real-tags-mask, arm::numeric-tags-mask.
STORE-DOUBLE: user strd, not just str.

File:
1 edited

Legend:

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

    r14070 r14079  
    919919(define-arm-vinsn require-real (()
    920920                                ((object :lisp))
    921                                 ((tag :u8)))
     921                                ((tag :u8)
     922                                 (mask :u32)
     923                                 (realtags :u32)))
     924  (mov mask (:$ 1))
    922925  (and tag object (:$ arm::tagmask))
     926  (movw realtags (:$ (ldb (byte 16 0) arm::real-tags-mask)))
    923927  (cmp tag (:$ arm::tag-misc))
     928  (movt realtags (:$ (ldb (byte 16 16) arm::real-tags-mask)))
    924929  (ldrbeq tag (:@ object (:$ arm::misc-subtag-offset)))
    925   (cmp tag (:$ arm::max-real-subtag))
    926   (uuo-cerror-reg-not-xtype (:? hi) object (:$ arm::xtype-real)))
     930  (tst realtags (:lsl mask tag))
     931  (uuo-cerror-reg-not-xtype (:? eq) object (:$ arm::xtype-real)))
    927932
    928933(define-arm-vinsn require-number (()
    929934                                  ((object :lisp))
    930                                   ((tag :u8)))
     935                                  ((tag :u8)
     936                                   (mask :u32)
     937                                   (numtags :u32)))
     938  (mov mask (:$ 1))
    931939  (and tag object (:$ arm::tagmask))
     940  (movw numtags (:$ (ldb (byte 16 0) arm::numeric-tags-mask)))
    932941  (cmp tag (:$ arm::tag-misc))
     942  (movt numtags (:$ (ldb (byte 16 16) arm::real-tags-mask)))
    933943  (ldrbeq tag (:@ object (:$ arm::misc-subtag-offset)))
    934   (cmp tag (:$ arm::max-numeric-subtag))
    935   (uuo-cerror-reg-not-xtype (:? hi) object (:$ arm::xtype-number)))
     944  (tst numtags (:lsl mask tag))
     945  (uuo-cerror-reg-not-xtype (:? eq) object (:$ arm::xtype-number)))
    936946
    937947
     
    16291639
    16301640
    1631 #+later
    1632 (define-arm-vinsn insert-bit-0 (((dest :u32))
    1633                                 ((src :u32)
    1634                                  (val :u32)))
    1635   (rlwimi dest val 0 0 0))
    1636  
    1637 ;;; The bit number is boxed and wants to think of the least-significant bit as 0.
    1638 ;;; Imagine that.
    1639 ;;; To turn the boxed, lsb-0 bitnumber into an unboxed, msb-0 rotate count,
    1640 ;;; we (conceptually) unbox it, add arm::fixnumshift to it, subtract it from
    1641 ;;; 31, and add one.  This can also be done as "unbox and subtract from 28",
    1642 ;;; I think ...
    1643 ;;; Actually, it'd be "unbox, then subtract from 30".
    1644 #+later
    1645 (define-arm-vinsn extract-variable-non-insane-bit (((dest :u32))
    1646                                                    ((src :imm)
    1647                                                     (bit :imm))
    1648                                                    ((temp :u32)))
    1649   (srwi temp bit arm::fixnumshift)
    1650   (subfic temp temp (- 32 arm::fixnumshift))
    1651   (rlwnm dest src temp 31 31))
     1641
    16521642                                               
    16531643;;; Operations on lists and cons cells
     
    23512341      (high (:u32 #.arm::imm1))))
    23522342  (fmrrd low high source)
    2353   (str low (:@ dest (:$ arm::double-float.value))))
     2343  (strd low (:@ dest (:$ arm::double-float.value))))
    23542344
    23552345(define-arm-vinsn (get-double :predicatable)
Note: See TracChangeset for help on using the changeset viewer.