source: branches/arm/level-1/arm-callback-support.lisp @ 13889

Last change on this file since 13889 was 13889, checked in by gb, 9 years ago

arm-arch.lisp: We don't have a tcr.ts-area on ARM (or a
...). We do have a tcr.last-lisp-frame, and now have a (dummy)

arm-asm.lisp: add umull, umulls; a few fixes.

arm-disassemble.lisp: extract-arm-fpaddr-operand, fix in

arm-vinsns.lisp: fix alloc-eabi-c-frame. Add vinsns to return FP ffi results.
Handle > 255 args.

arm2.lisp: Handle > 255 args. Fix some cases involving comparisons to
integer constants. Don't do the "alternate tail call" thing
unless/until we can remember what it means (it's basically a way of skipping
saving/restoring NVRs on tail calls) and how that'd apply to the ARM.
Plausible-looking FF-call, for now.

arm-bignum.lisp: add missing functions.

arm-float.lisp: skeletal FP ffi exception stuff.


arm-numbers.lisp: %FIXNUM-TRUNCATE.

arm-pred.lisp: EQUAL doesn't want to funcall the value cell of 'EQL.

l0-bignum32.lisp: no Karatsuba multiplication on ARM, for now.

arm-callback-support.lisp: MAKE-CALLBACK-TRAMPOLINE.

arm-error-sigal.lisp: (empty) %XERR-DISP callback.

arm-thread-utils.lisp: some support for BOGUS-THING-P.

arm-trap-support.lisp: (empty) XCMAIN callback.

l1-clos-boot.lisp: really remove #+arm-target dbg trap from

l1-lisp-threads.lisp: %INIT-THREAD-FROM-TCR: no tstack on ARM.

l1-strams.lisp: handle ARM tagging in MAKE-HEAP-IVECTOR.

arm-macros.s: set catch frame header to the right type.

arm-spentry.s: get _SPthrow working. Zero the stack block in
_SPmakestackblock0. Handle stack-allocation limits correctly
in _SPstack_cons_rest_arg. Add (but don't implement) _SPeabi_callback.

Loads all fasls, prints a prompt, and then gets lost in STREAM-PEEK-CHAR.

File size: 1.5 KB
1;;;-*-Mode: LISP; Package: CCL -*-
3;;;   Copyright (C) 2010 Clozure Associates
4;;;   This file is part of Clozure CL. 
6;;;   Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
7;;;   License , known as the LLGPL and distributed with Clozure CL as the
8;;;   file "LICENSE".  The LLGPL consists of a preamble and the LGPL,
9;;;   which is distributed with Clozure CL as the file "LGPL".  Where these
10;;;   conflict, the preamble takes precedence. 
12;;;   Clozure CL is referenced in the preamble as the "LIBRARY."
14;;;   The LLGPL is also available online at
17(in-package "CCL")
19(defun make-callback-trampoline (index &optional info)
20  (declare (ignore info))
21  (let* ((p (%allocate-callback-pointer 12)))
22    (macrolet ((arm-lap-word (instruction-form)
23                 (uvref (uvref (compile nil `(lambda (&lap 0) (arm-lap-function () ((?? 0)) ,instruction-form))) 1) 0)))
24      (setf (%get-unsigned-long p 0)
25            (dpb (ldb (byte 8 0) index)
26                 (byte 8 0)
27                 (arm-lap-word (mov r12 (:$ 0))))
28            (%get-unsigned-byte p 4)
29            (dpb (ldb (byte 8 8) index)
30                 (byte 8 0)
31                 (arm-lap-word (orr r12 r12 (:$ #xff00))))
32            (%get-unsigned-long p 8)
33            (arm-lap-word (ba .SPeabi-callback)))
34            (ff-call (%kernel-import #.arm::kernel-import-makedataexecutable) 
35               :address p 
36               :unsigned-fullword 12
37               :void)
38      p)))
Note: See TracBrowser for help on using the repository browser.