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
dffc2db2
Commit
dffc2db2
authored
27 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1997-09-03 23:49:16 by sof]
When doing -monly-x-regs, fix up entry and exit from PerformGC_wrapper
parent
194eebc9
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghc/driver/ghc-asm.lprl
+20
-1
20 additions, 1 deletion
ghc/driver/ghc-asm.lprl
with
20 additions
and
1 deletion
ghc/driver/ghc-asm.lprl
+
20
−
1
View file @
dffc2db2
...
...
@@ -1149,6 +1149,8 @@ sub print_doctored {
local($exit_patch) = '';
local($call_entry_patch)= '';
local($call_exit_patch) = '';
local($gc_call_entry_patch)= ''; # Patches before and after calls to Perform_GC_wrapper
local($gc_call_exit_patch) = '';
#OLD: # first, convert calls to *very magic form*: (ToDo: document
# for real!) from
...
...
@@ -1238,16 +1240,26 @@ sub print_doctored {
# OK, now we can decide what our patch-up code is going to
# be:
# Note funky ".=" stuff; we're *adding* to these _patch guys
if ( $StolenX86Regs <= 2
&& ( /32\(\%ebx\)/ || /\%esi/ || /^\tcmps/ ) ) { # R1 (esi)
$entry_patch .= "\tmovl \%esi,32(\%ebx)\n";
$exit_patch .= "\tmovl 32(\%ebx),\%esi\n";
$gc_call_entry_patch .= "\tmovl \%esi,32(\%ebx)\n";
$gc_call_exit_patch .= "\tmovl 32(\%ebx),\%esi\n";
# nothing for call_{entry,exit} because %esi is callee-save
}
if ( $StolenX86Regs <= 3
&& ( /64\(\%ebx\)/ || /\%edi/ || /^\t(scas|cmps)/ ) ) { # SpA (edi)
$entry_patch .= "\tmovl \%edi,64(\%ebx)\n";
$exit_patch .= "\tmovl 64(\%ebx),\%edi\n";
$gc_call_entry_patch .= "\tmovl \%edi,64(\%ebx)\n";
$gc_call_exit_patch .= "\tmovl 64(\%ebx),\%edi\n";
# nothing for call_{entry,exit} because %edi is callee-save
}
#= if ( $StolenX86Regs <= 4
...
...
@@ -1265,7 +1277,14 @@ sub print_doctored {
# next, here we go with non-%esp patching!
#
s/^(\t[a-z])/$entry_patch$1/; # before first instruction
s/^(\tcall .*\n(\taddl \$\d+,\%esp\n)?)/$call_exit_patch$1$call_entry_patch/g; # _all_ calls
# Actually, call_entry_patch and call_exit_patch never get set,
# so let's nuke this one
# s/^(\tcall .*\n(\taddl \$\d+,\%esp\n)?)/$call_exit_patch$1$call_entry_patch/g; # _all_ calls
# Before calling GC we must set up the exit condition before the call
# and entry condition when we come back
s/^(\tcall ${T_DO_GC}\n(\taddl \$\d+,\%esp\n)?)/$gc_call_exit_patch$1$gc_call_entry_patch/g; # _all_ calls
# fix _all_ non-local jumps:
...
...
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