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
17fdaff0
Commit
17fdaff0
authored
21 years ago
by
toy
Browse files
Options
Downloads
Patches
Plain Diff
Fix bad disassembly note about allocating bytes when the add
instruction didn't have an immediate arg.
parent
8cffe571
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/sparc/insts.lisp
+22
-15
22 additions, 15 deletions
compiler/sparc/insts.lisp
with
22 additions
and
15 deletions
compiler/sparc/insts.lisp
+
22
−
15
View file @
17fdaff0
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
;;;
(
ext:file-comment
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/sparc/insts.lisp,v 1.4
0
2003/0
5/14 14:28:17
toy Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/sparc/insts.lisp,v 1.4
1
2003/0
8/05 16:32:43
toy Exp $"
)
;;;
;;;
;;; **********************************************************************
;;; **********************************************************************
;;;
;;;
...
@@ -229,7 +229,7 @@ about function addresses and register values.")
...
@@ -229,7 +229,7 @@ about function addresses and register values.")
(
case
op3
(
case
op3
(
#b000000
(
#b000000
(
when
(
=
reg
rs1
)
(
when
(
=
reg
rs1
)
(
handle-add-inst
rs1
immed-val
rd
dstate
)))
(
handle-add-inst
rs1
immed-val
rd
dstate
immed-p
)))
(
#b111000
(
#b111000
(
when
(
=
reg
rs1
)
(
when
(
=
reg
rs1
)
(
handle-jmpl-inst
rs1
immed-val
rd
dstate
)))
(
handle-jmpl-inst
rs1
immed-val
rd
dstate
)))
...
@@ -250,7 +250,7 @@ about function addresses and register values.")
...
@@ -250,7 +250,7 @@ about function addresses and register values.")
(
when
sethi
(
when
sethi
(
setf
*note-sethi-inst*
(
delete
sethi
*note-sethi-inst*
)))))))
(
setf
*note-sethi-inst*
(
delete
sethi
*note-sethi-inst*
)))))))
(
defun
handle-add-inst
(
rs1
immed-val
rd
dstate
)
(
defun
handle-add-inst
(
rs1
immed-val
rd
dstate
immed-p
)
(
let*
((
sethi
(
assoc
rs1
*note-sethi-inst*
)))
(
let*
((
sethi
(
assoc
rs1
*note-sethi-inst*
)))
(
cond
(
cond
(
sethi
(
sethi
...
@@ -267,7 +267,7 @@ about function addresses and register values.")
...
@@ -267,7 +267,7 @@ about function addresses and register values.")
(
get-reg-name
rd
)
addr
)
(
get-reg-name
rd
)
addr
)
dstate
)))
dstate
)))
(
setf
*note-sethi-inst*
(
delete
sethi
*note-sethi-inst*
)))
(
setf
*note-sethi-inst*
(
delete
sethi
*note-sethi-inst*
)))
((
=
rs1
null-offset
)
(
(
and
(
=
rs1
null-offset
)
immed-p
)
;; We have an ADD %NULL, <n>, RD instruction. This is a
;; We have an ADD %NULL, <n>, RD instruction. This is a
;; reference to a static symbol.
;; reference to a static symbol.
(
disassem:maybe-note-nil-indexed-object
immed-val
(
disassem:maybe-note-nil-indexed-object
immed-val
...
@@ -275,7 +275,9 @@ about function addresses and register values.")
...
@@ -275,7 +275,9 @@ about function addresses and register values.")
((
=
rs1
alloc-offset
)
((
=
rs1
alloc-offset
)
;; ADD %ALLOC, n. This must be some allocation or
;; ADD %ALLOC, n. This must be some allocation or
;; pseudo-atomic stuff
;; pseudo-atomic stuff
(
cond
((
and
(
=
immed-val
4
)
(
=
rd
alloc-offset
)
(
cond
((
and
immed-p
(
=
immed-val
4
)
(
=
rd
alloc-offset
)
(
not
*pseudo-atomic-set*
))
(
not
*pseudo-atomic-set*
))
;; "ADD 4, %ALLOC" sets the flag
;; "ADD 4, %ALLOC" sets the flag
(
disassem:note
"Set pseudo-atomic flag"
dstate
)
(
disassem:note
"Set pseudo-atomic flag"
dstate
)
...
@@ -283,16 +285,21 @@ about function addresses and register values.")
...
@@ -283,16 +285,21 @@ about function addresses and register values.")
((
=
rd
alloc-offset
)
((
=
rd
alloc-offset
)
;; "ADD n, %ALLOC" is either allocating space or
;; "ADD n, %ALLOC" is either allocating space or
;; resetting the flag.
;; resetting the flag.
(
if
(
=
immed-val
-4
)
(
cond
(
immed-p
(
progn
(
cond
((
=
immed-val
-4
)
(
disassem:note
(
disassem:note
(
format
nil
"Reset pseudo-atomic"
)
(
format
nil
"Reset pseudo-atomic"
)
dstate
)
dstate
)
(
setf
*pseudo-atomic-set*
nil
))
(
setf
*pseudo-atomic-set*
nil
))
(
disassem:note
(
t
(
format
nil
"Allocating ~D bytes"
immed-val
)
(
disassem:note
dstate
))
(
format
nil
"Allocating ~D bytes"
immed-val
)
)))
dstate
))))
(
t
;; Some other allocation
(
disassem:note
(
format
nil
"Allocating bytes"
)
dstate
))))))
((
and
(
=
rs1
zero-offset
)
*pseudo-atomic-set*
)
((
and
(
=
rs1
zero-offset
)
*pseudo-atomic-set*
)
;; "ADD %ZERO, num, RD" inside a pseudo-atomic is very
;; "ADD %ZERO, num, RD" inside a pseudo-atomic is very
;; likely loading up a header word. Make a note to that
;; likely loading up a header word. Make a note to that
...
...
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