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
0ae7bb29
Commit
0ae7bb29
authored
35 years ago
by
ch
Browse files
Options
Downloads
Patches
Plain Diff
Add li and b macros. These are two of the ``synthesized'' instructions
described in the R2000 book.
parent
174719d4
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
+12
-4
12 additions, 4 deletions
compiler/mips/macros.lisp
with
12 additions
and
4 deletions
compiler/mips/macros.lisp
+
12
−
4
View file @
0ae7bb29
...
...
@@ -7,7 +7,7 @@
;;; Scott Fahlman (FAHLMAN@CMUC).
;;; **********************************************************************
;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/macros.lisp,v 1.
3
1990/02/0
3 20:54:21 wlott
Exp $
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/macros.lisp,v 1.
4
1990/02/0
6 02:49:14 ch
Exp $
;;;
;;; This file contains various useful macros for generating MIPS code.
;;;
...
...
@@ -16,13 +16,10 @@
(
in-package
"C"
)
(
defmacro
nop
()
"Emit a nop."
'
(
inst
or
zero-tn
zero-tn
zero-tn
))
(
defmacro
move
(
dst
src
)
"Move SRC into DST (unless they are already the same)."
(
once-only
((
n-dst
dst
)
...
...
@@ -30,6 +27,17 @@
`
(
unless
(
location=
,
n-dst
,
n-src
)
(
inst
or
,
n-dst
,
n-src
zero-tn
))))
(
defmacro
li
(
dst
immed
)
"Load Immediate"
(
cond
((
minusp
immed
)
`
(
inst
addi
,
dst
zero-tn
,
immed
))
(
t
`
(
inst
addiu
,
dst
zero-tn
,
immed
))))
(
defmacro
b
(
label
)
"Unconditional branch"
`
(
inst
beq
zero-tn
zero-tn
,
label
))
(
defmacro
def-mem-op
(
op
inst
shift
load
)
`
(
defmacro
,
op
(
object
base
&optional
(
offset
0
)
(
lowtag
0
))
...
...
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