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
da4dbf24
Commit
da4dbf24
authored
34 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Moved the move/coerce stuff into move.lisp, so that it can go earlier in
the load/compile order, i.e. before static-fn.
parent
617060d7
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
+1
-138
1 addition, 138 deletions
compiler/mips/arith.lisp
with
1 addition
and
138 deletions
compiler/mips/arith.lisp
+
1
−
138
View file @
da4dbf24
...
...
@@ -7,7 +7,7 @@
;;; Scott Fahlman (FAHLMAN@CMUC).
;;; **********************************************************************
;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/arith.lisp,v 1.1
7
1990/05/
09
06:3
6:45
wlott Exp $
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/arith.lisp,v 1.1
8
1990/05/
11
06:3
8:00
wlott Exp $
;;;
;;; This file contains the VM definition arithmetic VOPs for the MIPS.
;;;
...
...
@@ -19,143 +19,6 @@
(
in-package
"C"
)
;;;; Moves and coercions:
;;; Move a tagged number to an untagged representation.
;;;
(
define-vop
(
move-to-signed/unsigned
)
(
:args
(
x
:scs
(
any-reg
descriptor-reg
)))
(
:results
(
y
:scs
(
signed-reg
unsigned-reg
)))
(
:temporary
(
:scs
(
non-descriptor-reg
))
temp
)
(
:generator
4
(
sc-case
x
(
any-reg
(
inst
sra
y
x
2
))
(
descriptor-reg
(
let
((
done
(
gen-label
)))
(
inst
and
temp
x
3
)
(
inst
beq
temp
done
)
(
sc-case
y
(
signed-reg
(
inst
sra
y
x
2
))
(
unsigned-reg
(
inst
srl
y
x
2
)))
(
loadw
y
x
vm:bignum-digits-offset
vm:other-pointer-type
)
(
emit-label
done
))))))
;;;
(
define-move-vop
move-to-signed/unsigned
:move
(
any-reg
descriptor-reg
)
(
signed-reg
unsigned-reg
))
;;; Move an untagged number to a tagged representation.
;;;
(
define-vop
(
move-from-signed/unsigned
)
(
:args
(
arg
:scs
(
signed-reg
unsigned-reg
)
:target
x
))
(
:results
(
y
:scs
(
any-reg
descriptor-reg
)))
(
:temporary
(
:scs
(
non-descriptor-reg
)
:from
(
:argument
0
))
x
temp
)
(
:generator
20
(
sc-case
y
(
any-reg
;; The results must be a fixnum, so we can just do the shift.
(
inst
sll
y
arg
2
))
(
descriptor-reg
;; The results might be a bignum, so we have to make sure.
(
move
x
arg
)
(
sc-case
arg
(
signed-reg
(
let
((
fixnum
(
gen-label
))
(
done
(
gen-label
)))
(
inst
sra
temp
x
29
)
(
inst
beq
temp
fixnum
)
(
inst
nor
temp
zero-tn
)
(
inst
beq
temp
done
)
(
inst
sll
y
x
2
)
(
pseudo-atomic
(
temp
)
(
inst
addu
y
alloc-tn
vm:other-pointer-type
)
(
inst
addu
alloc-tn
(
vm:pad-data-block
(
1+
vm:bignum-digits-offset
)))
(
inst
li
temp
(
logior
(
ash
1
vm:type-bits
)
vm:bignum-type
))
(
storew
temp
y
0
vm:other-pointer-type
)
(
storew
x
y
vm:bignum-digits-offset
vm:other-pointer-type
))
(
inst
b
done
)
(
inst
nop
)
(
emit-label
fixnum
)
(
inst
sll
y
x
2
)
(
emit-label
done
)))
(
unsigned-reg
(
let
((
done
(
gen-label
))
(
one-word
(
gen-label
)))
(
inst
sra
temp
x
29
)
(
inst
beq
temp
done
)
(
inst
sll
y
x
2
)
(
pseudo-atomic
(
temp
)
(
inst
addu
y
alloc-tn
vm:other-pointer-type
)
(
inst
addu
alloc-tn
(
vm:pad-data-block
(
1+
vm:bignum-digits-offset
)))
(
inst
bgez
x
one-word
)
(
inst
li
temp
(
logior
(
ash
1
vm:type-bits
)
vm:bignum-type
))
(
inst
addu
alloc-tn
(
vm:pad-data-block
1
))
(
inst
li
temp
(
logior
(
ash
2
vm:type-bits
)
vm:bignum-type
))
(
emit-label
one-word
)
(
storew
temp
y
0
vm:other-pointer-type
)
(
storew
x
y
vm:bignum-digits-offset
vm:other-pointer-type
))
(
emit-label
done
))))))))
;;;
(
define-move-vop
move-from-signed/unsigned
:move
(
signed-reg
unsigned-reg
)
(
any-reg
descriptor-reg
))
;;; Move untagged numbers.
;;;
(
define-vop
(
signed/unsigned-move
)
(
:args
(
x
:target
y
:scs
(
signed-reg
unsigned-reg
)
:load-if
(
not
(
location=
x
y
))))
(
:results
(
y
:scs
(
signed-reg
unsigned-reg
)
:load-if
(
not
(
location=
x
y
))))
(
:effects
)
(
:affected
)
(
:generator
1
(
move
y
x
)))
;;;
(
define-move-vop
signed/unsigned-move
:move
(
signed-reg
unsigned-reg
)
(
signed-reg
unsigned-reg
))
;;; Move untagged number arguments/return-values.
;;;
(
define-vop
(
move-signed/unsigned-argument
)
(
:args
(
x
:target
y
:scs
(
signed-reg
unsigned-reg
))
(
fp
:scs
(
any-reg
descriptor-reg
)
:load-if
(
not
(
sc-is
y
sap-reg
))))
(
:results
(
y
))
(
:generator
0
(
sc-case
y
((
signed-reg
unsigned-reg
)
(
move
y
x
))
((
signed-stack
unsigned-stack
)
(
storew
x
fp
(
tn-offset
y
))))))
;;;
(
define-move-vop
move-signed/unsigned-argument
:move-argument
(
descriptor-reg
any-reg
signed-reg
unsigned-reg
)
(
signed-reg
unsigned-reg
))
;;; Use standard MOVE-ARGUMENT + coercion to move an untagged number to a
;;; descriptor passing location.
;;;
(
define-move-vop
move-argument
:move-argument
(
signed-reg
unsigned-reg
)
(
any-reg
descriptor-reg
))
;;;; Unary operations.
...
...
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