summaryrefslogtreecommitdiff
path: root/x86/machine.m4
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2002-05-14 19:39:59 +0200
committerNiels Möller <nisse@lysator.liu.se>2002-05-14 19:39:59 +0200
commitbd175463920af917aa12bbeca982d85de9bcbad9 (patch)
tree6c3847532d93ab96f2c44b61d2b1a162e6d26601 /x86/machine.m4
parent72de3727377244f0030c121c5dc9c4a3e9cee2b9 (diff)
downloadnettle-bd175463920af917aa12bbeca982d85de9bcbad9.tar.gz
* x86/machine.m4 (AES_STORE): New macro.
Rev: src/nettle/x86/machine.m4:1.3
Diffstat (limited to 'x86/machine.m4')
-rw-r--r--x86/machine.m417
1 files changed, 17 insertions, 0 deletions
diff --git a/x86/machine.m4 b/x86/machine.m4
index d145b5b3..552de7a1 100644
--- a/x86/machine.m4
+++ b/x86/machine.m4
@@ -13,3 +13,20 @@ define(<AES_LAST_ROUND>, <
movl %e<>$4<>x,%ebp
andl <$>0xff000000,%ebp
orl %ebp,%edi>)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.
+dnl Note that x86 allows unaligned accesses.
+dnl Would it be preferable to interleave the loads and stores?
+define(<AES_STORE>, <
+ xorl ($1),%eax
+ xorl 4($1),%ebx
+ xorl 8($1),%ecx
+ xorl 12($1),%edx
+
+ movl %eax,($2)
+ movl %ebx,4($2)
+ movl %ecx,8($2)
+ movl %edx,12($2)>)dnl
+