Comply with optimization manual (no data should share cache-line with code).
authorAndy Polyakov <appro@openssl.org>
Mon, 9 May 2005 21:48:01 +0000 (21:48 +0000)
committerAndy Polyakov <appro@openssl.org>
Mon, 9 May 2005 21:48:01 +0000 (21:48 +0000)
crypto/aes/asm/aes-586.pl
crypto/perlasm/cbc.pl
crypto/sha/asm/sha512-sse2.pl

index 099118a1812574677dfb347aa207c93458a2bdfc..c1206238819a34a226256fbd24b0cbc8cdac0f71 100755 (executable)
@@ -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);
 #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);
 &function_end_B("_x86_AES_encrypt");
 
 # void AES_encrypt (const void *inp,void *out,const AES_KEY *key);
index 22149c680ec39f232a2eefe601041d34d1ce7612..e43dc9ae15edbb90597ac6613c2923421822f12f 100644 (file)
@@ -322,7 +322,8 @@ sub cbc
 
        &function_end_A($name);
 
 
        &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"));
        &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"));
        #&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);
        
 
        &function_end_B($name);
        
index 0596d5c503b6ed65758946b02d2746938bd2127f..10902bf673d58891478000d7a0e27e5b2cdc7a9f 100644 (file)
@@ -316,7 +316,7 @@ $func="sha512_block_sse2";
        &leave  ();
 &ret   ();
 
        &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
 &set_label("K512");    # Yes! I keep it in the code segment!
        &data_word(0xd728ae22,0x428a2f98);      # u64
        &data_word(0x23ef65cd,0x71374491);      # u64