diff options
author | Andy Polyakov <appro@openssl.org> | 2004-05-06 10:31:09 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2004-05-06 10:31:09 +0000 |
commit | 10e7d6d526503c5e445632051a89a9df23f9c686 (patch) | |
tree | 7c5c1873c6dc45038e7ae48a42e14f967e01f6e3 /crypto/perlasm/x86ms.pl | |
parent | 8d472bdd84b0d08a09270fcc9248070e8d385700 (diff) | |
download | openssl-10e7d6d526503c5e445632051a89a9df23f9c686.tar.gz |
Support for IA-32 SSE2 instruction set.
Diffstat (limited to 'crypto/perlasm/x86ms.pl')
-rw-r--r-- | crypto/perlasm/x86ms.pl | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/crypto/perlasm/x86ms.pl b/crypto/perlasm/x86ms.pl index fbb4afb9bd..dd62348b6a 100644 --- a/crypto/perlasm/x86ms.pl +++ b/crypto/perlasm/x86ms.pl @@ -51,6 +51,11 @@ sub main'DWP &get_mem("DWORD",@_); } +sub main'QWP + { + &get_mem("QWORD",@_); + } + sub main'BC { return @_; @@ -160,6 +165,25 @@ sub main'not { &out1("not",@_); } sub main'call { &out1("call",($_[0]=~/^\$L/?'':'_').$_[0]); } sub main'ret { &out0("ret"); } sub main'nop { &out0("nop"); } +sub main'test { &out2("test",@_); } +sub main'bt { &out2("bt",@_); } +sub main'leave { &out0("leave"); } + +# SSE2 +sub main'emms { &out0("emms"); } +sub main'movd { &out2("movd",@_); } +sub main'movq { &out2("movq",@_); } +sub main'movdqu { &out2("movdqu",@_); } +sub main'movdqa { &out2("movdqa",@_); } +sub main'movdq2q{ &out2("movdq2q",@_); } +sub main'movq2dq{ &out2("movq2dq",@_); } +sub main'paddq { &out2("paddq",@_); } +sub main'pmuludq{ &out2("pmuludq",@_); } +sub main'psrlq { &out2("psrlq",@_); } +sub main'psllq { &out2("psllq",@_); } +sub main'pxor { &out2("pxor",@_); } +sub main'por { &out2("por",@_); } +sub main'pand { &out2("pand",@_); } sub out2 { @@ -299,6 +323,13 @@ EOF sub main'file_end { + # try to detect if SSE2 or MMX extensions were used... + if (grep {/xmm[0-7]\s*,/i} @out) { + grep {s/\.[3-7]86/\.786\n\t\.XMM/} @out; + } + elsif (grep {/mm[0-7]\s*,/i} @out) { + grep {s/\.[3-7]86/\.686\n\t\.MMX/} @out; + } push(@out,"END\n"); } @@ -359,7 +390,12 @@ sub main'set_label sub main'data_word { - push(@out,"\tDD\t$_[0]\n"); + push(@out,"\tDD\t".join(',',@_)."\n"); + } + +sub main'align + { + push(@out,"\tALIGN\t$_[0]\n"); } sub out1p |