source: trunk/source/level-1/arm-callback-support.lisp @ 15751

Last change on this file since 15751 was 15425, checked in by gb, 8 years ago

armcl. armcl.image: new binaries
compiler/ARM/arm-arch.lisp: add tcr.architecture-version. Bump fasl version,

image version.

compiler/ARM/arm-asm.lisp: don't define ARMv7-specific instructions.
compiler/ARM/arm-lap.lisp: new :opcode directive, assembles arbitrary word

in code section.

compiler/ARM/arm-lapmacros.lisp: don't use v7-specific instructions. Define

clrex, dmb as macros which test architecture version at runtime. Remove
some unused things.

compiler/ARM/arm-vinsns.lisp: don't use v7-specific instructions. Remove

some more unused things.

compiler/ARM/arm2.lisp: Remove still more unused things.
level-0/ARM/arm-bignum.lisp: don't use v7-specific instructions.
level-0/l0-cfm-support.lisp: hack to try to avoid treating dynamic linker

as a shared library on Linux. (Different dynamic linkers are used for
softfp/hard float on ARM; we don't a saved image to try to re-open the
wrong one.

level-1/arm-callback-support.lisp: don't use movw instruction in callback


lisp-kernel/arm-asmutils.s: don't use v7-specific instructions (unless we're

sure that we're on v7 or later.)

lisp-kernel/arm-constants.h: tcr.architecture_version. Bump image version.

Define ARM CPU architecture constants.

lisp-kernel/arm-constants.s: tcr.architecture_version.
lisp-kernel/arm-macros.s: define _clrex and _dmb macros which test

tcr.arm_architecture_version at runtime.

lisp-kernel/arm-spentry.s: use _clrex macro. In _SPcheck_fpu_exception,

look for offending instuction 4 bytes further before lr (change in
subprim call mechanism.)

lisp-kernel/linuxarm/Makefile: compile/assemble for ARMv6.
lisp-kernel/lisp_globals.s: don't need to define NUM_LISP_GLOBALS anymore.
lisp-kernel/pmcl-kernel.c: check_arm_cpu() accepts ARMv6 or later.
lisp-kernel/thread-manager.c: when creating a TCR on ARM, set

tcr.architecture_version to fixnum representation of architecture - 7 (so
ARMv6 is -1, ARMv7 is 0, etc.)

File size: 1.7 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 16)))
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 (:$ ??))))
28            (%get-unsigned-long p 4)
29            (dpb (ldb (byte 8 8) index)
30                 (byte 8 0)
31                 (dpb 12 (byte 4 8)
32                      (arm-lap-word (orr r12 r12  (:$ ??)))))
33            (%get-unsigned-long p 8)
34            (arm-lap-word (ldr pc (:@ pc (:$ -4))))
35            (%get-unsigned-long p 12)
36            (%lookup-subprim-address #.(subprim-name->offset '.SPeabi-callback)))
37      (ff-call (%kernel-import #.arm::kernel-import-makedataexecutable) 
38               :address p 
39               :unsigned-fullword 16
40               :void)
41      p)))
Note: See TracBrowser for help on using the repository browser.