From: Niels Möller Date: Tue, 14 May 2002 17:50:02 +0000 (+0200) Subject: * x86/machine.m4 (AES_LOAD): New macro. X-Git-Tag: nettle_1.6_release_20021003~190 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f379cd2230363704a77bff6a13bfb19043cc4ed;p=thirdparty%2Fnettle.git * x86/machine.m4 (AES_LOAD): New macro. Rev: src/nettle/x86/machine.m4:1.4 --- diff --git a/x86/machine.m4 b/x86/machine.m4 index 552de7a1..dac44cdd 100644 --- a/x86/machine.m4 +++ b/x86/machine.m4 @@ -14,6 +14,22 @@ define(, < andl <$>0xff000000,%ebp orl %ebp,%edi>)dnl +dnl AES_LOAD(key, src) +dnl Loads the next block of data from src, and add the subkey pointed +dnl to by key. +dnl Note that x86 allows unaligned accesses. +dnl Would it be preferable to interleave the loads and stores? +define(, < + movl ($2),%eax + movl 4($2),%ebx + movl 8($2),%ecx + movl 12($2),%edx + + xorl ($1),%eax + xorl 4($1),%ebx + xorl 8($1),%ecx + xorl 12($1),%edx>)dnl + dnl AES_STORE(key, dst) dnl Adds the subkey pointed to by %esi to %eax-%edx, dnl and stores the result in the area pointed to by %edi. @@ -29,4 +45,3 @@ define(, < movl %ebx,4($2) movl %ecx,8($2) movl %edx,12($2)>)dnl -