Commit f0b674df authored by Niels Möller's avatar Niels Möller
Browse files

* x86/sha1-compress.asm: Use C_NAME for global symbols.

* x86/aes-encrypt.asm: Likewise.
* x86/aes-decrypt.asm: Likewise.
* x86/arcfour-crypt.asm: Likewise.

Rev: src/nettle/x86/aes-decrypt.asm:1.20
Rev: src/nettle/x86/aes-encrypt.asm:1.21
Rev: src/nettle/x86/arcfour-crypt.asm:1.12
Rev: src/nettle/x86/sha1-compress.asm:1.6
parent ace9e287
...@@ -20,13 +20,13 @@ C MA 02111-1307, USA. ...@@ -20,13 +20,13 @@ C MA 02111-1307, USA.
.file "aes-decrypt.asm" .file "aes-decrypt.asm"
C aes_decrypt(struct aes_context *ctx, C aes_decrypt(struct aes_context *ctx,
C unsigned length, uint8_t *dst, C unsigned length, uint8_t *dst,
C uint8_t *src) C uint8_t *src)
.text .text
.align 16 .align 16
.globl nettle_aes_decrypt .globl C_NAME(nettle_aes_decrypt)
.type nettle_aes_decrypt,@function .type C_NAME(nettle_aes_decrypt),@function
nettle_aes_decrypt: C_NAME(nettle_aes_decrypt):
C save all registers that need to be saved C save all registers that need to be saved
pushl %ebx C 16(%esp) pushl %ebx C 16(%esp)
pushl %ebp C 12(%esp) pushl %ebp C 12(%esp)
...@@ -59,16 +59,16 @@ nettle_aes_decrypt: ...@@ -59,16 +59,16 @@ nettle_aes_decrypt:
C In these patterns, note that each row, like C In these patterns, note that each row, like
C "a,d,c,b" corresponds to one *column* of the C "a,d,c,b" corresponds to one *column* of the
C array _aes_decrypt_table.idx. C array _aes_decrypt_table.idx.
AES_ROUND(_nettle_aes_decrypt_table,a,d,c,b) AES_ROUND(C_NAME(_nettle_aes_decrypt_table),a,d,c,b)
pushl %edi C save first on stack pushl %edi C save first on stack
AES_ROUND(_nettle_aes_decrypt_table,b,a,d,c) AES_ROUND(C_NAME(_nettle_aes_decrypt_table),b,a,d,c)
pushl %edi pushl %edi
AES_ROUND(_nettle_aes_decrypt_table,c,b,a,d) AES_ROUND(C_NAME(_nettle_aes_decrypt_table),c,b,a,d)
pushl %edi C save first on stack pushl %edi C save first on stack
AES_ROUND(_nettle_aes_decrypt_table,d,c,b,a) AES_ROUND(C_NAME(_nettle_aes_decrypt_table),d,c,b,a)
movl %edi,%edx movl %edi,%edx
popl %ecx popl %ecx
...@@ -129,4 +129,4 @@ nettle_aes_decrypt: ...@@ -129,4 +129,4 @@ nettle_aes_decrypt:
popl %ebx popl %ebx
ret ret
.Leord: .Leord:
.size nettle_aes_decrypt,.Leord-nettle_aes_decrypt .size C_NAME(nettle_aes_decrypt),.Leord-C_NAME(nettle_aes_decrypt)
...@@ -31,13 +31,13 @@ C %edi is a temporary, often used as an accumulator. ...@@ -31,13 +31,13 @@ C %edi is a temporary, often used as an accumulator.
.file "aes-encrypt.asm" .file "aes-encrypt.asm"
C aes_encrypt(struct aes_context *ctx, C aes_encrypt(struct aes_context *ctx,
C unsigned length, uint8_t *dst, C unsigned length, uint8_t *dst,
C uint8_t *src) C uint8_t *src)
.text .text
.align 16 .align 16
.globl nettle_aes_encrypt .globl C_NAME(nettle_aes_encrypt)
.type nettle_aes_encrypt,@function .type C_NAME(nettle_aes_encrypt),@function
nettle_aes_encrypt: C_NAME(nettle_aes_encrypt):
C save all registers that need to be saved C save all registers that need to be saved
pushl %ebx C 16(%esp) pushl %ebx C 16(%esp)
pushl %ebp C 12(%esp) pushl %ebp C 12(%esp)
...@@ -67,16 +67,16 @@ nettle_aes_encrypt: ...@@ -67,16 +67,16 @@ nettle_aes_encrypt:
.Lround_loop: .Lround_loop:
pushl %esi C save this first: we'll clobber it later pushl %esi C save this first: we'll clobber it later
AES_ROUND(_nettle_aes_encrypt_table,a,b,c,d) AES_ROUND(C_NAME(_nettle_aes_encrypt_table),a,b,c,d)
pushl %edi C save first on stack pushl %edi C save first on stack
AES_ROUND(_nettle_aes_encrypt_table,b,c,d,a) AES_ROUND(C_NAME(_nettle_aes_encrypt_table),b,c,d,a)
pushl %edi C save first on stack pushl %edi C save first on stack
AES_ROUND(_nettle_aes_encrypt_table,c,d,a,b) AES_ROUND(C_NAME(_nettle_aes_encrypt_table),c,d,a,b)
pushl %edi C save first on stack pushl %edi C save first on stack
AES_ROUND(_nettle_aes_encrypt_table,d,a,b,c) AES_ROUND(C_NAME(_nettle_aes_encrypt_table),d,a,b,c)
movl %edi,%edx movl %edi,%edx
popl %ecx popl %ecx
...@@ -114,7 +114,7 @@ nettle_aes_encrypt: ...@@ -114,7 +114,7 @@ nettle_aes_encrypt:
C S-box substitution C S-box substitution
mov $4,%edi mov $4,%edi
.Lsubst: .Lsubst:
AES_SUBST_BYTE(_nettle_aes_encrypt_table) AES_SUBST_BYTE(C_NAME(_nettle_aes_encrypt_table))
decl %edi decl %edi
jnz .Lsubst jnz .Lsubst
...@@ -137,4 +137,4 @@ nettle_aes_encrypt: ...@@ -137,4 +137,4 @@ nettle_aes_encrypt:
popl %ebx popl %ebx
ret ret
.Leord: .Leord:
.size nettle_aes_encrypt,.Leord-nettle_aes_encrypt .size C_NAME(nettle_aes_encrypt),.Leord-C_NAME(nettle_aes_encrypt)
...@@ -24,9 +24,9 @@ C MA 02111-1307, USA. ...@@ -24,9 +24,9 @@ C MA 02111-1307, USA.
C const uint8_t *src) C const uint8_t *src)
.text .text
.align 16 .align 16
.globl nettle_arcfour_crypt .globl C_NAME(nettle_arcfour_crypt)
.type nettle_arcfour_crypt,@function .type C_NAME(nettle_arcfour_crypt),@function
nettle_arcfour_crypt: C_NAME(nettle_arcfour_crypt):
C save all registers that need to be saved C save all registers that need to be saved
pushl %ebx C 12(%esp) pushl %ebx C 12(%esp)
pushl %ebp C 8(%esp) pushl %ebp C 8(%esp)
...@@ -91,4 +91,4 @@ C andl $0xff, %ebx ...@@ -91,4 +91,4 @@ C andl $0xff, %ebx
popl %ebx popl %ebx
ret ret
.Leord: .Leord:
.size nettle_arcfour_crypt,.Leord-nettle_arcfour_crypt .size C_NAME(nettle_arcfour_crypt),.Leord-C_NAME(nettle_arcfour_crypt)
...@@ -113,9 +113,9 @@ define(<ROUND>, < ...@@ -113,9 +113,9 @@ define(<ROUND>, <
.text .text
.align 16 .align 16
.globl _nettle_sha1_compress .globl C_NAME(_nettle_sha1_compress)
.type _nettle_sha1_compress,@function .type C_NAME(_nettle_sha1_compress),@function
_nettle_sha1_compress: C_NAME(_nettle_sha1_compress):
C save all registers that need to be saved C save all registers that need to be saved
pushl %ebx C 20(%esp) pushl %ebx C 20(%esp)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment