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
aa2cadf5
Commit
aa2cadf5
authored
24 years ago
by
Simon Marlow
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 2000-06-13 15:35:29 by simonmar]
freebsd3 ==> freebsd
parent
4ccbb70f
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghc/driver/mangler/ghc-asm.lprl
+9
-31
9 additions, 31 deletions
ghc/driver/mangler/ghc-asm.lprl
with
9 additions
and
31 deletions
ghc/driver/mangler/ghc-asm.lprl
+
9
−
31
View file @
aa2cadf5
...
...
@@ -69,7 +69,7 @@ sub init_TARGET_STUFF {
$T_HDR_data = "\.data\n\t\.align 3\n";
$T_HDR_consist = "\.text\n";
$T_HDR_closure = "\.data\n\t\.align 3\n";
$T_HDR_srt = "\.
text
\n\t\.align 3\n";
$T_HDR_srt = "\.
data
\n\t\.align 3\n";
$T_HDR_info = "\.text\n\t\.align 3\n";
$T_HDR_entry = "\.text\n\t\.align 3\n";
$T_HDR_fast = "\.text\n\t\.align 3\n";
...
...
@@ -127,7 +127,7 @@ sub init_TARGET_STUFF {
$T_HDR_consist = "\.text\n";
$T_HDR_closure = "\.data\n\t\.align 2\n";
$T_HDR_closure = "\.data\n\t\.align 2\n\t.long 0\n" if ( $TargetPlatform =~ /.*-mingw32$/ );
$T_HDR_srt = "\.
text
\n\t\.align 2\n";
$T_HDR_srt = "\.
data
\n\t\.align 2\n";
$T_HDR_info = "\.text\n\t\.align 2\n"; # NB: requires padding
$T_HDR_entry = "\.text\n"; # no .align so we're right next to _info (arguably wrong...?)
$T_HDR_fast = "\.text\n\t\.align 2,0x90\n";
...
...
@@ -163,7 +163,7 @@ sub init_TARGET_STUFF {
$T_HDR_data = "\.data\n\t\.align 4\n"; # ToDo: change align??
$T_HDR_consist = "\.text\n";
$T_HDR_closure = "\.data\n\t\.align 4\n"; # ToDo: change align?
$T_HDR_srt = "\.
text
\n\t\.align 4\n"; # ToDo: change align?
$T_HDR_srt = "\.
data
\n\t\.align 4\n"; # ToDo: change align?
$T_HDR_info = "\.text\n\t\.align 4\n"; # NB: requires padding
$T_HDR_entry = "\.text\n"; # no .align so we're right next to _info (arguably wrong...?)
$T_HDR_fast = "\.text\n\t\.align 4\n";
...
...
@@ -190,7 +190,7 @@ sub init_TARGET_STUFF {
$T_HDR_data = "\.data\n\t\.even\n";
$T_HDR_consist = "\.text\n";
$T_HDR_closure = "\.data\n\t\.even\n";
$T_HDR_srt = "\.
text
\n\t\.even\n";
$T_HDR_srt = "\.
data
\n\t\.even\n";
$T_HDR_info = "\.text\n\t\.even\n";
$T_HDR_entry = "\.text\n\t\.even\n";
$T_HDR_fast = "\.text\n\t\.even\n";
...
...
@@ -217,7 +217,7 @@ sub init_TARGET_STUFF {
$T_HDR_data = "\t\.data\n\t\.align 2\n";
$T_HDR_consist = 'TOO LAZY TO DO THIS TOO';
$T_HDR_closure = "\t\.data\n\t\.align 2\n";
$T_HDR_srt = "\t\.
text
\n\t\.align 2\n";
$T_HDR_srt = "\t\.
data
\n\t\.align 2\n";
$T_HDR_info = "\t\.text\n\t\.align 2\n";
$T_HDR_entry = "\t\.text\n\t\.align 2\n";
$T_HDR_fast = "\t\.text\n\t\.align 2\n";
...
...
@@ -564,7 +564,7 @@ sub mangle_asm {
unless $KNOWN_FUNNY_THING{$thing}
|| /^$TUS[@]?stg_.*$TPOSTLBL[@]?$/o # RTS internals
|| /^$TUS[@]__fexp_.*$TPOSTLBL$/o # foreign export
|| /^$TUS[@]?_
_init
.*$TPOSTLBL$/o #
__init
<module>
|| /^$TUS[@]?_
reg
.*$TPOSTLBL$/o #
PROF: __reg
<module>
|| /^$TUS[@]?.*_btm$TPOSTLBL$/o # large bitmaps
|| /^$TUS[@]?.*_closure_tbl$TPOSTLBL$/o; # closure tables
$chk[++$i] = $_;
...
...
@@ -713,7 +713,6 @@ sub mangle_asm {
$e =~ s/^\tpopl \%esi\n//;
$e =~ s/^\tpopl \%ecx\n//;
$e =~ s/^\taddl \$\d+,\%esp\n//;
$e =~ s/^\tsubl \$-\d+,\%esp\n//;
} elsif ($TargetPlatform =~ /^m68k-/) {
$e =~ s/^\tunlk a6\n//;
$e =~ s/^\trts\n//;
...
...
@@ -782,28 +781,7 @@ sub mangle_asm {
# (this SEGVs perl4 on alphas, you see)
$to_move = $1;
# on x86 we try not to copy any directives into a literal
# chunk, rather we keep looking for the next real chunk. This
# is because we get things like
#
# .globl blah_closure
# .LC32
# .string "..."
# blah_closure:
# ...
#
if ( $TargetPlatform =~ /^i386/ && $to_move =~ /$TCOPYDIRVS/ ) {
$j = $i + 1;
while ( $j < ($numchks - 1) && $chk[$j] =~ /$T_CONST_LBL/) {
$j++;
}
if ( $j < ($numchks - 1)) {
$chk[$j] = $to_move . $chk[$j];
}
}
elsif ( $i < ($numchks - 1)
if ( $i < ($numchks - 1)
&& ( $to_move =~ /$TCOPYDIRVS/
|| ($TargetPlatform =~ /^hppa/ && $to_move =~ /align/ && $chkcat[$i+1] eq 'literal') )) {
$chk[$i + 1] = $to_move . $chk[$i + 1];
...
...
@@ -909,7 +887,7 @@ sub mangle_asm {
};
&print_doctored($chk[$i], 0);
if ($TargetPlatform =~ /^powerpc-|^rs6000-/ && $printDS) {
#ok if ($chksymb[$i] !~ /\_
_init_
Main/) {
#ok if ($chksymb[$i] !~ /\_
reg
Main/) {
print OUTASM "\.csect ${chksymb[$i]}[DS]\n";
print OUTASM "${p}TOC[tc0], 0\n";
#ok }
...
...
@@ -1190,7 +1168,7 @@ sub print_doctored {
if ( $TargetPlatform !~ /^i386-/
|| ! /^\t[a-z]/ # no instructions in here, apparently
|| /^${T_US}_
_init_
[A-Za-z0-9_]+${T_POST_LBL}/) {
|| /^${T_US}_
reg
[A-Za-z0-9_]+${T_POST_LBL}/) {
print OUTASM $_;
return;
}
...
...
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