X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fperlasm%2Fx86unix.pl;h=573d4f1126e95cb939832a9f2da0eb1f2b9499ec;hb=7ae551fd03b447e41d3a74e803a711350383ebc4;hp=bb9c6925d8d8ec62d01e1ce58452f3412303817a;hpb=0c34556cbd509afc84d5a6796d463122408a028b;p=oweals%2Fopenssl.git diff --git a/crypto/perlasm/x86unix.pl b/crypto/perlasm/x86unix.pl index bb9c6925d8..573d4f1126 100644 --- a/crypto/perlasm/x86unix.pl +++ b/crypto/perlasm/x86unix.pl @@ -164,6 +164,8 @@ sub main'dec { &out1("decl",@_); } sub main'inc { &out1("incl",@_); } sub main'push { &out1("pushl",@_); $stack+=4; } sub main'pop { &out1("popl",@_); $stack-=4; } +sub main'pushf { &out0("pushf"); $stack+=4; } +sub main'popf { &out0("popf"); $stack-=4; } sub main'not { &out1("notl",@_); } sub main'call { &out1("call",$under.$_[0]); } sub main'ret { &out0("ret"); } @@ -343,11 +345,9 @@ sub main'function_end popl %ebx popl %ebp ret -$const .${func}_end: EOF push(@out,$tmp); - $const=""; if ($main'cpp) { push(@out,"\tSIZE($func,.${func}_end-$func)\n"); } @@ -458,6 +458,12 @@ sub main'set_label sub main'file_end { + if ($const ne "") + { + push(@out,".section .rodata\n"); + push(@out,$const); + $const=""; + } } sub main'data_word @@ -523,6 +529,7 @@ sub main'printf sub pushvars { + &main'pushf(); &main'push("edx"); &main'push("ecx"); &main'push("eax"); @@ -533,4 +540,5 @@ sub popvars &main'pop("eax"); &main'pop("ecx"); &main'pop("edx"); + &main'popf(); }