Skip to content
Snippets Groups Projects
Commit 8f379cd2 authored by Niels Möller's avatar Niels Möller
Browse files

* x86/machine.m4 (AES_LOAD): New macro.

Rev: src/nettle/x86/machine.m4:1.4
parent bd175463
No related branches found
No related tags found
No related merge requests found
...@@ -14,6 +14,22 @@ define(<AES_LAST_ROUND>, < ...@@ -14,6 +14,22 @@ define(<AES_LAST_ROUND>, <
andl <$>0xff000000,%ebp andl <$>0xff000000,%ebp
orl %ebp,%edi>)dnl 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(<AES_LOAD>, <
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 AES_STORE(key, dst)
dnl Adds the subkey pointed to by %esi to %eax-%edx, dnl Adds the subkey pointed to by %esi to %eax-%edx,
dnl and stores the result in the area pointed to by %edi. dnl and stores the result in the area pointed to by %edi.
...@@ -29,4 +45,3 @@ define(<AES_STORE>, < ...@@ -29,4 +45,3 @@ define(<AES_STORE>, <
movl %ebx,4($2) movl %ebx,4($2)
movl %ecx,8($2) movl %ecx,8($2)
movl %edx,12($2)>)dnl movl %edx,12($2)>)dnl
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment