~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, */*.S: New macros for making stack-unwinding tables.
[catacomb]
/
symm
/
rijndael-x86ish-aesni.S
diff --git
a/symm/rijndael-x86ish-aesni.S
b/symm/rijndael-x86ish-aesni.S
index
b0b880a
..
2b99b5c
100644
(file)
--- a/
symm/rijndael-x86ish-aesni.S
+++ b/
symm/rijndael-x86ish-aesni.S
@@
-85,10
+85,10
@@
FUNC(rijndael_setup_x86ish_aesni)
# define BLKOFF edx // block size in bytes
// Stack the caller's registers.
# define BLKOFF edx // block size in bytes
// Stack the caller's registers.
- push
ebp
- push
ebx
- push
esi
- push
edi
+ push
reg
ebp
+ push
reg
ebx
+ push
reg
esi
+ push
reg
edi
// Set up our own variables.
mov CTX, [esp + 20] // context base pointer
// Set up our own variables.
mov CTX, [esp + 20] // context base pointer
@@
-138,17
+138,16
@@
FUNC(rijndael_setup_x86ish_aesni)
// We'll need the index registers, which belong to the caller in this
// ABI.
// We'll need the index registers, which belong to the caller in this
// ABI.
- push rsi
- .seh_pushreg rsi
- push rdi
- .seh_pushreg rdi
- .seh_endprologue
+ pushreg rsi
+ pushreg rdi
// Move arguments to more useful places.
mov rsi, r8 // key material
mov CTX, rcx // context base pointer
#endif
// Move arguments to more useful places.
mov rsi, r8 // key material
mov CTX, rcx // context base pointer
#endif
+ endprologue
+
// The initial round key material is taken directly from the input
// key, so copy it over.
#if CPUFAM_AMD64 && ABI_SYSV
// The initial round key material is taken directly from the input
// key, so copy it over.
#if CPUFAM_AMD64 && ABI_SYSV
@@
-321,14
+320,14
@@
FUNC(rijndael_setup_x86ish_aesni)
9: // All done.
#if CPUFAM_X86
9: // All done.
#if CPUFAM_X86
- pop
edi
- pop
esi
- pop
ebx
- pop
ebp
+ pop
reg
edi
+ pop
reg
esi
+ pop
reg
ebx
+ pop
reg
ebp
#endif
#if CPUFAM_AMD64 && ABI_WIN
#endif
#if CPUFAM_AMD64 && ABI_WIN
- pop
rdi
- pop
rsi
+ pop
reg
rdi
+ pop
reg
rsi
#endif
ret
#endif
ret
@@
-337,9
+336,7
@@
ENDFUNC
INTFUNC(endswap_block)
// End-swap NKW words starting at SI. The end-swapping table is
// already loaded into XMM5; and it's OK to work in 16-byte chunks.
INTFUNC(endswap_block)
// End-swap NKW words starting at SI. The end-swapping table is
// already loaded into XMM5; and it's OK to work in 16-byte chunks.
-#if CPUFAM_AMD64 && ABI_WIN
- .seh_endprologue
-#endif
+ endprologue
mov ecx, NKW
0: movdqu xmm1, [SI]
mov ecx, NKW
0: movdqu xmm1, [SI]
@@
-399,9
+396,10
@@
ENDFUNC
# define SRC rdx
# define DST r8
# define NR eax
# define SRC rdx
# define DST r8
# define NR eax
- .seh_endprologue
#endif
#endif
+ endprologue
+
// Find the magic endianness-swapping table.
ldgot ecx
movdqa xmm5, [INTADDR(endswap_tab, ecx)]
// Find the magic endianness-swapping table.
ldgot ecx
movdqa xmm5, [INTADDR(endswap_tab, ecx)]
@@
-522,9
+520,7
@@
INTFUNC(bogus)
// might at least provide a hint as to what went wrong; (b) we don't
// have conditional CALLs (and they'd be big anyway); and (c) we can
// write a HLT here as a backstop against `abort' being mad.
// might at least provide a hint as to what went wrong; (b) we don't
// have conditional CALLs (and they'd be big anyway); and (c) we can
// write a HLT here as a backstop against `abort' being mad.
-#if CPUFAM_AMD64 && ABI_WIN
- .seh_endprologue
-#endif
+ endprologue
callext F(abort)
0: hlt
callext F(abort)
0: hlt