diff options
Diffstat (limited to 'crypto/perlasm/x86asm.pl')
-rw-r--r-- | crypto/perlasm/x86asm.pl | 17 |
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"; |