From a95717aa058618ee040bbfc81a51a476d7c9e8a8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se>
Date: Tue, 14 May 2002 20:17:22 +0200
Subject: [PATCH] * x86/aes-encrypt.asm (aes_encrypt): Replaced first quarter
 of the round function with an invocation of AES_ROUND.

Rev: src/nettle/x86/aes-encrypt.asm:1.10
---
 x86/aes-encrypt.asm | 33 +++++++++++++++++----------------
 1 file changed, 17 insertions(+), 16 deletions(-)

diff --git a/x86/aes-encrypt.asm b/x86/aes-encrypt.asm
index ee1e2fdc..0e504641 100644
--- a/x86/aes-encrypt.asm
+++ b/x86/aes-encrypt.asm
@@ -80,22 +80,23 @@ aes_encrypt:
 	C      ^ table[3][B3(%ebx)]
 	C
 	C a b c d
-	movl	%eax, %esi
-	andl	$0xff, %esi
-	shll	$2,%esi		C  index in table
-	movl	AES_TABLE0 + _aes_encrypt_table (%esi),%edi
-	movl	%ebx, %esi
-	shrl	$6,%esi
-	andl	$0x000003fc,%esi C  clear all but offset bytes
-	xorl	AES_TABLE1 + _aes_encrypt_table (%esi),%edi
-	movl	%ecx,%esi	C  third one
-	shrl	$14,%esi
-	andl	$0x000003fc,%esi
-	xorl	AES_TABLE2 + _aes_encrypt_table (%esi),%edi
-	movl	%edx,%esi	C  fourth one
-	shrl	$22,%esi
-	andl	$0x000003fc,%esi
-	xorl	AES_TABLE3 + _aes_encrypt_table (%esi),%edi
+	AES_ROUND(_aes_encrypt_table,a,b,c,d)
+C 	movl	%eax, %esi
+C 	andl	$0xff, %esi
+C 	shll	$2,%esi		C  index in table
+C 	movl	AES_TABLE0 + _aes_encrypt_table (%esi),%edi
+C 	movl	%ebx, %esi
+C 	shrl	$6,%esi
+C 	andl	$0x000003fc,%esi C  clear all but offset bytes
+C 	xorl	AES_TABLE1 + _aes_encrypt_table (%esi),%edi
+C 	movl	%ecx,%esi	C  third one
+C 	shrl	$14,%esi
+C 	andl	$0x000003fc,%esi
+C 	xorl	AES_TABLE2 + _aes_encrypt_table (%esi),%edi
+C 	movl	%edx,%esi	C  fourth one
+C 	shrl	$22,%esi
+C 	andl	$0x000003fc,%esi
+C 	xorl	AES_TABLE3 + _aes_encrypt_table (%esi),%edi
 	pushl	%edi		C  save first on stack
 
 	C // Second column
-- 
GitLab