sha/asm/sha{256|512}-armv4.pl: harmonize thumb2 support with the rest.
authorAndy Polyakov <appro@openssl.org>
Thu, 21 Jun 2018 11:52:04 +0000 (13:52 +0200)
committerAndy Polyakov <appro@openssl.org>
Fri, 22 Jun 2018 12:28:08 +0000 (14:28 +0200)
Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/sha/asm/sha256-armv4.pl
crypto/sha/asm/sha512-armv4.pl

index 55d30cba3a216fec943675d7e2e5e156cbf08bbd..509aa2c547789925dc6f3de581b07b888b39830c 100644 (file)
@@ -254,7 +254,7 @@ for($i=0;$i<16;$i++)        { &BODY_00_15($i,@V); unshift(@V,pop(@V)); }
 $code.=".Lrounds_16_xx:\n";
 for (;$i<32;$i++)      { &BODY_16_XX($i,@V); unshift(@V,pop(@V)); }
 $code.=<<___;
 $code.=".Lrounds_16_xx:\n";
 for (;$i<32;$i++)      { &BODY_16_XX($i,@V); unshift(@V,pop(@V)); }
 $code.=<<___;
-#if __ARM_ARCH__>=7
+#ifdef __thumb2__
        ite     eq                      @ Thumb2 thing, sanity check in ARM
 #endif
        ldreq   $t3,[sp,#16*4]          @ pull ctx
        ite     eq                      @ Thumb2 thing, sanity check in ARM
 #endif
        ldreq   $t3,[sp,#16*4]          @ pull ctx
index 22b5a9d0b1328ded0db569ea8dfa91883ed3ed03..872c27fbc249f32f5bcf8f6160d17e650e3a18aa 100644 (file)
@@ -157,7 +157,7 @@ $code.=<<___;
        teq     $t0,#$magic
 
        ldr     $t3,[sp,#$Coff+0]       @ c.lo
        teq     $t0,#$magic
 
        ldr     $t3,[sp,#$Coff+0]       @ c.lo
-#if __ARM_ARCH__>=7
+#ifdef __thumb2__
        it      eq                      @ Thumb2 thing, sanity check in ARM
 #endif
        orreq   $Ktbl,$Ktbl,#1
        it      eq                      @ Thumb2 thing, sanity check in ARM
 #endif
        orreq   $Ktbl,$Ktbl,#1
@@ -411,7 +411,7 @@ $code.=<<___;
 ___
        &BODY_00_15(0x17);
 $code.=<<___;
 ___
        &BODY_00_15(0x17);
 $code.=<<___;
-#if __ARM_ARCH__>=7
+#ifdef __thumb2__
        ittt    eq                      @ Thumb2 thing, sanity check in ARM
 #endif
        ldreq   $t0,[sp,#`$Xoff+8*(16-1)`+0]
        ittt    eq                      @ Thumb2 thing, sanity check in ARM
 #endif
        ldreq   $t0,[sp,#`$Xoff+8*(16-1)`+0]