1 | ; -*- Mode:Lisp; Package:CCL; -*- |
---|
2 | ;;; |
---|
3 | ;;; Copyright (C) 2005 Clozure Associates |
---|
4 | ;;; This file is part of OpenMCL. |
---|
5 | ;;; |
---|
6 | ;;; OpenMCL is licensed under the terms of the Lisp Lesser GNU Public |
---|
7 | ;;; License , known as the LLGPL and distributed with OpenMCL as the |
---|
8 | ;;; file "LICENSE". The LLGPL consists of a preamble and the LGPL, |
---|
9 | ;;; which is distributed with OpenMCL as the file "LGPL". Where these |
---|
10 | ;;; conflict, the preamble takes precedence. |
---|
11 | ;;; |
---|
12 | ;;; OpenMCL 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 $numx8664saveregs 4) |
---|
20 | (defconstant $numx8664argregs 3) |
---|
21 | |
---|
22 | |
---|
23 | (defconstant x8664-nonvolatile-registers-mask |
---|
24 | (logior (ash 1 x8664::save0) |
---|
25 | (ash 1 x8664::save1) |
---|
26 | (ash 1 x8664::save2) |
---|
27 | (ash 1 x8664::save3))) |
---|
28 | |
---|
29 | (defconstant x8664-arg-registers-mask |
---|
30 | (logior (ash 1 x8664::arg_z) |
---|
31 | (ash 1 x8664::arg_y) |
---|
32 | (ash 1 x8664::arg_x))) |
---|
33 | |
---|
34 | (defconstant x8664-temp-registers-mask |
---|
35 | (logior (ash 1 x8664::temp0) |
---|
36 | (ash 1 x8664::temp1) |
---|
37 | (ash 1 x8664::temp2))) |
---|
38 | |
---|
39 | |
---|
40 | (defconstant x8664-tagged-registers-mask |
---|
41 | (logior x8664-temp-registers-mask |
---|
42 | x8664-arg-registers-mask |
---|
43 | x8664-nonvolatile-registers-mask)) |
---|
44 | |
---|
45 | (defmacro make-mask (&rest weights) |
---|
46 | `(logior ,@(mapcar #'(lambda (w) `(ash 1 ,w)) weights))) |
---|
47 | |
---|
48 | (defconstant x8664-temp-node-regs |
---|
49 | (make-mask x8664::temp0 |
---|
50 | x8664::temp1 |
---|
51 | x8664::temp2 |
---|
52 | x8664::arg_x |
---|
53 | x8664::arg_y |
---|
54 | x8664::arg_z)) |
---|
55 | |
---|
56 | (defconstant x8664-nonvolatile-node-regs |
---|
57 | (make-mask x8664::save0 |
---|
58 | x8664::save1 |
---|
59 | x8664::save2 |
---|
60 | x8664::save3)) |
---|
61 | |
---|
62 | |
---|
63 | (defconstant x8664-node-regs (logior x8664-temp-node-regs x8664-nonvolatile-node-regs)) |
---|
64 | |
---|
65 | (defconstant x8664-imm-regs (make-mask |
---|
66 | x8664::imm0 |
---|
67 | x8664::imm1 |
---|
68 | x8664::imm2)) |
---|
69 | |
---|
70 | (defconstant x8664-temp-fp-regs (make-mask x8664::fp0 |
---|
71 | x8664::fp1 |
---|
72 | x8664::fp2 |
---|
73 | x8664::fp3 |
---|
74 | x8664::fp4 |
---|
75 | x8664::fp5 |
---|
76 | x8664::fp6 |
---|
77 | x8664::fp7)) |
---|
78 | |
---|
79 | |
---|
80 | |
---|
81 | (defconstant x8664-cr-fields (make-mask 0)) |
---|
82 | |
---|
83 | (defconstant $undo-x86-c-frame 16) |
---|
84 | |
---|
85 | |
---|
86 | (ccl::provide "X8664ENV") |
---|