$addr="_$addr";
}
+ if ($addr =~ /^.+\-.+$/) { $addr="($addr)"; }
+
$reg1="$regs{$reg1}" if defined($regs{$reg1});
$reg2="$regs{$reg2}" if defined($regs{$reg2});
if (($addr ne "") && ($addr ne 0))
{
$ret.="[$reg1$post]"
}
+ $ret =~ s/\[\]//; # in case $addr was the only argument
return($ret);
}
sub main'pop { &out1("pop",@_); $stack-=4; }
sub main'bswap { &out1("bswap",@_); &using486(); }
sub main'not { &out1("not",@_); }
-sub main'call { &out1("call",'_'.$_[0]); }
+sub main'call { &out1("call",($_[0]=~/^\$L/?'':'_').$_[0]); }
sub main'ret { &out0("ret"); }
sub main'nop { &out0("nop"); }
{
if (!defined($label{$_[0]}))
{
- $label{$_[0]}="${label}${_[0]}";
+ $label{$_[0]}="\$${label}${_[0]}";
$label++;
}
if((defined $_[2]) && ($_[2] == 1))
$addr="_$addr";
}
+ if ($addr =~ /^.+\-.+$/) { $addr="($addr)"; }
+
$reg1="$regs{$reg1}" if defined($regs{$reg1});
$reg2="$regs{$reg2}" if defined($regs{$reg2});
if (($addr ne "") && ($addr ne 0))
{
$ret.="$reg1$post]"
}
+ $ret =~ s/\+\]/]/; # in case $addr was the only argument
return($ret);
}
sub main'pop { &out1("pop",@_); $stack-=4; }
sub main'bswap { &out1("bswap",@_); &using486(); }
sub main'not { &out1("not",@_); }
-sub main'call { &out1("call",'_'.$_[0]); }
+sub main'call { &out1("call",($_[0]=~/^\.L/?'':'_').$_[0]); }
sub main'ret { &out0("ret"); }
sub main'nop { &out0("nop"); }
{
if (!defined($label{$_[0]}))
{
- $label{$_[0]}="\$${label}${_[0]}";
+ $label{$_[0]}=".${label}${_[0]}";
$label++;
}
return($label{$_[0]});
{
if (!defined($label{$_[0]}))
{
- $label{$_[0]}="${label}${_[0]}";
+ $label{$_[0]}=".${label}${_[0]}";
$label++;
}
push(@out,"$label{$_[0]}:\n");