Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Carl Shapiro
cmucl
Commits
3e253985
Commit
3e253985
authored
19 years ago
by
rtoy
Browse files
Options
Downloads
Patches
Plain Diff
o Only need to save r13 and r24 because the linkage-table entry uses
that. o Add some more comments about what we're doing.
parent
680389bc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
compiler/ppc/c-call.lisp
+17
-16
17 additions, 16 deletions
compiler/ppc/c-call.lisp
with
17 additions
and
16 deletions
compiler/ppc/c-call.lisp
+
17
−
16
View file @
3e253985
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;;
;;;
(
ext:file-comment
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ppc/c-call.lisp,v 1.1
2
2005/10/2
1
0
2:41:44
rtoy Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ppc/c-call.lisp,v 1.1
3
2005/10/2
6
0
0:51:35
rtoy Exp $"
)
;;;
;;;
;;; **********************************************************************
;;; **********************************************************************
;;;
;;;
...
@@ -438,30 +438,31 @@ a pointer to the arguments."
...
@@ -438,30 +438,31 @@ a pointer to the arguments."
(
linkage-area-size
24
))
(
linkage-area-size
24
))
(
assemble
(
segment
)
(
assemble
(
segment
)
;; Save the non-volatile (callee-saved) registers. The caller
;; expects r13-r31 to be unchanged! Do we need to save the FP
;; registers too?
;;
;; FIXME: I think we should only save the registers we use
;; here, and not all of them. call_into_lisp (via funcall3)
;; should save some too because it clobbers some registers
;; before returning.
;;
;; FIXME: What about FP registers? We should probably save
;; those too.
(
let
((
sp
(
make-gpr
1
))
(
let
((
sp
(
make-gpr
1
))
(
save-gprs
(
mapcar
#'
make-gpr
'
(
13
14
15
16
17
18
19
20
(
save-gprs
(
mapcar
#'
make-gpr
'
(
13
24
))))
21
22
23
24
25
26
27
28
29
30
31
))))
;; Save the non-volatile (callee-saved) registers. The
;; registers used below are all caller-saved, so there's
;; nothing to do there. However, when we call funcall3, the
;; linkage table entry is used, which unconditionally uses
;; r13 and r24. (See lisp/ppc-arch.c.) So these need to be
;; saved. funcall3, which calls call_into_lisp, will take
;; care of saving all the remaining registers that could be
;; used.
(
let
((
save-offset
0
))
(
let
((
save-offset
0
))
;; Adjust stack pointer by a multiple of 16, to preserve
;; requirement that the stack pointer remains aligned to a
;; 16-byte boundary. (Yes, we waste some stack space
;; here.)
(
inst
addi
sp
sp
(
-
(
round-up-16
(
*
(
length
save-gprs
)
(
inst
addi
sp
sp
(
-
(
round-up-16
(
*
(
length
save-gprs
)
vm:word-bytes
))))
vm:word-bytes
))))
(
dolist
(
r
save-gprs
)
(
dolist
(
r
save-gprs
)
(
inst
stw
r
sp
save-offset
)
(
inst
stw
r
sp
save-offset
)
(
incf
save-offset
vm:word-bytes
)))
(
incf
save-offset
vm:word-bytes
)))
;; Make a new stack frame for us to hold our data
;; Make a new stack frame for us to hold our data. This is
;; maximum needed: 8 32-bit registers and 13 double-float
;; registers.
(
inst
addi
sp
sp
(
-
(
round-up-16
(
+
(
*
(
+
8
(
*
2
13
))
(
inst
addi
sp
sp
(
-
(
round-up-16
(
+
(
*
(
+
8
(
*
2
13
))
vm:word-bytes
)
vm:word-bytes
)
linkage-area-size
))))
linkage-area-size
))))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment