~mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
base/asm-common.h, symm/rijndael-x86ish-aesni.S: Better section switching.
[catacomb]
/
symm
/
rijndael-x86ish-aesni.S
diff --git
a/symm/rijndael-x86ish-aesni.S
b/symm/rijndael-x86ish-aesni.S
index
2f6430b
..
3cca50f
100644
(file)
--- a/
symm/rijndael-x86ish-aesni.S
+++ b/
symm/rijndael-x86ish-aesni.S
@@
-390,10
+390,10
@@
ENDFUNC
// Arguments come in on the stack, and need to be collected. We
// don't have a shortage of registers.
// Arguments come in on the stack, and need to be collected. We
// don't have a shortage of registers.
-# define K e
c
x
+# define K e
a
x
# define SRC edx
# define DST edx
# define SRC edx
# define DST edx
-# define NR e
a
x
+# define NR e
c
x
mov K, [esp + 4]
mov SRC, [esp + 8]
mov K, [esp + 4]
mov SRC, [esp + 8]
@@
-432,6
+432,9
@@
ENDFUNC
movdqu xmm1, [K]
add K, 16
pxor xmm0, xmm1
movdqu xmm1, [K]
add K, 16
pxor xmm0, xmm1
+#if CPUFAM_X86
+ mov DST, [esp + 12]
+#endif
// Dispatch to the correct code.
cmp NR, 10
// Dispatch to the correct code.
cmp NR, 10
@@
-509,9
+512,6
@@
ENDFUNC
// Unpermute the ciphertext block and store it.
pshufb xmm0, xmm5
// Unpermute the ciphertext block and store it.
pshufb xmm0, xmm5
-#if CPUFAM_X86
- mov DST, [esp + 12]
-#endif
movdqu [DST], xmm0
// And we're done.
movdqu [DST], xmm0
// And we're done.
@@
-545,6
+545,8
@@
bogus: callext F(abort)
///--------------------------------------------------------------------------
/// Data tables.
///--------------------------------------------------------------------------
/// Data tables.
+ RODATA
+
.align 16
endswap_tab:
.byte 3, 2, 1, 0
.align 16
endswap_tab:
.byte 3, 2, 1, 0