Changeset 14472


Ignore:
Timestamp:
Dec 8, 2010, 7:55:48 PM (8 years ago)
Author:
gb
Message:

lisp-kernel/linuxarm/Makefile: just use -mfpu=vfp (not vfpv2) in ASFLAGS.

lisp-kernel/arm-gc: in mark_xp(), if lr points to word of 0 (which we
don't think of as a valid instruction, even though it's a harmless
NOP), assume that it's pointing at the pad word of a DOUBLE-FLOAT or
DOUBLE-FLOAT-VECTOR and mark the vector. (This lets us use fldd to
access a double-float without using GPRs.)

lib/ffi-linuxarm: typo fix from Ivan Shvedunov.

compiler/vinsn.lisp: new :sets-lr vinsn attribute

compiler/ARM/arm-vinsns: several fixes from Ivan Shvedunov; use fldd/fstd
via LR where possible.

Location:
trunk/source
Files:
5 edited

Legend:

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

    r14340 r14472  
    669669      (src :address)
    670670      (index :s16const))
    671      ((low (:u32 #.arm::imm0))
    672       (high (:u32 #.arm::imm1))
    673       (addr (:u32 #.arm::imm2))))       ; addr should be :address
     671     ((addr :u32)))
    674672  (add addr src (:$ index))
    675   (fmrrd low high src)
    676   (strd low (:@ addr (:$ 0))))
     673  (fstd src (:@ addr (:$ 0))))
    677674
    678675(define-arm-vinsn (mem-set-double-float :predicatable)
     
    681678      (src :address)
    682679      (index :s32))                     
    683      ((low (:u32 #.arm::imm0))
    684       (high (:u32 #.arm::imm1))
    685       (addr (:u32 #.arm::imm2))))       ; addr should be :address
     680     ((addr :u32)))
    686681  (add addr src index)
    687   (fmrrd low high src)
    688   (strd low (:@ addr (:$ 0))))
     682  (fstd src (:@ addr (:$ 0))))
    689683
    690684(define-arm-vinsn (mem-ref-c-single-float :predicatable)
     
    710704      (index :s16const))
    711705     ((temp :u32)))
    712   (fmrs temp src)
     706  (fmrs temp val)
    713707  (str temp (:@ src (:$ index))))
    714708
     
    719713      (index :s32))
    720714     ((temp :u32)))
    721   (fmrs temp src)
    722   (str temp (:@ src (:$ index))))
     715  (fmrs temp val)
     716  (str temp (:@ src  index)))
    723717
    724718
     
    22112205     ((val :s8))
    22122206     ())
    2213   (mov result (:lsr val (:$ 24)))
    2214   (mov result (:asr val (:$ (- 24 arm::fixnumshift)))))
     2207  (mov result (:lsl val (:$ 24)))
     2208  (mov result (:asr result (:$ (- 24 arm::fixnumshift)))))
    22152209
    22162210
     
    23572351  (strd low (:@ dest (:$ arm::double-float.value))))
    23582352
    2359 (define-arm-vinsn (get-double :predicatable)
     2353(define-arm-vinsn (get-double :predicatable :sets-lr)
    23602354    (((target :double-float))
    2361      ((source :lisp))
    2362      ((low (:u32 #.arm::imm0))
    2363       (high (:u32 #.arm::imm1))))
    2364   (ldrd low (:@ source (:$ arm::double-float.value)))
    2365   (fmdrr target low high))
     2355     ((source :lisp)))
     2356  (add lr source (:$ arm::double-float.pad))
     2357  (fldd target (:@ lr (:$ (- arm::double-float.value arm::double-float.pad)))))
    23662358
    23672359;;; Extract a double-float value, typechecking in the process.
     
    23692361;;; instead of replicating it ..
    23702362
    2371 (define-arm-vinsn get-double? (((target :double-float))
    2372                                ((source :lisp))
    2373                                ((low (:u32 #.arm::imm0))
    2374                                 (high (:u32 #.arm::imm1))))
    2375   (and low source (:$ arm::tagmask))
    2376   (cmp low (:$ arm::tag-misc))
    2377   (ldrbeq low (:@ source (:$ arm::misc-subtag-offset)))
    2378   (cmp imm0 (:$ arm::subtag-double-float))
     2363(define-arm-vinsn (get-double? :sets-lr)
     2364    (((target :double-float))
     2365     ((source :lisp))
     2366     ((tag :u8)))
     2367  (and tag source (:$ arm::tagmask))
     2368  (cmp tag (:$ arm::tag-misc))
     2369  (ldrbeq tag (:@ source (:$ arm::misc-subtag-offset)))
     2370  (cmp tag (:$ arm::subtag-double-float))
    23792371  (uuo-error-reg-not-xtype (:? ne) source (:$ arm::subtag-double-float))
    2380   (ldrd imm0 (:@ source (:$ arm::double-float.value)))
    2381   (fmdrr target imm0 imm1))
     2372  (add lr source (:$ arm::double-float.pad))
     2373  (fldd target (:@ lr (:$ (- arm::double-float.value arm::double-float.pad)))))
    23822374 
    23832375
  • trunk/source/compiler/vinsn.lisp

    r14258 r14472  
    265265    :sp
    266266    :predicatable                       ; all instructions can be predicated, no instructions set or test condition codes.
     267    :sets-lr                            ; uses the link register, if there is one.
    267268    ))
    268269
  • trunk/source/lib/ffi-linuxarm.lisp

    r14119 r14472  
    148148                                      (cond ((<= bits 8)
    149149                                             (if signed
    150                                                '%get-signed-byte '
     150                                               '%get-signed-byte
    151151                                               '%get-unsigned-byte))
    152152                                            ((<= bits 16)
  • trunk/source/lisp-kernel/arm-gc.c

    r14366 r14472  
    10061006{
    10071007  natural *regs = (natural *) xpGPRvector(xp);
     1008  LispObj lr_value;
    10081009
    10091010  int r;
     
    10251026
    10261027  mark_pc_root(ptr_to_lispobj(xpPC(xp)));
    1027   mark_pc_root(ptr_to_lispobj(xpLR(xp)));
    1028 
    1029 
     1028  lr_value = ptr_to_lispobj(xpLR(xp));
     1029  if (*((LispObj *)lr_value) == 0) { /* pointing into a double-float */
     1030    mark_root(untag(lr_value)+fulltag_misc);
     1031  } else {
     1032    mark_pc_root(lr_value);
     1033  }
    10301034}
    10311035
  • trunk/source/lisp-kernel/linuxarm/Makefile

    r14391 r14472  
    2222AS = as
    2323M4 = m4
    24 ASFLAGS = -mfpu=vfpv2
     24ASFLAGS = -mfpu=vfp
    2525M4FLAGS = -DLINUX -DARM
    2626CDEFINES = -DLINUX -DARM -D_REENTRANT -D_GNU_SOURCE -DUSE_FUTEX -DSVN_REVISION=$(SVN_REVISION)
Note: See TracChangeset for help on using the changeset viewer.