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
88f6ec67
Commit
88f6ec67
authored
25 years ago
by
Julian Seward
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 2000-01-25 10:23:34 by sewardj]
Minor improvements to x86 FP fake-to-real insn translation.
parent
b539a820
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
ghc/compiler/nativeGen/PprMach.lhs
+6
-4
6 additions, 4 deletions
ghc/compiler/nativeGen/PprMach.lhs
with
6 additions
and
4 deletions
ghc/compiler/nativeGen/PprMach.lhs
+
6
−
4
View file @
88f6ec67
...
...
@@ -1006,11 +1006,13 @@ pprInstr (CALL imm)
-- Simulating a flat register set on the x86 FP stack is tricky.
-- you have to free %st(7) before pushing anything on the FP reg stack
-- so as to preclude the possibility of a FP stack overflow exception.
-- ToDo: make gpop into a single instruction, FST
pprInstr g@(GMOV src dst)
pprInstr g@(GMOV src dst)
| src == dst
= empty
| otherwise
= pprG g (hcat [gtab, gpush src 0, gsemi, gpop dst 1])
-- GLD sz addr dst ==> FFREE %st(7) ; FLDsz addr ; F
XCH
(dst+1)
; FINCSTP
-- GLD sz addr dst ==> FFREE %st(7) ; FLDsz addr ; F
STP
(dst+1)
pprInstr g@(GLD sz addr dst)
= pprG g (hcat [gtab, text "ffree %st(7) ; fld", pprSize sz, gsp,
pprAddr addr, gsemi, gpop dst 1])
...
...
@@ -1069,7 +1071,7 @@ pprInstr g@(GDIV sz src1 src2 dst)
gpush reg offset
= hcat [text "ffree %st(7) ; fld ", greg reg offset]
gpop reg offset
= hcat [text "f
xch
", greg reg offset
, gsemi, text "fincstp"
]
= hcat [text "f
stp
", greg reg offset]
bogus = text "\tbogus"
greg reg offset = text "%st(" <> int (gregno reg - 8+offset) <> char ')'
...
...
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