Commit 51838634 authored by Niels Möller's avatar Niels Möller

* 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 5c55658f
......@@ -20,13 +20,13 @@ C MA 02111-1307, USA.
.file "aes-decrypt.asm"
C aes_decrypt(struct aes_context *ctx,
C unsigned length, uint8_t *dst,
C uint8_t *src)
C unsigned length, uint8_t *dst,
C uint8_t *src)
.text
.align 16
.globl nettle_aes_decrypt
.type nettle_aes_decrypt,@function
nettle_aes_decrypt:
.globl C_NAME(nettle_aes_decrypt)
.type C_NAME(nettle_aes_decrypt),@function
C_NAME(nettle_aes_decrypt):
C save all registers that need to be saved
pushl %ebx C 16(%esp)
pushl %ebp C 12(%esp)
......@@ -59,16 +59,16 @@ nettle_aes_decrypt:
C In these patterns, note that each row, like
C "a,d,c,b" corresponds to one *column* of the
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
AES_ROUND(_nettle_aes_decrypt_table,b,a,d,c)
AES_ROUND(C_NAME(_nettle_aes_decrypt_table),b,a,d,c)
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
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
popl %ecx
......@@ -129,4 +129,4 @@ nettle_aes_decrypt:
popl %ebx
ret
.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.
.file "aes-encrypt.asm"
C aes_encrypt(struct aes_context *ctx,
C unsigned length, uint8_t *dst,
C uint8_t *src)
C unsigned length, uint8_t *dst,
C uint8_t *src)
.text
.align 16
.globl nettle_aes_encrypt
.type nettle_aes_encrypt,@function
nettle_aes_encrypt:
.globl C_NAME(nettle_aes_encrypt)
.type C_NAME(nettle_aes_encrypt),@function
C_NAME(nettle_aes_encrypt):
C save all registers that need to be saved
pushl %ebx C 16(%esp)
pushl %ebp C 12(%esp)
......@@ -67,16 +67,16 @@ nettle_aes_encrypt:
.Lround_loop:
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
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
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
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
popl %ecx
......@@ -114,7 +114,7 @@ nettle_aes_encrypt:
C S-box substitution
mov $4,%edi
.Lsubst:
AES_SUBST_BYTE(_nettle_aes_encrypt_table)
AES_SUBST_BYTE(C_NAME(_nettle_aes_encrypt_table))
decl %edi
jnz .Lsubst
......@@ -137,4 +137,4 @@ nettle_aes_encrypt:
popl %ebx
ret
.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.
C const uint8_t *src)
.text
.align 16
.globl nettle_arcfour_crypt
.type nettle_arcfour_crypt,@function
nettle_arcfour_crypt:
.globl C_NAME(nettle_arcfour_crypt)
.type C_NAME(nettle_arcfour_crypt),@function
C_NAME(nettle_arcfour_crypt):
C save all registers that need to be saved
pushl %ebx C 12(%esp)
pushl %ebp C 8(%esp)
......@@ -91,4 +91,4 @@ C andl $0xff, %ebx
popl %ebx
ret
.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>, <
.text
.align 16
.globl _nettle_sha1_compress
.type _nettle_sha1_compress,@function
_nettle_sha1_compress:
.globl C_NAME(_nettle_sha1_compress)
.type C_NAME(_nettle_sha1_compress),@function
C_NAME(_nettle_sha1_compress):
C save all registers that need to be saved
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