Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Gesh
GHC
Commits
7da2408f
Commit
7da2408f
authored
25 years ago
by
Simon Marlow
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1999-12-22 10:36:34 by simonmar]
Remove more vestiges of IntAbsOp, and now unused absIntCode.
parent
7fd0e6b9
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghc/compiler/nativeGen/MachCode.lhs
+0
-67
0 additions, 67 deletions
ghc/compiler/nativeGen/MachCode.lhs
with
0 additions
and
67 deletions
ghc/compiler/nativeGen/MachCode.lhs
+
0
−
67
View file @
7da2408f
...
...
@@ -947,7 +947,6 @@ getRegister (StDouble d)
getRegister (StPrim primop [x]) -- unary PrimOps
= case primop of
IntNegOp -> trivialUCode (SUB False False g0) x
IntAbsOp -> absIntCode x
NotOp -> trivialUCode (XNOR False g0) x
FloatNegOp -> trivialUFCode FloatRep (FNEG F) x
...
...
@@ -3274,69 +3273,3 @@ chrCode x
#endif {- sparc_TARGET_ARCH -}
\end{code}
%************************************************************************
%* *
\subsubsection{Absolute value on integers}
%* *
%************************************************************************
Absolute value on integers, mostly for gmp size check macros. Again,
the argument cannot be an StInt, because genericOpt already folded
constants.
If applicable, do not fill the delay slots here; you will confuse the
register allocator.
\begin{code}
absIntCode :: StixTree -> UniqSM Register
#if alpha_TARGET_ARCH
absIntCode = panic "MachCode.absIntCode: not on Alphas"
#endif {- alpha_TARGET_ARCH -}
-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#if i386_TARGET_ARCH
absIntCode x
= getRegister x `thenUs` \ register ->
--getNewRegNCG IntRep `thenUs` \ reg ->
getUniqLabelNCG `thenUs` \ lbl ->
let
code__2 dst = let code = registerCode register dst
src = registerName register dst
in code . if isFixed register && dst /= src
then mkSeqInstrs [MOV L (OpReg src) (OpReg dst),
TEST L (OpReg dst) (OpReg dst),
JXX GE lbl,
NEGI L (OpReg dst),
LABEL lbl]
else mkSeqInstrs [TEST L (OpReg src) (OpReg src),
JXX GE lbl,
NEGI L (OpReg src),
LABEL lbl]
in
returnUs (Any IntRep code__2)
#endif {- i386_TARGET_ARCH -}
-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#if sparc_TARGET_ARCH
absIntCode x
= getRegister x `thenUs` \ register ->
getNewRegNCG IntRep `thenUs` \ reg ->
getUniqLabelNCG `thenUs` \ lbl ->
let
code = registerCode register reg
src = registerName register reg
code__2 dst = code . mkSeqInstrs [
SUB False True g0 (RIReg src) dst,
BI GE False (ImmCLbl lbl), NOP,
OR False g0 (RIReg src) dst,
LABEL lbl]
in
returnUs (Any IntRep code__2)
#endif {- sparc_TARGET_ARCH -}
\end{code}
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