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 28080caaa6..4756a28e59 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"; |
@@ -167,7 +174,7 @@ sub ::asm_init | |||
167 | $filename=$fn; | 174 | $filename=$fn; |
168 | $i386=$cpu; | 175 | $i386=$cpu; |
169 | 176 | ||
170 | $elf=$cpp=$coff=$aout=$macosx=$win32=$netware=$mwerks=0; | 177 | $elf=$cpp=$coff=$aout=$macosx=$win32=$netware=$mwerks=$openbsd=0; |
171 | if (($type eq "elf")) | 178 | if (($type eq "elf")) |
172 | { $elf=1; require "x86gas.pl"; } | 179 | { $elf=1; require "x86gas.pl"; } |
173 | elsif (($type eq "a\.out")) | 180 | elsif (($type eq "a\.out")) |
@@ -184,6 +191,10 @@ sub ::asm_init | |||
184 | { $win32=1; require "x86masm.pl"; } | 191 | { $win32=1; require "x86masm.pl"; } |
185 | elsif (($type eq "macosx")) | 192 | elsif (($type eq "macosx")) |
186 | { $aout=1; $macosx=1; require "x86gas.pl"; } | 193 | { $aout=1; $macosx=1; require "x86gas.pl"; } |
194 | elsif (($type eq "openbsd-elf")) | ||
195 | { $openbsd=$elf=1; require "x86gas.pl"; } | ||
196 | elsif (($type eq "openbsd-a.out")) | ||
197 | { $openbsd=1; require "x86gas.pl"; } | ||
187 | else | 198 | else |
188 | { print STDERR <<"EOF"; | 199 | { print STDERR <<"EOF"; |
189 | Pick one target type from | 200 | Pick one target type from |
@@ -191,6 +202,8 @@ Pick one target type from | |||
191 | a.out - DJGPP, elder OpenBSD, etc. | 202 | a.out - DJGPP, elder OpenBSD, etc. |
192 | coff - GAS/COFF such as Win32 targets | 203 | coff - GAS/COFF such as Win32 targets |
193 | win32n - Windows 95/Windows NT NASM format | 204 | win32n - Windows 95/Windows NT NASM format |
205 | openbsd-elf - OpenBSD elf | ||
206 | openbsd-a.out - OpenBSD a.out | ||
194 | nw-nasm - NetWare NASM format | 207 | nw-nasm - NetWare NASM format |
195 | macosx - Mac OS X | 208 | macosx - Mac OS X |
196 | EOF | 209 | EOF |
@@ -200,6 +213,7 @@ EOF | |||
200 | $pic=0; | 213 | $pic=0; |
201 | for (@ARGV) { $pic=1 if (/\-[fK]PIC/i); } | 214 | for (@ARGV) { $pic=1 if (/\-[fK]PIC/i); } |
202 | 215 | ||
216 | ::emitraw("#include <machine/asm.h>\n") if $openbsd; | ||
203 | $filename =~ s/\.pl$//; | 217 | $filename =~ s/\.pl$//; |
204 | &file($filename); | 218 | &file($filename); |
205 | } | 219 | } |