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
07600777
Commit
07600777
authored
35 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Initial revision
parent
e86b4304
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/mips/alloc.lisp
+72
-0
72 additions, 0 deletions
compiler/mips/alloc.lisp
with
72 additions
and
0 deletions
compiler/mips/alloc.lisp
0 → 100644
+
72
−
0
View file @
07600777
;;; -*- Package: C -*-
;;;
;;; **********************************************************************
;;; This code was written as part of the Spice Lisp project at
;;; Carnegie-Mellon University, and has been placed in the public domain.
;;; If you want to use this code or any part of Spice Lisp, please contact
;;; Scott Fahlman (FAHLMAN@CMUC).
;;; **********************************************************************
;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/alloc.lisp,v 1.1 1990/02/27 00:16:55 wlott Exp $
;;;
;;; Allocation VOPs for the MIPS port.
;;;
;;; Written by William Lott.
;;;
(
define-vop
(
list-or-list*
)
(
:args
(
things
:more
t
))
(
:temporary
(
:scs
(
descriptor-reg
)
:type
list
)
ptr
)
(
:temporary
(
:scs
(
descriptor-reg
))
temp
)
(
:temporary
(
:scs
(
descriptor-reg
)
:type
list
:to
(
:result
0
)
:target
result
)
res
)
(
:temporary
(
:scs
(
non-descriptor-reg
)
:type
random
)
ndescr
)
(
:info
num
)
(
:results
(
result
:scs
(
descriptor-reg
)))
(
:variant-vars
star
)
(
:policy
:safe
)
(
:generator
0
(
cond
((
zerop
num
)
(
move
result
null-tn
))
((
and
star
(
=
num
1
))
(
move
result
(
tn-ref-tn
things
)))
(
t
(
macrolet
((
store-car
(
tn
list
&optional
(
slot
vm:cons-car-slot
))
`
(
let
((
reg
(
sc-case
,
tn
((
any-reg
descriptor-reg
)
,
tn
)
(
zero
zero-tn
)
(
null
null-tn
)
(
control-stack
(
load-stack-tn
temp
,
tn
)
temp
))))
(
storew
reg
,
list
,
slot
vm:list-pointer-type
))))
(
let
((
cons-cells
(
if
star
(
1-
num
)
num
)))
(
pseudo-atomic
(
ndescr
)
(
inst
addiu
res
alloc-tn
vm:list-pointer-type
)
(
inst
addiu
alloc-tn
alloc-tn
(
*
(
vm:pad-data-block
vm:cons-size
)
cons-cells
)))
(
move
ptr
res
)
(
dotimes
(
i
(
1-
cons-cells
))
(
store-car
(
tn-ref-tn
things
)
ptr
)
(
setf
things
(
tn-ref-across
things
))
(
inst
addiu
ptr
ptr
(
vm:pad-data-block
vm:cons-size
))
(
storew
ptr
ptr
(
-
vm:cons-cdr-slot
(
vm:pad-data-block
vm:cons-size
))
vm:list-pointer-type
))
(
store-car
(
tn-ref-tn
things
)
ptr
)
(
cond
(
star
(
setf
things
(
tn-ref-across
things
))
(
store-car
(
tn-ref-tn
things
)
ptr
vm:cons-cdr-slot
))
(
t
(
storew
null-tn
ptr
vm:cons-cdr-slot
vm:list-pointer-type
)))
(
assert
(
null
(
tn-ref-across
things
)))
(
move
result
res
)))))))
(
define-vop
(
list
list-or-list*
)
(
:variant
nil
))
(
define-vop
(
list*
list-or-list*
)
(
:variant
t
))
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