Changeset 14485 for release


Ignore:
Timestamp:
Dec 15, 2010, 5:35:32 PM (9 years ago)
Author:
rme
Message:

Merge ARM FFI fixes from trunk.

Location:
release/1.6/source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • release/1.6/source

  • release/1.6/source/compiler/ARM/arm-vinsns.lisp

    r14340 r14485  
    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
  • release/1.6/source/compiler/vinsn.lisp

    r14258 r14485  
    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
  • release/1.6/source/level-0/ARM/arm-def.lisp

    r14181 r14485  
    407407               (:unsigned-fullword (%get-unsigned-long result 0))
    408408               (:signed-fullword (%get-signed-long result 0))
    409                (:unsigned-doubleword (%get-natural result 0))
    410                (:signed-doubleword (%get-signed-natural result 0))
     409               (:unsigned-doubleword (%%get-unsigned-longlong result 0))
     410               (:signed-doubleword (%%get-signed-longlong result 0))
    411411               (:single-float (%get-single-float result 0))
    412412               (:double-float (%get-double-float result 0))))))))))
  • release/1.6/source/lib/ffi-linuxarm.lisp

    r14119 r14485  
    120120                            ((typep argtype 'foreign-single-float-type)
    121121                             (setq nextoffset (+ offset 4))
    122                              '%get-single-float-from-double-ptr)
     122                             '%get-single-float)
    123123                            ((typep argtype 'foreign-double-float-type)
    124124                             (when (logtest offset 4)
     
    148148                                      (cond ((<= bits 8)
    149149                                             (if signed
    150                                                '%get-signed-byte '
     150                                               '%get-signed-byte
    151151                                               '%get-unsigned-byte))
    152152                                            ((<= bits 16)
     
    167167                  (setq offset nextoffset))))))))
    168168
     169
    169170(defun arm-linux::generate-callback-return-value (stack-ptr fp-args-ptr result return-type struct-return-arg)
    170171  (declare (ignore fp-args-ptr))
     
    182183                (:signed-doubleword '%%get-signed-longlong)
    183184                (:unsigned-doubleword '%%get-unsigned-longlong)
    184                 ((:double-float :single-float) '%get-double-float)
     185                (:double-float '%get-double-float)
     186                (:single-float '%get-single-float)
     187                (:unsigned-fullword '%get-unsigned-long)
    185188                (t '%get-long)) ,stack-ptr ,offset) ,result))))
    186189     
  • release/1.6/source/lisp-kernel/arm-gc.c

    r14381 r14485  
    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
  • release/1.6/source/lisp-kernel/linuxarm/Makefile

    r14393 r14485  
    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.