From 177464d8413ea6ccde73d78f4987dc3e0a58e3e8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se>
Date: Wed, 5 Oct 2005 23:23:06 +0200
Subject: [PATCH] * x86/aes-decrypt.asm: Use C_NAME(_nettle_aes_decrypt_table)
 when using the AES_SUBST_BYTE macro. Use PROLOGUE and EPILOGUE. *
 x86/sha1-compress.asm: Use PROLOGUE and EPILOGUE. * x86/arcfour-crypt.asm:
 Likewise. * x86/aes-encrypt.asm: Likewise.

Rev: src/nettle/x86/aes-encrypt.asm:1.22
Rev: src/nettle/x86/arcfour-crypt.asm:1.13
Rev: src/nettle/x86/sha1-compress.asm:1.11
---
 x86/aes-encrypt.asm   | 7 ++-----
 x86/arcfour-crypt.asm | 7 ++-----
 x86/sha1-compress.asm | 8 ++------
 3 files changed, 6 insertions(+), 16 deletions(-)

diff --git a/x86/aes-encrypt.asm b/x86/aes-encrypt.asm
index 346ddf5c..ddc4f262 100644
--- a/x86/aes-encrypt.asm
+++ b/x86/aes-encrypt.asm
@@ -35,9 +35,7 @@ C %edi is a temporary, often used as an accumulator.
 	C	      uint8_t *src)
 	.text
 	.align 16
-	.globl C_NAME(nettle_aes_encrypt)
-	.type  C_NAME(nettle_aes_encrypt),@function
-C_NAME(nettle_aes_encrypt):
+PROLOGUE(nettle_aes_encrypt)
 	C save all registers that need to be saved
 	pushl	%ebx		C  16(%esp)
 	pushl	%ebp		C  12(%esp)
@@ -136,5 +134,4 @@ C_NAME(nettle_aes_encrypt):
 	popl	%ebp
 	popl	%ebx
 	ret
-.Leord:
-	.size	C_NAME(nettle_aes_encrypt),.Leord-C_NAME(nettle_aes_encrypt)
+EPILOGUE(nettle_aes_encrypt)
diff --git a/x86/arcfour-crypt.asm b/x86/arcfour-crypt.asm
index 7f976406..74a65a94 100644
--- a/x86/arcfour-crypt.asm
+++ b/x86/arcfour-crypt.asm
@@ -24,9 +24,7 @@ C MA 02111-1307, USA.
 	C               const uint8_t *src)
 	.text
 	.align 16
-	.globl C_NAME(nettle_arcfour_crypt)
-	.type  C_NAME(nettle_arcfour_crypt),@function
-C_NAME(nettle_arcfour_crypt):
+PROLOGUE(nettle_arcfour_crypt)
 	C save all registers that need to be saved
 	pushl	%ebx		C  12(%esp)
 	pushl	%ebp		C  8(%esp)
@@ -90,5 +88,4 @@ C	andl	$0xff, %ebx
 	popl	%ebp
 	popl	%ebx
 	ret
-.Leord:
-	.size	C_NAME(nettle_arcfour_crypt),.Leord-C_NAME(nettle_arcfour_crypt)
+EPILOGUE(nettle_arcfour_crypt)
diff --git a/x86/sha1-compress.asm b/x86/sha1-compress.asm
index cbab4122..e3f496c4 100644
--- a/x86/sha1-compress.asm
+++ b/x86/sha1-compress.asm
@@ -124,9 +124,7 @@ C adding, and then rotating back.
 	
 	.text
 	.align 16
-	.globl C_NAME(_nettle_sha1_compress)
-	.type  C_NAME(_nettle_sha1_compress),@function
-C_NAME(_nettle_sha1_compress):
+PROLOGUE(_nettle_sha1_compress)
 	C save all registers that need to be saved
 	
 	pushl	%ebx		C  80(%esp)
@@ -268,9 +266,7 @@ C_NAME(_nettle_sha1_compress):
 	popl	%ebp
 	popl	%ebx
 	ret
-
-.Leord:
-	.size	_nettle_sha1_compress,.Leord-_nettle_sha1_compress
+EPILOGUE(_nettle_sha1_compress)
 
 C  It's possible to shave of half of the stores to tmp in the evaluation of f3,
 C  although it's probably not worth the effort. This is the trick: 
-- 
GitLab