$T_COPY_DIRVS = '\.(globl|stab|lcomm)';
$T_DOT_WORD = '\.(long|word|value|byte|space)';
$T_DOT_GLOBAL = '\.globl';
- $T_HDR_literal = "\.text\n\t\.align 2\n";
- $T_HDR_misc = "\.text\n\t\.align 2,0x90\n";
- $T_HDR_data = "\.data\n\t\.align 2\n";
- $T_HDR_rodata = "\.text\n\t\.align 2\n";
- $T_HDR_closure = "\.data\n\t\.align 2\n";
- $T_HDR_info = "\.text\n\t\.align 2\n"; # NB: requires padding
+ $T_HDR_literal = "\.text\n\t\.align 4\n";
+ $T_HDR_misc = "\.text\n\t\.align 4,0x90\n";
+ $T_HDR_data = "\.data\n\t\.align 4\n";
+ $T_HDR_rodata = "\.text\n\t\.align 4\n";
+ $T_HDR_closure = "\.data\n\t\.align 4\n";
+ $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_vector = "\.text\n\t\.align 2\n"; # NB: requires padding
+ $T_HDR_vector = "\.text\n\t\.align 4\n"; # NB: requires padding
#--------------------------------------------------------#
- } elsif ( $TargetPlatform =~ /^i386-.*-(solaris2|linux|gnu|freebsd|netbsd|openbsd|kfreebsdgnu)$/m ) {
+ } elsif ( $TargetPlatform =~ /^i386-.*-(solaris2|linux|gnu|freebsd|dragonfly|netbsd|openbsd|kfreebsdgnu)$/m ) {
$T_STABBY = 0; # 1 iff .stab things (usually if a.out format)
$T_US = ''; # _ if symbols have an underscore on the front
$T_PRE_APP = # regexp that says what comes before APP/NO_APP
- ($TargetPlatform =~ /-(linux|gnu|freebsd|netbsd|openbsd)$/m) ? '#' : '/' ;
+ ($TargetPlatform =~ /-(linux|gnu|freebsd|dragonfly|netbsd|openbsd)$/m) ? '#' : '/' ;
$T_CONST_LBL = '^\.LC(\d+):$'; # regexp for what such a lbl looks like
$T_POST_LBL = ':';
$T_X86_PRE_LLBL_PAT = '\.L';
$T_HDR_vector = "\.text\n\t\.align 8\n";
#--------------------------------------------------------#
- } elsif ( $TargetPlatform =~ /^x86_64-.*-(linux|openbsd)$/m ) {
+ } elsif ( $TargetPlatform =~ /^x86_64-.*-(linux|openbsd|freebsd|dragonfly|netbsd)$/m ) {
$T_STABBY = 0; # 1 iff .stab things (usually if a.out format)
$T_US = ''; # _ if symbols have an underscore on the front
#--------------------------------------------------------#
} elsif ( $TargetPlatform =~ /^i386-apple-darwin.*/m ) {
- # Apple PowerPC Darwin/MacOS X.
+ # Apple i386 Darwin/MacOS X.
$T_STABBY = 0; # 1 iff .stab things (usually if a.out format)
$T_US = '_'; # _ if symbols have an underscore on the front
$T_PRE_APP = 'DOESNT APPLY'; # regexp that says what comes before APP/NO_APP
#--------------------------------------------------------#
} elsif ( $TargetPlatform =~ /^x86_64-apple-darwin.*/m ) {
- # Apple PowerPC Darwin/MacOS X.
+ # Apple amd64 Darwin/MacOS X.
$T_STABBY = 0; # 1 iff .stab things (usually if a.out format)
$T_US = '_'; # _ if symbols have an underscore on the front
$T_PRE_APP = 'DOESNT APPLY'; # regexp that says what comes before APP/NO_APP
next if /${T_PRE_APP}(NO_)?APP/om;
next if /^;/m && $TargetPlatform =~ /^hppa/m;
- next if /(^$|^\t\.file\t|^ # )/m && $TargetPlatform =~ /^(mips|ia64)-/m;
+ next if /(^$|^\t\.file\t|^ # )/m && $TargetPlatform =~ /(^mips-|^ia64-|-mingw32$)/m;
if ( $TargetPlatform =~ /^mips-/m
&& /^\t\.(globl\S+\.text|comm\t)/m ) {
# toss all prologue stuff, except for loading gp, and the ..ng address
unless ($c =~ /\.ent.*\n\$.*\.\.ng:/m) {
if (($p, $r) = split(/^\t\.prologue/m, $c)) {
- use vars '$junk'; # Unused?
+ # use vars '$junk'; # Unused?
if (($keep, $junk) = split(/\.\.ng:/m, $p)) {
$keep =~ s/^\t\.frame.*\n/\t.frame \$30,0,\$26,0\n/m;
$keep =~ s/^\t\.(mask|fmask).*\n//gm;
# If this is an entry point with an info table,
# eliminate the entry symbol and all directives involving it.
- if (defined($infochk{$symb}) && $TargetPlatform !~ /^ia64-/m) {
+ if (defined($infochk{$symb}) && $TargetPlatform !~ /^ia64-/m
+ && $TABLES_NEXT_TO_CODE eq "YES") {
@o = ();
foreach $l (split(/\n/m,$c)) {
next if $l =~ /^.*$symb_(entry|ret)${T_POST_LBL}/m;
\begin{code}
sub init_FUNNY_THINGS {
- use vars '%KNOWN_FUNNY_THING'; # Unused?
+ # use vars '%KNOWN_FUNNY_THING'; # Unused?
%KNOWN_FUNNY_THING = (
# example
# "${T_US}stg_.*{T_POST_LBL}", 1,
\begin{code}
sub rev_tbl {
- use vars '$discard1'; # Unused?
+ # use vars '$discard1'; # Unused?
local($symb, $tbl, $discard1) = @_;
- return ($tbl) if ($TargetPlatform =~ /^ia64-/m);
+ return ($tbl) if ($TargetPlatform =~ /^ia64-/m
+ || $TABLES_NEXT_TO_CODE eq "NO");
local($before) = '';
local($label) = '';