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
4813e528
Commit
4813e528
authored
35 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Wrote ERROR-CALL and GENERATE-ERROR-CODE macros.
parent
83eb549e
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/macros.lisp
+30
-1
30 additions, 1 deletion
compiler/mips/macros.lisp
with
30 additions
and
1 deletion
compiler/mips/macros.lisp
+
30
−
1
View file @
4813e528
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,8 @@
;;; Scott Fahlman (FAHLMAN@CMUC).
;;; Scott Fahlman (FAHLMAN@CMUC).
;;; **********************************************************************
;;; **********************************************************************
;;;
;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/macros.lisp,v 1.2 1990/02/03 19:33:02 wlott Exp $
;;;
;;; This file contains various useful macros for generating MIPS code.
;;; This file contains various useful macros for generating MIPS code.
;;;
;;;
;;; Written by William Lott.
;;; Written by William Lott.
...
@@ -16,7 +18,6 @@
...
@@ -16,7 +18,6 @@
(
defmacro
nop
()
(
defmacro
nop
()
"Emit a nop."
"Emit a nop."
'
(
inst
or
zero-tn
zero-tn
zero-tn
))
'
(
inst
or
zero-tn
zero-tn
zero-tn
))
...
@@ -81,3 +82,31 @@
...
@@ -81,3 +82,31 @@
(
sc-case
,
n-stack
(
sc-case
,
n-stack
((
control-stack
number-stack
string-char-stack
sap-stack
)
((
control-stack
number-stack
string-char-stack
sap-stack
)
(
storew
,
n-reg
cont-tn
(
tn-offset
,
n-stack
))))))))
(
storew
,
n-reg
cont-tn
(
tn-offset
,
n-stack
))))))))
;;; Error stuff.
;;;
(
defmacro
error-call
(
error-code
&rest
values
)
(
once-only
((
n-error-code
error-code
))
`
(
progn
,@
(
collect
((
args
))
(
do
((
vals
values
(
cdr
vals
))
(
regs
register-argument-tns
(
cdr
regs
)))
((
or
(
null
vals
)
(
null
regs
))
(
if
(
null
vals
)
(
args
)
(
error
"Can't use ERROR-CALL with ~D values"
(
length
values
))))
(
args
`
(
move
,
(
car
regs
)
,
(
car
vals
)))))
(
inst
break
,
error-code
))))
(
defmacro
generate-error-code
(
node
error-code
&rest
values
)
"Generate-Error-Code Node Error-code Value*
Emit code for an error with the specified Error-Code and context Values.
Node is used for source context."
`
(
unassemble
(
assemble-elsewhere
,
node
(
let
((
start-lab
(
gen-label
)))
(
emit-label
start-lab
)
(
error-call
,
error-code
,@
values
)
start-lab
))))
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