From e19e54904156b3c79d0325b4743500eacf80d864 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Mon, 9 May 2005 21:48:01 +0000 Subject: [PATCH] Comply with optimization manual (no data should share cache-line with code). --- crypto/aes/asm/aes-586.pl | 2 +- crypto/perlasm/cbc.pl | 4 +++- crypto/sha/asm/sha512-sse2.pl | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/crypto/aes/asm/aes-586.pl b/crypto/aes/asm/aes-586.pl index 099118a181..c120623881 100755 --- a/crypto/aes/asm/aes-586.pl +++ b/crypto/aes/asm/aes-586.pl @@ -426,7 +426,7 @@ sub _data_word() { my $i; while(defined($i=shift)) { &data_word($i,$i); } } #rcon: &data_word(0x00000001, 0x00000002, 0x00000004, 0x00000008); &data_word(0x00000010, 0x00000020, 0x00000040, 0x00000080); - &data_word(0x0000001b, 0x00000036); + &data_word(0x0000001b, 0x00000036, 0, 0, 0, 0, 0, 0); &function_end_B("_x86_AES_encrypt"); # void AES_encrypt (const void *inp,void *out,const AES_KEY *key); diff --git a/crypto/perlasm/cbc.pl b/crypto/perlasm/cbc.pl index 22149c680e..e43dc9ae15 100644 --- a/crypto/perlasm/cbc.pl +++ b/crypto/perlasm/cbc.pl @@ -322,7 +322,8 @@ sub cbc &function_end_A($name); - &set_label("cbc_enc_jmp_table",1); + &align(64); + &set_label("cbc_enc_jmp_table"); &data_word("0"); &data_word(&label("ej1")."-".&label("PIC_point")); &data_word(&label("ej2")."-".&label("PIC_point")); @@ -341,6 +342,7 @@ sub cbc #&data_word(&label("dj5")."-".&label("PIC_point")); #&data_word(&label("dj6")."-".&label("PIC_point")); #&data_word(&label("dj7")."-".&label("PIC_point")); + &align(64); &function_end_B($name); diff --git a/crypto/sha/asm/sha512-sse2.pl b/crypto/sha/asm/sha512-sse2.pl index 0596d5c503..10902bf673 100644 --- a/crypto/sha/asm/sha512-sse2.pl +++ b/crypto/sha/asm/sha512-sse2.pl @@ -316,7 +316,7 @@ $func="sha512_block_sse2"; &leave (); &ret (); -&align(16); +&align(64); &set_label("K512"); # Yes! I keep it in the code segment! &data_word(0xd728ae22,0x428a2f98); # u64 &data_word(0x23ef65cd,0x71374491); # u64 -- 2.34.1