Changeset 14035


Ignore:
Timestamp:
Jul 24, 2010, 11:32:50 PM (9 years ago)
Author:
gb
Message:

use movw, movt.

File:
1 edited

Legend:

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

    r14015 r14035  
    10001000  (beq :got-it)
    10011001  (cmp tag (:$ arm::tag-misc))
    1002   (mov tag (:$ arm::subtag-bignum))
    1003   (orr tag tag (:$ (ash 1 arm::num-subtag-bits)))
     1002  (movw tag (:$ arm::one-digit-bignum-header))
    10041003  (ldreq header (:@ src (:$ arm::misc-header-offset)))
    10051004  (cmpeq tag header)
     
    11311130  (uuo-error-reg-not-xtype (:? ne) src (:$ arm::xtype-u32))
    11321131  (ldr dest (:@ src (:$ arm::misc-header-offset)))
    1133   (mov temp (:$ arm::subtag-bignum))
    1134   (orr temp temp (:$ (ash 1 arm::num-subtag-bits)))
     1132  (movw temp (:$ arm::one-digit-bignum-header))
    11351133  (cmp dest temp)
    11361134  (bne :maybe-two-digit)
     
    11581156  (mov dest (:asr src (:$ arm::fixnumshift)))
    11591157  (beq :got-it)
    1160   (mov dest (:$ arm::subtag-bignum))
    1161   (orr dest dest (:$ (ash 1 arm::num-subtag-bits)))
     1158  (movw dest (:$ arm::one-digit-bignum-header))
    11621159  (cmp tag (:$ arm::tag-misc))
    11631160  (ldreq tag (:@ src (:$ arm::misc-header-offset)))
     
    16931690    (()
    16941691     ((n :s16const)))
    1695   (mov nargs (:$ (:apply ash n arm::word-shift))))
     1692  ((:pred < n 256)
     1693   (mov nargs (:$ (:apply ash n arm::word-shift))))
     1694  ((:pred >= n 256)
     1695   (movw nargs (:$ (:apply ash n arm::word-shift)))))
    16961696
    16971697(define-arm-vinsn (scale-nargs :predicatable)
     
    18021802                              ((closed (:lisp :ne dest)))
    18031803                              ((header :u32)))
    1804   (mov header (:$ arm::subtag-value-cell))
    1805   (orr header header (:$ (ash arm::value-cell.element-count arm::num-subtag-bits)))
     1804  (movw header (:$ (logior (ash arm::value-cell.element-count arm::num-subtag-bits) arm::subtag-value-cell)))
    18061805  (sub allocptr allocptr (:$ (- arm::value-cell.size arm::fulltag-misc)))
    18071806  (ldr dest (:@ rcontext (:$ arm::tcr.save-allocbase)))
     
    18171816     ((closed :lisp))
    18181817     ((header :u32)))
    1819   (mov header (:$ arm::subtag-value-cell))
    1820   (orr header header (:$ (ash arm::value-cell.element-count arm::num-subtag-bits)))
     1818  (movw header (:$ (logior (ash arm::value-cell.element-count arm::num-subtag-bits) arm::subtag-value-cell)))
    18211819  (stmdb (:! sp) (closed header))
    18221820  (add dest sp (:$ arm::fulltag-misc)))
     
    18271825     ((header (:u32 #.arm::imm0))
    18281826      (zero (:u32 #.arm::imm1))))
    1829   (mov header (:$ arm::subtag-simple-vector))
     1827  (movw header (:$ (logior (ash 3 arm::num-subtag-bits) arm::subtag-value-cell)))
    18301828  (mov zero (:$ 0))
    1831   (orr header header (:$ (ash 3 arm::num-subtag-bits)))
    18321829  ((:pred <
    18331830          (:apply %hard-regspec-value cdr)
     
    19601957    ((:and (:pred >= intval 0)
    19611958           (:pred < intval #x10000))
    1962      (mov dest (:$ (:apply logand #xff00 intval)))
    1963      ((:not (:pred = 0 (:apply logand #xff intval)))
    1964       (orr dest dest (:$ (:apply logand #xff intval)))))
     1959     (movw dest (:$ intval)))
    19651960    ((:not (:and (:pred >= intval 0)
    19661961                 (:pred < intval #x10000)))
    1967      (:data)
    1968      :const
    1969      (:word intval)
    1970      (:code)
    1971      (ldr dest :const)))))
     1962     (movw dest (:$ (:apply logand #xffff intval)))
     1963     (movt dest (:$ (:apply ldb (byte 16 16) intval)))))))
    19721964
    19731965
     
    22492241  (addsvc result temp temp)
    22502242  (bvc :done)
    2251   (mov temp (:$ arm::subtag-bignum))
    2252   (orr temp temp (:$ (ash 1 arm::num-subtag-bits)))
     2243  (movw temp (:$ arm::one-digit-bignum-header))
    22532244  (add allocptr allocptr (:$ (- arm::fulltag-misc 8)))
    22542245  (ldr result (:@ rcontext (:$ arm::tcr.save-allocbase)))
     
    23202311                                ((header-temp (:u32 #.arm::imm0))
    23212312                                 (high (:u32 #.arm::imm1))))
    2322   (mov header-temp (:$ arm::subtag-double-float))
    2323   (orr header-temp header-temp (:$ (ash arm::double-float.element-count arm::num-subtag-bits)))
     2313  (movw header-temp (:$ arm::double-float-header))
    23242314  (sub allocptr allocptr (:$ (- arm::double-float.size arm::fulltag-misc)))
    23252315  (ldr result (:@ rcontext (:$ arm::tcr.save-allocbase)))
     
    23402330                                ((fpreg :single-float))
    23412331                                ((header-temp :u32)))
    2342   (mov header-temp (:$ arm::subtag-single-float))
    2343   (orr header-temp header-temp (:$ (ash arm::single-float.element-count arm::num-subtag-bits)))
     2332  (movw header-temp (:$ arm::single-float-header))
    23442333  (sub allocptr allocptr (:$ (- arm::single-float.size arm::fulltag-misc)))
    23452334  (ldr result (:@ rcontext (:$ arm::tcr.save-allocbase)))
     
    24782467                                ((address :address))
    24792468                                ((header :u32)))
    2480   (mov header (:$ arm::subtag-macptr))
    2481   (orr header header (:$ (ash arm::macptr.element-count arm::num-subtag-bits)))
     2469  (movw header (:$ arm::macptr-header))
    24822470  (sub allocptr allocptr (:$ (- arm::macptr.size arm::fulltag-misc)))
    24832471  (ldr dest (:@ rcontext (:$ arm::tcr.save-allocbase)))
     
    24952483     ((address :address))
    24962484     ((header :u32)))
    2497   (mov header (:$ arm::subtag-macptr))
    2498   (orr header header (:$ (ash arm::macptr.element-count arm::num-subtag-bits)))
     2485  (movw header (:$ arm::macptr-header))
    24992486  (str header (:@! sp (:$ (- arm::macptr.size))))
    25002487  (mov header (:$ 0))
     
    25462533  (mov unboxed (:asr dest (:$ arm::fixnumshift)))
    25472534  (eor unboxed unboxed (:$ #xc0000000))
    2548   (mov header (:$ arm::subtag-bignum))
    2549   (orr header header (:$ (ash 1 arm::num-subtag-bits)))
     2535  (movw header (:$ arm::one-digit-bignum-header))
    25502536  (sub allocptr allocptr (:$ (- arm::dnode-size arm::fulltag-misc)))
    25512537  (ldr dest (:@ rcontext (:$ arm::tcr.save-allocbase)))
     
    27782764  (bvc :done)
    27792765  (mov unboxed (:asr dest (:$ arm::fixnumshift)))
    2780   (mov header (:$ arm::subtag-bignum))
    2781   (orr header header (:$ (ash 1 arm::num-subtag-bits)))
     2766  (movw header (:$ arm::one-digit-bignum-header))
    27822767  (eor unboxed unboxed (:$ #xc0000000))
    27832768  (sub allocptr allocptr (:$ (- arm::dnode-size arm::fulltag-misc)))
     
    28002785  (bvc target)
    28012786  (mov unboxed (:asr dest (:$ arm::fixnumshift)))
    2802   (mov header (:$ arm::subtag-bignum))
    2803   (orr header header (:$ (ash 1 arm::num-subtag-bits)))
     2787  (movw header (:$ arm::one-digit-bignum-header))
    28042788  (eor unboxed unboxed (:$ #xc0000000))
    28052789  (sub allocptr allocptr (:$ (- arm::dnode-size arm::fulltag-misc)))
     
    28472831  (bvc :done)
    28482832  (mov unboxed (:asr dest (:$ arm::fixnumshift)))
    2849   (mov header (:$ arm::subtag-bignum))
    2850   (orr header header (:$ (ash 1 arm::num-subtag-bits)))
     2833  (movw header (:$ arm::one-digit-bignum-header))
    28512834  (eor unboxed unboxed (:$ #xc0000000))
    28522835  (sub allocptr allocptr (:$ (- arm::dnode-size arm::fulltag-misc)))
     
    28692852  (bvc target)
    28702853  (mov unboxed (:asr dest (:$ arm::fixnumshift)))
    2871   (mov header (:$ arm::subtag-bignum))
    2872   (orr header header (:$ (ash 1 arm::num-subtag-bits)))
     2854  (movw header (:$ arm::one-digit-bignum-header))
    28732855  (eor unboxed unboxed (:$ #xc0000000))
    28742856  (sub allocptr allocptr (:$ (- arm::dnode-size arm::fulltag-misc)))
     
    29062888  (and dest src (:$ arm::subtag-mask)))
    29072889
    2908 ;;; Set dest (of type :s32!) to 0 iff VAL is an istruct of type TYPE
    2909 (define-arm-vinsn istruct-typep (((dest :s32))
    2910                                  ((val :lisp)
    2911                                   (type :lisp))
    2912                                  ((temp :lisp)))
    2913   (and dest val (:$ arm::tagmask))
    2914   (cmp dest (:$ arm::tag-misc))
    2915   (ldrbeq dest (:@ val (:$ arm::misc-subtag-offset)))
    2916   (cmp dest (:$ arm::subtag-istruct))
    2917   (movne dest (:$ -1))
    2918   (ldreq temp (:@ val (:$ arm::misc-data-offset)))
    2919   (subeq dest type temp))
     2890
     2891(define-arm-vinsn istruct-type (((dest :lisp))
     2892                                ((val :lisp))
     2893                                ((temp :u8)))
     2894  (and temp val (:$ arm::tagmask))
     2895  (cmp temp (:$ arm::tag-misc))
     2896  (ldrbeq temp (:@ val (:$ arm::misc-subtag-offset)))
     2897  (cmp temp (:$ arm::subtag-istruct))
     2898  (movne dest (:$ arm::nil-value))
     2899  (ldreq dest (:@ val (:$ arm::misc-data-offset))))
    29202900 
    29212901 
     
    29822962     ((w :u32))
    29832963     ((header :u32)))
    2984   (mov header (:$ arm::subtag-u32-vector))
    2985   (orr header header (:$ (ash 1 arm::num-subtag-bits)))
     2964  (movw header (:$ (logior (ash 1 arm::num-subtag-bits) arm::subtag-u32-vector)))
    29862965  (str header (:@! sp (:$ (- arm::dnode-size))))
    29872966  (str w (:@ sp (:$ 4))))
     
    29992978     ((d :double-float))
    30002979     ((header :u32)))
    3001   (mov header (:$ arm::subtag-double-float))
    3002   (orr header header (:$ (ash arm::double-float.element-count arm::num-subtag-bits)))
     2980  (movw header (:$ arm::double-float-header))
    30032981  (str header (:@! sp (:$ (- (* 2 arm::dnode-size)))))
    30042982  (fstd d (:@ sp (:$ 8))))
     
    30172995     ((s :single-float))
    30182996     ((header :u32)))
    3019   (mov header (:$ arm::subtag-single-float))
    3020   (orr header header (:$ (ash arm::single-float.element-count arm::num-subtag-bits)))
     2997  (movw header (:$ arm::single-float-header))
    30212998  (str header (:@! sp (:$ (- arm::dnode-size))))
    30222999  (fsts s (:@ sp (:$ 4))))
     
    30913068                                           ((preserve (:u32 #.arm::nargs))
    30923069                                            (temp :u32)))
    3093   (mov temp (:$ (:apply ash (:apply logand #xff n) 2)))
    3094   (orr temp temp (:$ (:apply ash (:apply logand #xff00 n) 2)))
     3070  (movw temp (:$ (:apply ash n 2)))
    30953071  (cmp nargs temp)
    30963072  (uuo-error-wrong-nargs (:? ne)))
     
    31053081                                         ((preserve (:u32 #.arm::nargs))
    31063082                                          (temp :u32)))
    3107   (mov temp (:$ (:apply ash (:apply logand #xff min) 2)))
    3108   (orr temp temp (:$ (:apply ash (:apply logand #xff00 min) 2)))
     3083  (movw temp (:$ (:apply ash min 2)))
    31093084  (cmp nargs temp)
    31103085  (uuo-error-wrong-nargs (:? lo)))
     
    31203095                                         ((preserve (:u32 #.arm::nargs))
    31213096                                          (temp :u32)))
    3122   (mov temp (:$ (:apply ash (:apply logand #xff max) 2)))
    3123   (orr temp temp (:$ (:apply ash (:apply logand #xff00 max) 2)))
     3097  (movw temp (:$ (:apply ash max 2)))
    31243098  (cmp nargs temp)
    31253099  (uuo-error-wrong-nargs (:? hi)))
     
    35323506    (((dest :lisp))
    35333507     ((code :u32const)))
    3534   (mov dest (:$ arm::subtag-character))
    3535   ((:pred logtest #xff code)
    3536    (orr dest dest (:$ (:apply ash (:apply logand code #xff) 8))))
    3537   ((:pred logtest #xff00 code)
    3538    (orr dest dest (:$ (:apply ash (:apply ldb (byte 8 8) code) 16))))
    3539   ((:pred logtest #xff000 code)
    3540    (orr dest dest (:$ (:apply ash (:apply ldb (byte 8 16) code) 24)))))
     3508  (movw dest (:$ (:apply logior (:apply ash (:apply logand code #xff) arm::charcode-shift) arm::subtag-character)))
     3509  ((:pred > code 256)
     3510   (movt dest (:$ (:apply ash code -8)))))
    35413511
    35423512
     
    35803550
    35813551(define-arm-subprim-call-vinsn (pass-multiple-values-symbol) .SPmvpasssym)
     3552
     3553(define-arm-subprim-jump-vinsn (jump-known-symbol-ool) .SPjmpsym)
     3554
     3555(define-arm-subprim-call-vinsn (call-known-symbol-ool)  .SPjmpsym)
     3556
    35823557
    35833558(define-arm-subprim-jump-vinsn (tail-call-sym-gen) .SPtcallsymgen)
Note: See TracChangeset for help on using the changeset viewer.