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
a0d2e969
Commit
a0d2e969
authored
34 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Fixed it so that we absolutly don't read any extra words to keep from
getting a segv when at the end of a page.
parent
810360cb
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
assembly/mips/bit-bash.lisp
+42
-23
42 additions, 23 deletions
assembly/mips/bit-bash.lisp
with
42 additions
and
23 deletions
assembly/mips/bit-bash.lisp
+
42
−
23
View file @
a0d2e969
...
...
@@ -100,12 +100,16 @@
(
defmacro
wide-copy
()
'
(
let
((
aligned
(
gen-label
)))
;; Check to see if they are aligned.
(
inst
beq
src-bit-offset
dst-bit-offset
aligned
)
(
inst
nop
)
;; Calc src-shift
(
inst
subu
src-shift
dst-offset
src-offset
)
(
inst
and
src-shift
(
fixnum
31
))
(
macrolet
((
get-src
(
)
'
(
progn
((
middle
(
&rest
before-last-inst
)
`
(
progn
(
inst
lw
ntemp1
src
)
(
inst
lw
ntemp2
src
4
)
(
inst
addu
src
4
)
...
...
@@ -113,22 +117,39 @@
(
inst
sll
ntemp2
ntemp2
ntemp3
)
(
inst
subu
ntemp3
zero-tn
ntemp3
)
(
inst
srl
ntemp1
ntemp1
ntemp3
)
(
inst
or
ntemp1
ntemp2
))))
;; Possibly fix src if we need to get bits from the previous word.
(
inst
sltu
ntemp1
src-bit-offset
dst-bit-offset
)
(
inst
sll
ntemp1
2
)
(
inst
subu
src
ntemp1
)
;; Calc src-shift
(
inst
subu
src-shift
dst-offset
src-offset
)
(
inst
and
src-shift
(
fixnum
31
))
,@
before-last-inst
(
inst
or
ntemp1
ntemp2
)))
(
get-src
(
where
)
(
ecase
where
(
:left
'
(
let
((
dont-load
(
gen-label
))
(
done-load
(
gen-label
)))
(
inst
sltu
ntemp1
src-bit-offset
dst-bit-offset
)
(
inst
bne
ntemp1
dont-load
)
(
middle
(
inst
b
done-load
))
(
emit-label
dont-load
)
(
inst
sra
ntemp3
src-shift
2
)
(
inst
sll
ntemp1
ntemp3
)
(
emit-label
done-load
)))
(
:middle
'
(
middle
))
(
:right
'
(
let
((
dont-load
(
gen-label
))
(
done-load
(
gen-label
)))
(
inst
sltu
ntemp1
src-shift
final-bits
)
(
inst
beq
ntemp1
dont-load
)
(
middle
(
inst
b
done-load
))
(
emit-label
dont-load
)
(
inst
sra
ntemp3
src-shift
2
)
(
inst
subu
ntemp3
zero-tn
ntemp3
)
(
inst
srl
ntemp1
ntemp3
)
(
emit-label
done-load
))))))
(
wide-copy-aux
)
(
inst
b
done
)
(
inst
nop
))
(
macrolet
((
get-src
()
((
get-src
(
where
)
(
declare
(
ignore
where
))
'
(
progn
(
inst
lw
ntemp1
src
)
(
inst
addu
src
4
))))
...
...
@@ -144,7 +165,7 @@
(
inst
beq
dst-bit-offset
left-aligned
)
(
inst
nop
)
(
get-src
)
(
get-src
:left
)
(
inst
li
ntemp3
(
make-fixup
"bit_bash_low_masks"
:foreign
))
(
inst
addu
ntemp3
dst-bit-offset
)
(
inst
lw
ntemp3
ntemp3
)
...
...
@@ -162,13 +183,11 @@
(
inst
and
final-bits
(
fixnum
31
))
(
inst
subu
ntemp1
length
final-bits
)
(
inst
srl
ntemp1
7
)
(
inst
beq
ntemp1
check-right
)
(
inst
sll
interior
ntemp1
2
)
(
inst
beq
interior
check-right
)
(
inst
nop
)
(
emit-label
loop
)
(
get-src
)
(
get-src
:middle
)
(
inst
sw
ntemp1
dst
)
(
check-for-interrupts
)
(
inst
subu
interior
4
)
...
...
@@ -179,7 +198,7 @@
(
inst
beq
final-bits
done
)
(
inst
nop
)
(
get-src
)
(
get-src
:right
)
(
inst
li
ntemp3
(
make-fixup
"bit_bash_low_masks"
:foreign
))
(
inst
addu
ntemp3
final-bits
)
(
inst
lw
ntemp3
ntemp3
)
...
...
@@ -308,10 +327,10 @@
(
inst
subu
src
src-arg
vm:other-pointer-type
)
(
inst
subu
dst
dst-arg
vm:other-pointer-type
)
(
macrolet
((
check-for-interrupt
()
'
(
let
((
label
(
(
gen-label
)))
)
((
check-for-interrupt
s
()
'
(
let
((
label
(
gen-label
)))
(
inst
and
ntemp1
flags-tn
(
ash
1
interrupted-flag
))
(
inst
b
n
e
ntemp1
label
)
(
inst
be
q
ntemp1
label
)
(
inst
nop
)
(
inst
subu
src
src-arg
)
(
inst
subu
dst
dst-arg
)
...
...
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