aboutsummaryrefslogtreecommitdiff
path: root/crypto/perlasm
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2005-12-06 18:43:59 +0000
committerAndy Polyakov <appro@openssl.org>2005-12-06 18:43:59 +0000
commit3ebf898e88f1f3c9347bba11e8a6ee2bdb83dded (patch)
tree89c85766ce467847bc6328349a859a5e2260a5c1 /crypto/perlasm
parenta4c886e4c87c56dc9fb184f0e2992e95a29857d5 (diff)
downloadopenssl-3ebf898e88f1f3c9347bba11e8a6ee2bdb83dded.zip
openssl-3ebf898e88f1f3c9347bba11e8a6ee2bdb83dded.tar.gz
openssl-3ebf898e88f1f3c9347bba11e8a6ee2bdb83dded.tar.bz2
Support for indirect calls in x86 assembler modules.
Diffstat (limited to 'crypto/perlasm')
-rw-r--r--crypto/perlasm/x86ms.pl7
-rw-r--r--crypto/perlasm/x86nasm.pl5
-rw-r--r--crypto/perlasm/x86unix.pl1
3 files changed, 8 insertions, 5 deletions
diff --git a/crypto/perlasm/x86ms.pl b/crypto/perlasm/x86ms.pl
index 23cb121..82538a9 100644
--- a/crypto/perlasm/x86ms.pl
+++ b/crypto/perlasm/x86ms.pl
@@ -172,6 +172,7 @@ sub main'popf { &out0("popfd"); $stack-=4; }
sub main'bswap { &out1("bswap",@_); &using486(); }
sub main'not { &out1("not",@_); }
sub main'call { &out1("call",($_[0]=~/^\$L/?'':'_').$_[0]); }
+sub main'call_ptr { &out1p("call",@_); }
sub main'ret { &out0("ret"); }
sub main'nop { &out0("nop"); }
sub main'test { &out2("test",@_); }
@@ -436,7 +437,7 @@ sub out1p
local($name,$p1)=@_;
local($l,$t);
- push(@out,"\t$name\t ".&conv($p1)."\n");
+ push(@out,"\t$name\t".&conv($p1)."\n");
}
sub main'picmeup
@@ -452,10 +453,10 @@ sub main'initseg
local($f)=@_;
local($tmp)=<<___;
OPTION DOTNAME
-.CRT\$XIU SEGMENT DWORD PUBLIC 'DATA'
+.CRT\$XCU SEGMENT DWORD PUBLIC 'DATA'
EXTRN _$f:NEAR
DD _$f
-.CRT\$XIU ENDS
+.CRT\$XCU ENDS
___
push(@out,$tmp);
}
diff --git a/crypto/perlasm/x86nasm.pl b/crypto/perlasm/x86nasm.pl
index 78b1f94..b6dfcbd 100644
--- a/crypto/perlasm/x86nasm.pl
+++ b/crypto/perlasm/x86nasm.pl
@@ -184,6 +184,7 @@ sub main'popf { &out0("popfd"); $stack-=4; }
sub main'bswap { &out1("bswap",@_); &using486(); }
sub main'not { &out1("not",@_); }
sub main'call { &out1("call",($_[0]=~/^\@L/?'':$under).$_[0]); }
+sub main'call_ptr { &out1p("call",@_); }
sub main'ret { &out0("ret"); }
sub main'nop { &out0("nop"); }
sub main'test { &out2("test",@_); }
@@ -422,7 +423,7 @@ sub out1p
my($name,$p1)=@_;
my($l,$t);
- push(@out,"\t$name\t ".&conv($p1)."\n");
+ push(@out,"\t$name\t".&conv($p1)."\n");
}
sub main'picmeup
@@ -439,7 +440,7 @@ sub main'initseg
if ($main'win32)
{
local($tmp)=<<___;
-segment .CRT\$XIU data
+segment .CRT\$XCU data
extern $under$f
DD $under$f
___
diff --git a/crypto/perlasm/x86unix.pl b/crypto/perlasm/x86unix.pl
index 348bf2d..e71050b 100644
--- a/crypto/perlasm/x86unix.pl
+++ b/crypto/perlasm/x86unix.pl
@@ -200,6 +200,7 @@ sub main'call { my $pre=$under;
{ if ($label{$i} eq $_[0]) { $pre=''; last; } }
&out1("call",$pre.$_[0]);
}
+sub main'call_ptr { &out1p("call",@_); }
sub main'ret { &out0("ret"); }
sub main'nop { &out0("nop"); }
sub main'test { &out2("testl",@_); }