Loading crypto/des/asm/crypt586.pl +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ sub fcrypt_body &xor( $R, $R); &mov($ks,&wparam(1)); &push(25); # add a variable &push(&DWC(25)); # add a variable &set_label("start"); for ($i=0; $i<16; $i+=2) Loading crypto/des/asm/desboth.pl +3 −3 Original line number Diff line number Diff line Loading @@ -44,15 +44,15 @@ sub des_encrypt3 &mov("edi",&wparam(2)); &mov("eax",&wparam(3)); } &mov(&swtmp(2), (($enc)?"1":"0")); &mov(&swtmp(2), (DWC(($enc)?"1":"0"))); &mov(&swtmp(1), "eax"); &mov(&swtmp(0), "ebx"); &call("des_encrypt2"); &mov(&swtmp(2), (($enc)?"0":"1")); &mov(&swtmp(2), (DWC(($enc)?"0":"1"))); &mov(&swtmp(1), "edi"); &mov(&swtmp(0), "ebx"); &call("des_encrypt2"); &mov(&swtmp(2), (($enc)?"1":"0")); &mov(&swtmp(2), (DWC(($enc)?"1":"0"))); &mov(&swtmp(1), "esi"); &mov(&swtmp(0), "ebx"); &call("des_encrypt2"); Loading crypto/perlasm/x86ms.pl +10 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,16 @@ sub main'DWP &get_mem("DWORD",@_); } sub main'BC { return @_; } sub main'DWC { return @_; } sub main'stack_push { local($num)=@_; Loading crypto/perlasm/x86nasm.pl +22 −5 Original line number Diff line number Diff line Loading @@ -27,7 +27,14 @@ $label="L000"; sub main'asm_init_output { @out=(); } sub main'asm_get_output { return(@out); } sub main'get_labels { return(@labels); } sub main'external_label { push(@labels,@_); push(@out, "EXTERN\t$_[0]"); } sub main'external_label { push(@labels,@_); foreach (@_) { push(@out, "extern\t_$_\n"); } } sub main'LB { Loading @@ -51,6 +58,16 @@ sub main'DWP &get_mem("DWORD",@_); } sub main'BC { return "BYTE @_"; } sub main'DWC { return "DWORD @_"; } sub main'stack_push { my($num)=@_; Loading @@ -69,7 +86,7 @@ sub get_mem { my($size,$addr,$reg1,$reg2,$idx)=@_; my($t,$post); my($ret)="[$size "; my($ret)="["; $addr =~ s/^\s+//; if ($addr =~ /^(.+)\+(.+)$/) { Loading Loading @@ -192,7 +209,7 @@ sub using486 sub main'file { push(@out, "segment .text"); push(@out, "segment .text\n"); } sub main'function_begin Loading @@ -201,7 +218,7 @@ sub main'function_begin push(@labels,$func); my($tmp)=<<"EOF"; GLOBAL _$func global _$func _$func: push ebp push ebx Loading @@ -216,7 +233,7 @@ sub main'function_begin_B { my($func,$extra)=@_; my($tmp)=<<"EOF"; GLOBAL _$func global _$func _$func: EOF push(@out,$tmp); Loading crypto/perlasm/x86unix.pl +10 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,16 @@ sub main'BP return(&main'DWP(@_)); } sub main'BC { return @_; } sub main'DWC { return @_; } #sub main'BP # { # local($addr,$reg1,$reg2,$idx)=@_; Loading Loading
crypto/des/asm/crypt586.pl +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ sub fcrypt_body &xor( $R, $R); &mov($ks,&wparam(1)); &push(25); # add a variable &push(&DWC(25)); # add a variable &set_label("start"); for ($i=0; $i<16; $i+=2) Loading
crypto/des/asm/desboth.pl +3 −3 Original line number Diff line number Diff line Loading @@ -44,15 +44,15 @@ sub des_encrypt3 &mov("edi",&wparam(2)); &mov("eax",&wparam(3)); } &mov(&swtmp(2), (($enc)?"1":"0")); &mov(&swtmp(2), (DWC(($enc)?"1":"0"))); &mov(&swtmp(1), "eax"); &mov(&swtmp(0), "ebx"); &call("des_encrypt2"); &mov(&swtmp(2), (($enc)?"0":"1")); &mov(&swtmp(2), (DWC(($enc)?"0":"1"))); &mov(&swtmp(1), "edi"); &mov(&swtmp(0), "ebx"); &call("des_encrypt2"); &mov(&swtmp(2), (($enc)?"1":"0")); &mov(&swtmp(2), (DWC(($enc)?"1":"0"))); &mov(&swtmp(1), "esi"); &mov(&swtmp(0), "ebx"); &call("des_encrypt2"); Loading
crypto/perlasm/x86ms.pl +10 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,16 @@ sub main'DWP &get_mem("DWORD",@_); } sub main'BC { return @_; } sub main'DWC { return @_; } sub main'stack_push { local($num)=@_; Loading
crypto/perlasm/x86nasm.pl +22 −5 Original line number Diff line number Diff line Loading @@ -27,7 +27,14 @@ $label="L000"; sub main'asm_init_output { @out=(); } sub main'asm_get_output { return(@out); } sub main'get_labels { return(@labels); } sub main'external_label { push(@labels,@_); push(@out, "EXTERN\t$_[0]"); } sub main'external_label { push(@labels,@_); foreach (@_) { push(@out, "extern\t_$_\n"); } } sub main'LB { Loading @@ -51,6 +58,16 @@ sub main'DWP &get_mem("DWORD",@_); } sub main'BC { return "BYTE @_"; } sub main'DWC { return "DWORD @_"; } sub main'stack_push { my($num)=@_; Loading @@ -69,7 +86,7 @@ sub get_mem { my($size,$addr,$reg1,$reg2,$idx)=@_; my($t,$post); my($ret)="[$size "; my($ret)="["; $addr =~ s/^\s+//; if ($addr =~ /^(.+)\+(.+)$/) { Loading Loading @@ -192,7 +209,7 @@ sub using486 sub main'file { push(@out, "segment .text"); push(@out, "segment .text\n"); } sub main'function_begin Loading @@ -201,7 +218,7 @@ sub main'function_begin push(@labels,$func); my($tmp)=<<"EOF"; GLOBAL _$func global _$func _$func: push ebp push ebx Loading @@ -216,7 +233,7 @@ sub main'function_begin_B { my($func,$extra)=@_; my($tmp)=<<"EOF"; GLOBAL _$func global _$func _$func: EOF push(@out,$tmp); Loading
crypto/perlasm/x86unix.pl +10 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,16 @@ sub main'BP return(&main'DWP(@_)); } sub main'BC { return @_; } sub main'DWC { return @_; } #sub main'BP # { # local($addr,$reg1,$reg2,$idx)=@_; Loading