Ignore:
Timestamp:
Dec 5, 2011, 10:25:20 PM (8 years ago)
Author:
gb
Message:

ARM-specific changes, mostly.

When running lisp code (in almost all cases), keep the constant 0.0d0
in the d7 register (and therefore 0.0s0 in s14 and s15). We use d7 as
a vector header when saving non-volatile FPRs on the stack; we
actually only modify s14, so we now restore s14 after it's been used
this way. The value used in the header in lisp and kernel code is
loaded from PC-relative memory, which means that we no longer use
fmsr/fmdrr or similar instructions.

When starting a lisp thread or entering one via a callback, initialize
d7.

This all basically means that we can get 0.0[d|s]0 into an FPR (or
exploit the fact that it's already in one) a bit easier, and that's
generally a good thing. It's an ABI change, which means that the
FASL and image versions (for the ARM port only) changed; new binaries
are included in this commit.

The kernel changes to support the use of d7 are mostly pretty obvious.
In working on them, I noticed that "local labels" and "macro labels"
were in the same namespace, and we were only avoiding conflicts by
accident. For 10 years or so. (I also noticed that GAS doesn't fully
support PC-relative operands, so did that by hand.)

File:
1 edited

Legend:

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

    r15097 r15111  
    3636      (header :u16const))
    3737     ((d7 (:double-float #.arm::d7))))
    38   (fldd d7 (:= :header))
     38  (flds s14 (:= :header))
    3939  (fstmdbd d7 (:! arm::sp) (:apply + n 1))
     40  (fcpys single-float-zero s15)
    4041  (:data)
    4142  :header
    4243  (:word header)
    43   (:word 0)
    4444  (:code))
    4545
     
    4848     ((n :u16const))
    4949     ((d7 (:double-float #.arm::d7))))
    50   (fldmiad d7 (:! arm::sp) (:apply + n 1)))
    51 
     50  (fldmiad d7 (:! arm::sp) (:apply + n 1))
     51  (fcpys single-float-zero s15))
     52
     53(define-arm-vinsn data-section (()
     54                                ())
     55  (:data))
     56
     57(define-arm-vinsn code-section (()
     58                                ())
     59  (:code))
    5260
    5361
     
    32723280    (((dest :double-float))
    32733281     ())
    3274   (fldd dest (:= :zero))
    3275   (:data)
    3276   :zero
    3277   (:word 0)
    3278   (:word 0)
    3279   (:code))
     3282  (fcpyd dest arm::double-float-zero))
    32803283
    32813284(define-arm-vinsn (zero-single-float-register :predicatable)
    32823285    (((dest :single-float))
    32833286     ())
    3284   (flds dest (:= :zero))
    3285   (:data)
    3286   :zero
    3287   (:word 0)
    3288   (:code))
     3287  (fcpys dest arm::single-float-zero))
    32893288
    32903289(define-arm-vinsn (load-double-float-constant-from-data :predicatable)
Note: See TracChangeset for help on using the changeset viewer.