summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Möller <ulf@openssl.org>2000-12-05 03:51:46 +0000
committerUlf Möller <ulf@openssl.org>2000-12-05 03:51:46 +0000
commitcc74659fcc7502434d9452718bd47a46e70a0962 (patch)
tree787d9f0c7c5c685e1532d0aa0ab89c1b4ca58be0
parent90e7ce363ae8278bb4ac647739c89a43ed341e34 (diff)
downloadopenssl-new-cc74659fcc7502434d9452718bd47a46e70a0962.tar.gz
PERLASM - the wierdest programming language since Intercal.
add debug output facilities.
-rw-r--r--crypto/perlasm/x86unix.pl28
1 files changed, 27 insertions, 1 deletions
diff --git a/crypto/perlasm/x86unix.pl b/crypto/perlasm/x86unix.pl
index 309060ea00..3e6ff685b7 100644
--- a/crypto/perlasm/x86unix.pl
+++ b/crypto/perlasm/x86unix.pl
@@ -3,6 +3,7 @@
package x86unix;
$label="L000";
+$const="";
$align=($main'aout)?"4":"16";
$under=($main'aout)?"_":"";
@@ -341,9 +342,13 @@ sub main'function_end
popl %ebx
popl %ebp
ret
-.${func}_end:
EOF
push(@out,$tmp);
+
+ push(@out,$const);
+ $const="";
+ push(@out,".${func}_end:\n");
+
if ($main'cpp)
{ push(@out,"\tSIZE($func,.${func}_end-$func)\n"); }
elsif ($main'gaswin)
@@ -459,3 +464,24 @@ sub main'data_word
{
push(@out,"\t.long $_[0]\n");
}
+
+sub main'puts
+ {
+ $constl++;
+ &main'push('$Lstring' . $constl);
+ &main'call('puts');
+ &main'add("esp",4);
+
+ $const .= "Lstring$constl:\n\t.string \"@_[0]\"\n";
+ }
+
+sub main'putx
+ {
+ $constl++;
+ &main'push($_[0]);
+ &main'push('$Lstring' . $constl);
+ &main'call('printf');
+ &main'add("esp",8);
+
+ $const .= "Lstring$constl:\n\t.string \"\%X\"\n";
+ }