sub ::AUTOLOAD
{ my $opcode = $AUTOLOAD;
- die "more than 2 arguments passed to $opcode" if ($#_>1);
+ die "more than 4 arguments passed to $opcode" if ($#_>3);
$opcode =~ s/.*:://;
if ($opcode =~ /^push/) { $stack+=4; }
sub ::exch { &xchg(@_); }
sub ::halt { &hlt; }
sub ::movz { &movzx(@_); }
-sub ::pushf { &::pushfd; }
-sub ::popf { &::popfd; }
+sub ::pushf { &pushfd; }
+sub ::popf { &popfd; }
# 3 argument instructions
sub ::movq
else
{ &::generic("movq",@_); }
}
-sub ::pshufw { &::emit("pshufw",@_); }
-sub ::shld { &::emit("shld",@_); }
-sub ::shrd { &::emit("shrd",@_); }
# label management
$lbdecor="L"; # local label decoration, set by package
$filename=$fn;
$i386=$cpu;
- $elf=$cpp=$coff=$aout=$win32=$netware=$mwerks=0;
+ $elf=$cpp=$coff=$aout=$macosx=$win32=$netware=$mwerks=0;
if (($type eq "elf"))
{ $elf=1; require "x86gas.pl"; }
elsif (($type eq "a\.out"))
#{ $netware=1; $mwerks=1; require "x86nasm.pl"; }
elsif (($type eq "win32"))
{ $win32=1; require "x86masm.pl"; }
+ elsif (($type eq "macosx"))
+ { $aout=1; $macosx=1; require "x86gas.pl"; }
else
{ print STDERR <<"EOF";
Pick one target type from
coff - GAS/COFF such as Win32 targets
win32n - Windows 95/Windows NT NASM format
nw-nasm - NetWare NASM format
+ macosx - Mac OS X
EOF
exit(1);
}