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
acf75662
Commit
acf75662
authored
34 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Changed the move macro to use the move inst. Changed the internal error
stuff to record the complete sc and offset of its arguments.
parent
5e6c5f7d
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
+36
-38
36 additions, 38 deletions
compiler/mips/macros.lisp
with
36 additions
and
38 deletions
compiler/mips/macros.lisp
+
36
−
38
View file @
acf75662
...
...
@@ -7,7 +7,7 @@
;;; Scott Fahlman (FAHLMAN@CMUC).
;;; **********************************************************************
;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/macros.lisp,v 1.3
7
1990/0
7
/1
6 13:17:37
wlott Exp $
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/macros.lisp,v 1.3
8
1990/0
8
/1
2 00:45:51
wlott Exp $
;;;
;;; This file contains various useful macros for generating MIPS code.
;;;
...
...
@@ -35,9 +35,9 @@
(
once-only
((
n-dst
dst
)
(
n-src
src
))
(
if
always-emit-code-p
`
(
inst
addu
,
n-dst
,
n-src
zero-tn
)
`
(
inst
move
,
n-dst
,
n-src
)
`
(
unless
(
location=
,
n-dst
,
n-src
)
(
inst
addu
,
n-dst
,
n-src
zero-tn
)))))
(
inst
move
,
n-dst
,
n-src
)))))
(
defmacro
def-mem-op
(
op
inst
shift
load
)
`
(
defmacro
,
op
(
object
base
&optional
(
offset
0
)
(
lowtag
0
))
...
...
@@ -415,47 +415,45 @@
(
error
"Lost big. Should not be here."
)))))))
;;;;
Test-Special-Valu
e
;;;;
Error Cod
e
;;; ### We may want this.
#+
nil
(
defmacro
test-special-value
(
reg
temp
value
target
not-p
)
"Test whether Reg holds the specified special Value (T, NIL, %Trap-Object).
Temp is an unboxed register."
(
once-only
((
n-reg
reg
)
(
n-temp
temp
)
(
n-value
value
)
(
n-target
target
)
(
n-not-p
not-p
))
`
(
progn
(
inst
xiu
,
n-temp
,
n-reg
(
or
(
cdr
(
assoc
,
n-value
`
((
t
.
,
',clc::t-16
)
(
nil
.
,
',clc::nil-16
)
(
%trap-object
.
,
',clc::trap-16
))))
(
error
"Unknown special value: ~S."
,
n-value
)))
(
if
,
n-not-p
(
inst
bnb
:eq
,
n-target
)
(
inst
bb
:eq
,
n-target
)))))
(
defvar
*adjustable-vectors*
nil
)
;;;; Error Code
(
defmacro
with-adjustable-vector
((
var
)
&rest
body
)
`
(
let
((
,
var
(
or
(
pop
*adjustable-vectors*
)
(
make-array
16
:element-type
'
(
unsigned-byte
8
)
:fill-pointer
0
:adjustable
t
))))
(
setf
(
fill-pointer
,
var
)
0
)
(
unwind-protect
(
progn
,@
body
)
(
push
,
var
*adjustable-vectors*
))))
(
eval-when
(
compile
load
eval
)
(
defun
emit-error-break
(
vop
kind
code
values
)
`
((
let
((
vop
,
vop
))
(
when
vop
(
note-this-location
vop
:internal-error
)))
(
inst
break
,
kind
)
(
inst
byte
(
error-number-or-lose
',code
))
,@
(
mapcar
#'
(
lambda
(
tn
)
`
(
let
((
tn
,
tn
))
(
assert
(
eq
(
sb-name
(
sc-sb
(
tn-sc
tn
)))
'registers
))
(
inst
byte
(
tn-offset
tn
))))
values
)
(
inst
byte
0
)
(
align
vm:word-shift
))))
(
let
((
vector
(
gensym
)))
`
((
let
((
vop
,
vop
))
(
when
vop
(
note-this-location
vop
:internal-error
)))
(
inst
break
,
kind
)
;; ### Temporary compatibility marker.
(
inst
byte
255
)
(
with-adjustable-vector
(
,
vector
)
(
write-var-integer
(
error-number-or-lose
',code
)
,
vector
)
,@
(
mapcar
#'
(
lambda
(
tn
)
`
(
let
((
tn
,
tn
))
(
write-var-integer
(
make-sc-offset
(
sc-number
(
tn-sc
tn
))
(
tn-offset
tn
))
,
vector
)))
values
)
(
inst
byte
(
length
,
vector
))
(
dotimes
(
i
(
length
,
vector
))
(
inst
byte
(
aref
,
vector
i
))))
(
align
vm:word-shift
)))))
(
defmacro
error-call
(
vop
error-code
&rest
values
)
"Cause an error. ERROR-CODE is the error to cause."
...
...
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