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
a69278c9
Commit
a69278c9
authored
21 years ago
by
toy
Browse files
Options
Downloads
Patches
Plain Diff
Add support for DYNAMIC-EXTENT &REST args. Update the ALLOCATION
macro to support stack allocation.
parent
60f29be9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
compiler/sparc/call.lisp
+6
-2
6 additions, 2 deletions
compiler/sparc/call.lisp
compiler/sparc/macros.lisp
+31
-11
31 additions, 11 deletions
compiler/sparc/macros.lisp
with
37 additions
and
13 deletions
compiler/sparc/call.lisp
+
6
−
2
View file @
a69278c9
...
...
@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/sparc/call.lisp,v 1.3
2
2003/08/0
5
1
5:51:35
toy Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/sparc/call.lisp,v 1.3
3
2003/08/0
6
1
4:45:50
toy Exp $"
)
;;;
;;; **********************************************************************
;;;
...
...
@@ -1178,6 +1178,7 @@ default-value-8
(
:results
(
result
:scs
(
descriptor-reg
)))
(
:translate
%listify-rest-args
)
(
:policy
:safe
)
(
:node-var
node
)
(
:generator
20
(
move
context
context-arg
)
(
move
count
count-arg
)
...
...
@@ -1191,7 +1192,10 @@ default-value-8
(
assemble
()
;; Allocate a cons (2 words) for each item.
(
inst
sll
temp
count
1
)
(
allocation
result
temp
list-pointer-type
)
(
allocation
result
temp
list-pointer-type
:stack-p
dynamic-extent
:node
node
:temp-tn
dst
)
(
inst
b
enter
)
(
move
dst
result
)
...
...
This diff is collapsed.
Click to expand it.
compiler/sparc/macros.lisp
+
31
−
11
View file @
a69278c9
...
...
@@ -5,11 +5,11 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/sparc/macros.lisp,v 1.1
8
200
2
/0
9
/0
5
1
5:19
:50 toy Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/sparc/macros.lisp,v 1.1
9
200
3
/0
8
/0
6
1
4:45
:50 toy Exp $"
)
;;;
;;; **********************************************************************
;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/sparc/macros.lisp,v 1.1
8
200
2
/0
9
/0
5
1
5:19
:50 toy Exp $
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/sparc/macros.lisp,v 1.1
9
200
3
/0
8
/0
6
1
4:45
:50 toy Exp $
;;;
;;; This file contains various useful macros for generating SPARC code.
;;;
...
...
@@ -194,19 +194,39 @@
;; The allocated space is stored in RESULT-TN with the lowtag LOWTAG
;; applied. The amount of space to be allocated is SIZE bytes (which
;; must be a multiple of the lisp object size).
(
defmacro
allocation
(
result-tn
size
lowtag
)
;;
;; If STACK-P is given, then allocation occurs on the control stack
;; (for dynamic-extent). In this case, you MUST also specify NODE, so
;; that the appropriate compiler policy can be used, and TEMP-TN,
;; which is needed for work-space. TEMP-TN MUST be a non-descriptor
;; reg.
(
defmacro
allocation
(
result-tn
size
lowtag
&key
stack-p
node
temp-tn
)
;; We assume we're in a pseudo-atomic so the pseudo-atomic bit is
;; set. If the lowtag also has a 1 bit in the same position, we're all
;; set. Otherwise, we need to zap out the lowtag from alloc-tn, and
;; then or in the lowtag.
`
(
if
(
logbitp
(
1-
lowtag-bits
)
,
lowtag
)
(
progn
(
inst
or
,
result-tn
alloc-tn
,
lowtag
)
(
inst
add
alloc-tn
,
size
))
(
progn
(
inst
andn
,
result-tn
alloc-tn
lowtag-mask
)
(
inst
or
,
result-tn
,
lowtag
)
(
inst
add
alloc-tn
,
size
))))
`
(
cond
((
and
,
stack-p
,
node
(
policy
,
node
(
>=
speed
safety
)))
;; Stack allocation
;;
;; The control stack grows up, so round up CSP to a
;; multiple of 8 (lispobj size). Use that as the
;; allocation pointer. Then add SIZE bytes to the
;; allocation and set CSP to that, so we have the desired
;; space.
(
inst
add
,
temp-tn
csp-tn
#.
(
1-
(
expt
2
lowtag-bits
)))
(
inst
andn
,
temp-tn
#.
(
1-
(
expt
2
lowtag-bits
)))
(
inst
or
,
result-tn
,
temp-tn
,
lowtag
)
(
inst
add
csp-tn
,
temp-tn
,
size
))
(
t
;; Normal allocation to the heap.
(
if
(
logbitp
(
1-
lowtag-bits
)
,
lowtag
)
(
progn
(
inst
or
,
result-tn
alloc-tn
,
lowtag
)
(
inst
add
alloc-tn
,
size
))
(
progn
(
inst
andn
,
result-tn
alloc-tn
lowtag-mask
)
(
inst
or
,
result-tn
,
lowtag
)
(
inst
add
alloc-tn
,
size
))))))
(
defmacro
with-fixed-allocation
((
result-tn
temp-tn
type-code
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