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
e1db8fe0
Commit
e1db8fe0
authored
34 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Initial revision
parent
deedfe34
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
code/pmax-vm.lisp
+41
-0
41 additions, 0 deletions
code/pmax-vm.lisp
with
41 additions
and
0 deletions
code/pmax-vm.lisp
0 → 100644
+
41
−
0
View file @
e1db8fe0
;;; -*- Package: VM -*-
;;;
;;; **********************************************************************
;;; This code was written as part of the Spice Lisp project at
;;; Carnegie-Mellon University, and has been placed in the public domain.
;;; If you want to use this code or any part of Spice Lisp, please contact
;;; Scott Fahlman (FAHLMAN@CMUC).
;;; **********************************************************************
;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/pmax-vm.lisp,v 1.1 1990/10/23 02:03:06 wlott Exp $
;;;
;;; This file contains the PMAX specific runtime stuff.
;;;
(
in-package
"VM"
)
(
export
'
(
fixup-code-object
))
(
defun
fixup-code-object
(
code
offset
fixup
kind
)
;; Currently, the only kind of fixup we can have is a lui followed by an
;; addi.
(
multiple-value-bind
(
word-offset
rem
)
(
truncate
offset
vm:word-bytes
)
(
unless
(
zerop
rem
)
(
error
"Unaligned instruction? offset=#x~X."
offset
))
(
system:without-gcing
(
let
((
sap
(
truly-the
system-area-pointer
(
%primitive
c::code-instructions
code
))))
(
ecase
kind
(
:jump
(
assert
(
zerop
(
ash
fixup
-26
)))
(
setf
(
ldb
(
byte
26
0
)
(
system:sap-ref-32
sap
word-offset
))
(
ash
fixup
-2
)))
(
:lui
(
setf
(
sap-ref-16
sap
(
*
word-offset
2
))
(
+
(
ash
fixup
-16
)
(
if
(
logbitp
15
fixup
)
1
0
))))
(
:addi
(
setf
(
sap-ref-16
sap
(
*
word-offset
2
))
(
ldb
(
byte
16
0
)
fixup
))))))))
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