aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/perlasm/x86asm.pl
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2009-04-26 17:58:58 +0000
committerAndy Polyakov <appro@openssl.org>2009-04-26 17:58:58 +0000
commit6c8b9259fc0ddd429e4ae4c4ad90356e91a669ff (patch)
tree204b822f08925887f8570792e94d7a7961280ad5 /crypto/perlasm/x86asm.pl
parent75d448dde4bbde588bd242df53e48d22cb530f6b (diff)
downloadopenssl-6c8b9259fc0ddd429e4ae4c4ad90356e91a669ff.tar.gz
AESNI perlasm update.
Diffstat (limited to 'crypto/perlasm/x86asm.pl')
-rw-r--r--crypto/perlasm/x86asm.pl17
1 files changed, 17 insertions, 0 deletions
diff --git a/crypto/perlasm/x86asm.pl b/crypto/perlasm/x86asm.pl
index 28080caaa6..34244c1ce0 100644
--- a/crypto/perlasm/x86asm.pl
+++ b/crypto/perlasm/x86asm.pl
@@ -80,6 +80,23 @@ sub ::movq
{ &::generic("movq",@_); }
}
+# AESNI extenstion
+sub ::aeskeygenassist
+{ my($dst,$src,$imm)=@_;
+ if ("$dst:$src" =~ /xmm([0-7]):xmm([0-7])/)
+ { &data_byte(0x66,0x0f,0x3a,0xdf,0xc0|($1<<3)|$2,$imm); }
+}
+sub ::aescommon
+{ my($opcodelet,$dst,$src)=@_;
+ if ("$dst:$src" =~ /xmm([0-7]):xmm([0-7])/)
+ { &data_byte(0x66,0x0f,0x38,$opcodelet,0xc0|($1<<3)|$2); }
+}
+sub ::aesimc { ::aescommon(0xdb,@_); }
+sub ::aesenc { ::aescommon(0xdc,@_); }
+sub ::aesenclast { ::aescommon(0xdd,@_); }
+sub ::aesdec { ::aescommon(0xde,@_); }
+sub ::aesdeclast { ::aescommon(0xdf,@_); }
+
# label management
$lbdecor="L"; # local label decoration, set by package
$label="000";