source: trunk/source/lib/armenv.lisp @ 15111

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

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 size: 1.8 KB
Line 
1;;; -*- Mode:Lisp; Package:CCL; -*-
2;;;
3;;;   Copyright (C) 2010 Clozure Associates
4;;;   This file is part of Clozure CL. 
5;;;
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. 
11;;;
12;;;   Clozure CL is referenced in the preamble as the "LIBRARY."
13;;;
14;;;   The LLGPL is also available online at
15;;;   http://opensource.franz.com/preamble.html
16
17(in-package "CCL")
18
19(defconstant $numarmsaveregs 0)
20(defconstant $numarmargregs 3)
21
22
23(defconstant arm-nonvolatile-registers-mask
24  0)
25
26(defconstant arm-arg-registers-mask
27  (logior (ash 1 arm::arg_z)
28          (ash 1 arm::arg_y)
29          (ash 1 arm::arg_x)))
30
31(defconstant arm-temp-registers-mask
32  (logior (ash 1 arm::temp0)
33          (ash 1 arm::temp1)
34          (ash 1 arm::temp2)))
35
36
37(defconstant arm-tagged-registers-mask
38  (logior arm-temp-registers-mask
39          arm-arg-registers-mask
40          arm-nonvolatile-registers-mask))
41
42
43
44(defconstant arm-temp-node-regs 
45  (make-mask arm::temp0
46             arm::temp1
47             arm::temp2
48             arm::arg_x
49             arm::arg_y
50             arm::arg_z))
51
52(defconstant arm-nonvolatile-node-regs
53  0)
54
55
56(defconstant arm-node-regs (logior arm-temp-node-regs arm-nonvolatile-node-regs))
57
58(defconstant arm-imm-regs (make-mask
59                            arm::imm0
60                            arm::imm1
61                            arm::imm2))
62
63(defconstant arm-temp-fp-regs (1- (ash 1 14)))
64
65(defconstant arm-cr-fields (make-mask 0))
66
67                               
68
69
70
71
72(defconstant $undo-arm-c-frame 16)
73
74
75(ccl::provide "ARMENV")
Note: See TracBrowser for help on using the repository browser.