X-Git-Url: https://git.openssl.org/?a=blobdiff_plain;f=crypto%2Fperlasm%2Fx86asm.pl;h=28080caaa60efbc07741573ca884a394873530f7;hb=4db4882402a79345a075c62a87f2fb7cfe89e283;hp=4f3b5063c448dc1788648e27730cdea03a0c53ad;hpb=3e583572b3256d0d38233264a69fc2bf2887f883;p=openssl.git diff --git a/crypto/perlasm/x86asm.pl b/crypto/perlasm/x86asm.pl index 4f3b5063c4..28080caaa6 100644 --- a/crypto/perlasm/x86asm.pl +++ b/crypto/perlasm/x86asm.pl @@ -17,7 +17,7 @@ $i386=0; 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; } @@ -66,8 +66,8 @@ sub ::rotr { &ror(@_); } 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 @@ -79,9 +79,6 @@ 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 @@ -170,7 +167,7 @@ sub ::asm_init $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")) @@ -185,6 +182,8 @@ sub ::asm_init #{ $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 @@ -193,6 +192,7 @@ 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); }