1 ;;;; Sparc compiler support for the new whizzy debugger
3 ;;;; This software is part of the SBCL system. See the README file for
6 ;;;; This software is derived from the CMU CL system, which was
7 ;;;; written at Carnegie Mellon University and released into the
8 ;;;; public domain. The software is in the public domain and is
9 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
10 ;;;; files for more information.
15 (:translate current-sp
)
17 (:results
(res :scs
(sap-reg)))
18 (:result-types system-area-pointer
)
22 (define-vop (current-fp-sap)
23 (:translate current-fp
)
25 (:results
(res :scs
(sap-reg)))
26 (:result-types system-area-pointer
)
31 (:translate stack-ref
)
33 (:args
(sap :scs
(sap-reg))
34 (offset :scs
(any-reg)))
35 (:arg-types system-area-pointer positive-fixnum
)
36 (:results
(result :scs
(descriptor-reg)))
39 (inst ld result sap offset
)))
42 (:translate %set-stack-ref
)
44 (:args
(sap :scs
(sap-reg))
45 (offset :scs
(any-reg))
46 (value :scs
(descriptor-reg)))
47 (:arg-types system-area-pointer positive-fixnum
*)
49 (inst st value sap offset
)))
51 (define-vop (code-from-mumble)
53 (:args
(thing :scs
(descriptor-reg)))
54 (:results
(code :scs
(descriptor-reg)))
55 (:temporary
(:scs
(non-descriptor-reg)) temp
)
56 (:variant-vars lowtag
)
58 (let ((bogus (gen-label))
60 (loadw temp thing
0 lowtag
)
61 (inst srl temp n-widetag-bits
)
64 (inst sll temp word-shift
)
65 (unless (= lowtag other-pointer-lowtag
)
66 (inst add temp
(- lowtag other-pointer-lowtag
)))
67 (inst sub code thing temp
)
69 (assemble (:elsewhere
)
72 (move code null-tn
)))))
74 (define-vop (code-from-lra code-from-mumble
)
75 (:translate lra-code-header
)
76 (:variant other-pointer-lowtag
))
78 (define-vop (code-from-function code-from-mumble
)
79 (:translate fun-code-header
)
80 (:variant fun-pointer-lowtag
))
82 (define-vop (%make-lisp-obj
)
84 (:translate %make-lisp-obj
)
85 (:args
(value :scs
(unsigned-reg) :target result
))
86 (:arg-types unsigned-num
)
87 (:results
(result :scs
(descriptor-reg)))
91 (define-vop (get-lisp-obj-address)
93 (:translate get-lisp-obj-address
)
94 (:args
(thing :scs
(descriptor-reg any-reg
) :target result
))
95 (:results
(result :scs
(unsigned-reg)))
96 (:result-types unsigned-num
)