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
610d7027
Commit
610d7027
authored
34 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Removed package qualifier from error names.
Wrote %floor as a bit at a time shift and subtract divider.
parent
e872a832
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/arith.lisp
+21
-8
21 additions, 8 deletions
compiler/mips/arith.lisp
with
21 additions
and
8 deletions
compiler/mips/arith.lisp
+
21
−
8
View file @
610d7027
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
;;; Scott Fahlman (FAHLMAN@CMUC).
;;; Scott Fahlman (FAHLMAN@CMUC).
;;; **********************************************************************
;;; **********************************************************************
;;;
;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/arith.lisp,v 1.2
2
1990/0
5/19 09:40:26
wlott Exp $
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/arith.lisp,v 1.2
3
1990/0
6/04 05:18:03
wlott Exp $
;;;
;;;
;;; This file contains the VM definition arithmetic VOPs for the MIPS.
;;; This file contains the VM definition arithmetic VOPs for the MIPS.
;;;
;;;
...
@@ -341,7 +341,7 @@
...
@@ -341,7 +341,7 @@
(
r
:scs
(
signed-reg
)))
(
r
:scs
(
signed-reg
)))
(
:result-types
*
*
)
(
:result-types
*
*
)
(
:generator
11
(
:generator
11
(
let
((
zero
(
generate-error-code
di:
division-by-zero-error
x
y
)))
(
let
((
zero
(
generate-error-code
division-by-zero-error
x
y
)))
(
inst
beq
y
zero-tn
zero
))
(
inst
beq
y
zero-tn
zero
))
(
inst
div
x
y
)
(
inst
div
x
y
)
(
inst
mflo
q
)
(
inst
mflo
q
)
...
@@ -354,7 +354,7 @@
...
@@ -354,7 +354,7 @@
(
:results
(
r
:scs
(
signed-reg
)))
(
:results
(
r
:scs
(
signed-reg
)))
(
:result-types
*
)
(
:result-types
*
)
(
:generator
10
(
:generator
10
(
let
((
zero
(
generate-error-code
di:
division-by-zero-error
x
y
)))
(
let
((
zero
(
generate-error-code
division-by-zero-error
x
y
)))
(
inst
beq
y
zero-tn
zero
))
(
inst
beq
y
zero-tn
zero
))
(
inst
div
x
y
)
(
inst
div
x
y
)
(
inst
mfhi
r
)))
(
inst
mfhi
r
)))
...
@@ -690,15 +690,28 @@
...
@@ -690,15 +690,28 @@
(
define-vop
(
bignum-floor
)
(
define-vop
(
bignum-floor
)
(
:translate
bignum::%floor
)
(
:translate
bignum::%floor
)
(
:policy
:fast-safe
)
(
:policy
:fast-safe
)
(
:args
(
a
:scs
(
unsigned-reg
))
(
:args
(
a
:scs
(
unsigned-reg
)
:target
rem
)
(
b
:scs
(
unsigned-reg
))
(
b
:scs
(
unsigned-reg
))
(
c
:scs
(
unsigned-reg
)))
(
c
:scs
(
unsigned-reg
)))
(
:temporary
(
:scs
(
unsigned-reg
))
temp
result
)
(
:results
(
quo
:scs
(
unsigned-reg
))
(
:results
(
quo
:scs
(
unsigned-reg
))
(
rem
:scs
(
unsigned-reg
)))
(
rem
:scs
(
unsigned-reg
)))
(
:generator
3
(
:generator
230
(
progn
a
b
c
quo
rem
)
(
flet
((
maybe-subtract
(
&optional
(
guess
temp
))
(
warn
"Don't know how to divide a 64 bit number by a 32 bit number."
)))
(
inst
subu
temp
guess
1
)
(
inst
and
temp
c
)
(
inst
subu
a
temp
)))
(
inst
sltu
result
a
c
)
(
maybe-subtract
result
)
(
dotimes
(
i
32
)
(
inst
sll
a
1
)
(
inst
srl
temp
b
31
)
(
inst
or
a
temp
)
(
inst
sll
b
1
)
(
inst
sltu
temp
a
c
)
(
maybe-subtract
)))
(
inst
nor
quo
result
)
(
move
rem
a
)))
(
define-vop
(
signify-digit
)
(
define-vop
(
signify-digit
)
(
:translate
bignum::%fixnum-digit-with-correct-sign
)
(
:translate
bignum::%fixnum-digit-with-correct-sign
)
...
...
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