vpaes-x86.pl: revert previous commit and solve the problem through x86masm.pl.
[openssl.git] / crypto / aes / asm / vpaes-x86.pl
index 30446e60db3fa16880494296a8af75ab2fa331cd..84a6f6d336ca421b9e22de2515b5dbef6e6f45db 100644 (file)
@@ -762,7 +762,7 @@ $k_dsbo=0x2c0;              # decryption sbox final output
        &mov    ($magic,0x30);
        &mov    ($out,0);
 
-       &mov    ($const,&label("_vpaes_consts")."+0x30-".&label("pic_point"));
+       &lea    ($const,&DWP(&label("_vpaes_consts")."+0x30-".&label("pic_point")));
        &call   ("_vpaes_schedule_core");
 &set_label("pic_point");
 
@@ -792,7 +792,7 @@ $k_dsbo=0x2c0;              # decryption sbox final output
        &and    ($magic,32);
        &xor    ($magic,32);                    # nbist==192?0:32;
 
-       &mov    ($const,&label("_vpaes_consts")."+0x30-".&label("pic_point"));
+       &lea    ($const,&DWP(&label("_vpaes_consts")."+0x30-".&label("pic_point")));
        &call   ("_vpaes_schedule_core");
 &set_label("pic_point");
 
@@ -801,7 +801,7 @@ $k_dsbo=0x2c0;              # decryption sbox final output
 &function_end("${PREFIX}_set_decrypt_key");
 
 &function_begin("${PREFIX}_encrypt");
-       &mov    ($const,&label("_vpaes_consts")."+0x30-".&label("pic_point"));
+       &lea    ($const,&DWP(&label("_vpaes_consts")."+0x30-".&label("pic_point")));
        &call   ("_vpaes_preheat");
 &set_label("pic_point");
        &mov    ($inp,&wparam(0));              # inp
@@ -820,7 +820,7 @@ $k_dsbo=0x2c0;              # decryption sbox final output
 &function_end("${PREFIX}_encrypt");
 
 &function_begin("${PREFIX}_decrypt");
-       &mov    ($const,&label("_vpaes_consts")."+0x30-".&label("pic_point"));
+       &lea    ($const,&DWP(&label("_vpaes_consts")."+0x30-".&label("pic_point")));
        &call   ("_vpaes_preheat");
 &set_label("pic_point");
        &mov    ($inp,&wparam(0));              # inp
@@ -858,7 +858,7 @@ $k_dsbo=0x2c0;              # decryption sbox final output
        &mov    (&DWP(8,"esp"),$const);         # save ivp
        &mov    ($out,$round);                  # $out works as $len
 
-       &mov    ($const,&label("_vpaes_consts")."+0x30-".&label("pic_point"));
+       &lea    ($const,&DWP(&label("_vpaes_consts")."+0x30-".&label("pic_point")));
        &call   ("_vpaes_preheat");
 &set_label("pic_point");
        &cmp    ($magic,0);