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
dc654f24
Commit
dc654f24
authored
34 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Added defenum and pad-data-block, 'cause they got left out before. Changed
target-byte-order to (backend-byte-order *backend*).
parent
36846939
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
compiler/mips/macros.lisp
+35
-2
35 additions, 2 deletions
compiler/mips/macros.lisp
with
35 additions
and
2 deletions
compiler/mips/macros.lisp
+
35
−
2
View file @
dc654f24
...
...
@@ -7,7 +7,7 @@
;;; Scott Fahlman (FAHLMAN@CMUC).
;;; **********************************************************************
;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/macros.lisp,v 1.4
0
1990/11/0
3 03:25:35
wlott Exp $
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/macros.lisp,v 1.4
1
1990/11/0
7 13:16:23
wlott Exp $
;;;
;;; This file contains various useful macros for generating MIPS code.
;;;
...
...
@@ -87,7 +87,7 @@
(
once-only
((
n-target
target
)
(
n-source
source
)
(
n-offset
offset
))
(
ecase
vm:target
-byte-order
(
ecase
(
backend
-byte-order
*backend*
)
(
:little-endian
`
(
inst
lbu
,
n-target
,
n-source
,
n-offset
))
(
:big-endian
...
...
@@ -507,6 +507,7 @@
(
cerror-call
,
vop
,
continue
,
error-code
,@
values
)
,
error
)))))
;;; PSEUDO-ATOMIC -- Handy macro for making sequences look atomic.
;;;
(
defmacro
pseudo-atomic
((
ndescr-temp
)
&rest
forms
)
...
...
@@ -521,3 +522,35 @@
(
inst
nop
)
(
inst
break
vm:pending-interrupt-trap
)
(
emit-label
,
label
))))
;;;; Other random macros.
(
defmacro
pad-data-block
(
words
)
`
(
logandc2
(
+
(
ash
,
words
vm:word-shift
)
lowtag-mask
)
lowtag-mask
))
(
defmacro
defenum
((
&key
(
prefix
""
)
(
suffix
""
)
(
start
0
)
(
step
1
))
&rest
identifiers
)
(
let
((
results
nil
)
(
index
0
)
(
start
(
eval
start
))
(
step
(
eval
step
)))
(
dolist
(
id
identifiers
)
(
when
id
(
multiple-value-bind
(
root
docs
)
(
if
(
consp
id
)
(
values
(
car
id
)
(
cdr
id
))
(
values
id
nil
))
(
push
`
(
defconstant
,
(
intern
(
concatenate
'simple-string
(
string
prefix
)
(
string
root
)
(
string
suffix
)))
,
(
+
start
(
*
step
index
))
,@
docs
)
results
)))
(
incf
index
))
`
(
eval-when
(
compile
load
eval
)
,@
(
nreverse
results
))))
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