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
2b0167c6
Commit
2b0167c6
authored
33 years ago
by
ram
Browse files
Options
Downloads
Patches
Plain Diff
Moved WITH-FP-TEMP here.
parent
6ccbeb7d
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/rt/macros.lisp
+26
-0
26 additions, 0 deletions
compiler/rt/macros.lisp
with
26 additions
and
0 deletions
compiler/rt/macros.lisp
+
26
−
0
View file @
2b0167c6
...
...
@@ -492,3 +492,29 @@
(
inst
bc
:eq
,
label
)
(
inst
break
pending-interrupt-trap
)
(
emit-label
,
label
))))
;;;; Float stuff:
;;;
;;; Since moving between memory and a FP register reqires *two* temporaries,
;;; we need a special temporary to form the magic address we store to do a
;;; floating point operation. We get this temp by always spilling NL0 on the
;;; number stack. This appears rather grody, but actually the 68881 is so slow
;;; compared to the ROMP that this overhead is not very great.
;;;
;;; Note: The RT interrupt handler preserves 64 bytes beyond the current stack
;;; pointer, so we don't need to dink the stack pointer. We can just use the
;;; space beyond it.
;;;
;;; We also use LIP to form the address of the data location that we are
;;; reading or writing.
(
defvar
*in-with-fp-temp*
nil
)
(
defmacro
with-fp-temp
((
var
)
&body
body
)
`
(
if
*in-with-fp-temp*
(
error
"Can only have one FP temp."
)
(
let
((
,
var
nl0-tn
)
(
*in-with-fp-temp*
t
))
(
storew
,
var
nsp-tn
-1
)
(
multiple-value-prog1
(
progn
,@
body
)
(
loadw
,
var
nsp-tn
-1
)))))
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