Print this page
first pass
@@ -81,12 +81,12 @@
* of "Add support to Intel AES-NI instruction set for x86_64 platform".
*
* This OpenSolaris version has these major changes from the original source:
*
* 1. Added OpenSolaris ENTRY_NP/SET_SIZE macros from
- * /usr/include/sys/asm_linkage.h, lint(1B) guards, EXPORT DELETE START
- * and EXPORT DELETE END markers, and dummy C function definitions for lint.
+ * /usr/include/sys/asm_linkage.h, lint(1B) guards, and dummy C function
+ * definitions for lint.
*
* 2. Formatted code, added comments, and added #includes and #defines.
*
* 3. If bit CR0.TS is set, clear and set the TS bit, after and before
* calling kpreempt_disable() and kpreempt_enable().
@@ -303,11 +303,10 @@
* %xmm1 Round constant
* Output:
* (%rcx) AES key
*/
- /* EXPORT DELETE START */
.align 16
_key_expansion_128:
_key_expansion_256a:
pshufd $0b11111111, %xmm1, %xmm1
shufps $0b00010000, %xmm0, %xmm4
@@ -376,11 +375,10 @@
pxor %xmm1, %xmm2
movaps %xmm2, (%rcx)
add $0x10, %rcx
ret
SET_SIZE(_key_expansion_256b)
- /* EXPORT DELETE END */
/*
* rijndael_key_setup_enc_intel()
* Expand the cipher key into the encryption key schedule.
@@ -422,11 +420,10 @@
#define ROUNDS64 KEYSIZE64 /* temp */
#define ENDAESKEY USERCIPHERKEY /* temp */
ENTRY_NP(rijndael_key_setup_enc_intel)
- /* EXPORT DELETE START */
CLEAR_TS_OR_PUSH_XMM0_TO_XMM6(%r10)
/ NULL pointer sanity check
test %USERCIPHERKEY, %USERCIPHERKEY
jz .Lenc_key_invalid_param
@@ -578,11 +575,10 @@
mov $-2, %rax / keysize is invalid
#else /* Open Solaris Interface */
xor %rax, %rax / a key pointer is NULL or invalid keysize
#endif /* OPENSSL_INTERFACE */
- /* EXPORT DELETE END */
ret
SET_SIZE(rijndael_key_setup_enc_intel)
/*
@@ -605,11 +601,10 @@
* int intel_AES_set_decrypt_key(const unsigned char *userKey,
* const int bits, AES_KEY *key);
* Return value is non-zero on error, 0 on success.
*/
ENTRY_NP(rijndael_key_setup_dec_intel)
- /* EXPORT DELETE START */
/ Generate round keys used for encryption
call rijndael_key_setup_enc_intel
test %rax, %rax
#ifdef OPENSSL_INTERFACE
jnz .Ldec_key_exit / Failed if returned non-0
@@ -658,11 +653,10 @@
SET_TS_OR_POP_XMM0_XMM1(%r10)
.Ldec_key_exit:
/ OpenSolaris: rax = # rounds (10, 12, or 14) or 0 for error
/ OpenSSL: rax = 0 for OK, or non-zero for error
- /* EXPORT DELETE END */
ret
SET_SIZE(rijndael_key_setup_dec_intel)
/*
@@ -709,11 +703,10 @@
#define STATE xmm0 /* temporary, 128 bits */
#define KEY xmm1 /* temporary, 128 bits */
ENTRY_NP(aes_encrypt_intel)
- /* EXPORT DELETE START */
CLEAR_TS_OR_PUSH_XMM0_XMM1(%r10)
movups (%INP), %STATE / input
movaps (%KEYP), %KEY / key
#ifdef OPENSSL_INTERFACE
@@ -768,11 +761,10 @@
movaps 0x70(%KEYP), %KEY
aesenclast %KEY, %STATE / last round
movups %STATE, (%OUTP) / output
SET_TS_OR_POP_XMM0_XMM1(%r10)
- /* EXPORT DELETE END */
ret
SET_SIZE(aes_encrypt_intel)
/*
@@ -796,11 +788,10 @@
* Original Intel OpenSSL Interface:
* void intel_AES_decrypt(const unsigned char *in, unsigned char *out,
* const AES_KEY *key);
*/
ENTRY_NP(aes_decrypt_intel)
- /* EXPORT DELETE START */
CLEAR_TS_OR_PUSH_XMM0_XMM1(%r10)
movups (%INP), %STATE / input
movaps (%KEYP), %KEY / key
#ifdef OPENSSL_INTERFACE
@@ -856,9 +847,8 @@
aesdeclast %KEY, %STATE / last round
movups %STATE, (%OUTP) / output
SET_TS_OR_POP_XMM0_XMM1(%r10)
ret
- /* EXPORT DELETE END */
SET_SIZE(aes_decrypt_intel)
#endif /* lint || __lint */