diff options
Diffstat (limited to 'src/lib/libcrypto/perlasm/x86asm.pl')
| -rw-r--r-- | src/lib/libcrypto/perlasm/x86asm.pl | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/lib/libcrypto/perlasm/x86asm.pl b/src/lib/libcrypto/perlasm/x86asm.pl index eb543db2f6..bf783cff26 100644 --- a/src/lib/libcrypto/perlasm/x86asm.pl +++ b/src/lib/libcrypto/perlasm/x86asm.pl | |||
| @@ -33,6 +33,13 @@ sub ::emit | |||
| 33 | else { push(@out,"\t$opcode\t".join(',',@_)."\n"); } | 33 | else { push(@out,"\t$opcode\t".join(',',@_)."\n"); } |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | sub ::emitraw | ||
| 37 | { my $opcode=shift; | ||
| 38 | |||
| 39 | if ($#_==-1) { push(@out,"$opcode\n"); } | ||
| 40 | else { push(@out,"$opcode\t".join(',',@_)."\n"); } | ||
| 41 | } | ||
| 42 | |||
| 36 | sub ::LB | 43 | sub ::LB |
| 37 | { $_[0] =~ m/^e?([a-d])x$/o or die "$_[0] does not have a 'low byte'"; | 44 | { $_[0] =~ m/^e?([a-d])x$/o or die "$_[0] does not have a 'low byte'"; |
| 38 | $1."l"; | 45 | $1."l"; |
| @@ -218,7 +225,7 @@ sub ::asm_init | |||
| 218 | $filename=$fn; | 225 | $filename=$fn; |
| 219 | $i386=$cpu; | 226 | $i386=$cpu; |
| 220 | 227 | ||
| 221 | $elf=$cpp=$coff=$aout=$macosx=$win32=$netware=$mwerks=$android=0; | 228 | $elf=$cpp=$coff=$aout=$macosx=$win32=$netware=$mwerks=$openbsd=$android=0; |
| 222 | if (($type eq "elf")) | 229 | if (($type eq "elf")) |
| 223 | { $elf=1; require "x86gas.pl"; } | 230 | { $elf=1; require "x86gas.pl"; } |
| 224 | elsif (($type eq "a\.out")) | 231 | elsif (($type eq "a\.out")) |
| @@ -235,6 +242,10 @@ sub ::asm_init | |||
| 235 | { $win32=1; require "x86masm.pl"; } | 242 | { $win32=1; require "x86masm.pl"; } |
| 236 | elsif (($type eq "macosx")) | 243 | elsif (($type eq "macosx")) |
| 237 | { $aout=1; $macosx=1; require "x86gas.pl"; } | 244 | { $aout=1; $macosx=1; require "x86gas.pl"; } |
| 245 | elsif (($type eq "openbsd-elf")) | ||
| 246 | { $openbsd=$elf=1; require "x86gas.pl"; } | ||
| 247 | elsif (($type eq "openbsd-a.out")) | ||
| 248 | { $openbsd=1; require "x86gas.pl"; } | ||
| 238 | elsif (($type eq "android")) | 249 | elsif (($type eq "android")) |
| 239 | { $elf=1; $android=1; require "x86gas.pl"; } | 250 | { $elf=1; $android=1; require "x86gas.pl"; } |
| 240 | else | 251 | else |
| @@ -244,6 +255,8 @@ Pick one target type from | |||
| 244 | a.out - DJGPP, elder OpenBSD, etc. | 255 | a.out - DJGPP, elder OpenBSD, etc. |
| 245 | coff - GAS/COFF such as Win32 targets | 256 | coff - GAS/COFF such as Win32 targets |
| 246 | win32n - Windows 95/Windows NT NASM format | 257 | win32n - Windows 95/Windows NT NASM format |
| 258 | openbsd-elf - OpenBSD elf | ||
| 259 | openbsd-a.out - OpenBSD a.out | ||
| 247 | nw-nasm - NetWare NASM format | 260 | nw-nasm - NetWare NASM format |
| 248 | macosx - Mac OS X | 261 | macosx - Mac OS X |
| 249 | EOF | 262 | EOF |
| @@ -253,6 +266,7 @@ EOF | |||
| 253 | $pic=0; | 266 | $pic=0; |
| 254 | for (@ARGV) { $pic=1 if (/\-[fK]PIC/i); } | 267 | for (@ARGV) { $pic=1 if (/\-[fK]PIC/i); } |
| 255 | 268 | ||
| 269 | ::emitraw("#include <machine/asm.h>\n") if $openbsd; | ||
| 256 | $filename =~ s/\.pl$//; | 270 | $filename =~ s/\.pl$//; |
| 257 | &file($filename); | 271 | &file($filename); |
| 258 | } | 272 | } |
