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
0840231a
Commit
0840231a
authored
32 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Fixed costs of binary arith vops. They were way out to lunch, resulting in
the compiler making silly choices about which vop to use.
parent
7aca7044
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/mips/arith.lisp
+11
-14
11 additions, 14 deletions
compiler/mips/arith.lisp
with
11 additions
and
14 deletions
compiler/mips/arith.lisp
+
11
−
14
View file @
0840231a
...
...
@@ -7,11 +7,11 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;;
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/arith.lisp,v 1.4
7
1992/08/
04 14:10:53
wlott Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/arith.lisp,v 1.4
8
1992/08/
16 19:35:26
wlott Exp $"
)
;;;
;;; **********************************************************************
;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/arith.lisp,v 1.4
7
1992/08/
04 14:10:53
wlott Exp $
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/arith.lisp,v 1.4
8
1992/08/
16 19:35:26
wlott Exp $
;;;
;;; This file contains the VM definition arithmetic VOPs for the MIPS.
;;;
...
...
@@ -127,21 +127,21 @@
(
:args
(
x
:target
r
:scs
(
any-reg
))
(
y
:target
r
:scs
(
any-reg
)))
(
:translate
,
translate
)
(
:generator
,
cost
(
:generator
,
(
1+
cost
)
(
inst
,
op
r
x
y
)))
(
define-vop
(
,
(
symbolicate
"FAST-"
translate
"/SIGNED=>SIGNED"
)
fast-signed-binop
)
(
:args
(
x
:target
r
:scs
(
signed-reg
))
(
y
:target
r
:scs
(
signed-reg
)))
(
:translate
,
translate
)
(
:generator
,
untagged-cost
(
:generator
,
(
1+
untagged-cost
)
(
inst
,
op
r
x
y
)))
(
define-vop
(
,
(
symbolicate
"FAST-"
translate
"/UNSIGNED=>UNSIGNED"
)
fast-unsigned-binop
)
(
:args
(
x
:target
r
:scs
(
unsigned-reg
))
(
y
:target
r
:scs
(
unsigned-reg
)))
(
:translate
,
translate
)
(
:generator
,
untagged-cost
(
:generator
,
(
1+
untagged-cost
)
(
inst
,
op
r
x
y
)))
(
define-vop
(
,
(
symbolicate
"FAST-"
translate
"-C/FIXNUM=>FIXNUM"
)
fast-fixnum-c-binop
)
...
...
@@ -162,14 +162,14 @@
(
:generator
,
untagged-cost
(
inst
,
op
r
x
y
)))))
(
define-binop
+
2
6
addu
(
signed-byte
14
)
(
signed-byte
16
))
(
define-binop
-
2
6
subu
(
define-binop
+
1
5
addu
(
signed-byte
14
)
(
signed-byte
16
))
(
define-binop
-
1
5
subu
(
integer
#.
(
-
(
1-
(
ash
1
14
)))
#.
(
ash
1
14
))
(
integer
#.
(
-
(
1-
(
ash
1
16
)))
#.
(
ash
1
16
)))
(
define-binop
logior
1
2
or
(
unsigned-byte
14
)
(
unsigned-byte
16
))
(
define-binop
lognor
1
2
nor
(
unsigned-byte
14
)
(
unsigned-byte
16
))
(
define-binop
logand
1
2
and
(
unsigned-byte
14
)
(
unsigned-byte
16
))
(
define-binop
logxor
1
2
xor
(
unsigned-byte
14
)
(
unsigned-byte
16
))
(
define-binop
logior
1
3
or
(
unsigned-byte
14
)
(
unsigned-byte
16
))
(
define-binop
lognor
1
3
nor
(
unsigned-byte
14
)
(
unsigned-byte
16
))
(
define-binop
logand
1
3
and
(
unsigned-byte
14
)
(
unsigned-byte
16
))
(
define-binop
logxor
1
3
xor
(
unsigned-byte
14
)
(
unsigned-byte
16
))
;;; Special case fixnum + and - that trap on overflow. Useful when we don't
;;; know that the result is going to be a fixnum.
...
...
@@ -391,9 +391,6 @@
(
inst
mfhi
r
)))
;;;; Binary conditional VOPs:
...
...
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