isaacpittman-hitachi / rpms / openssl

Forked from rpms/openssl 2 years ago
Clone
7d1228
diff -up openssl-1.1.1e/crypto/aes/asm/aesni-x86_64.pl.intel-cet openssl-1.1.1e/crypto/aes/asm/aesni-x86_64.pl
7d1228
--- openssl-1.1.1e/crypto/aes/asm/aesni-x86_64.pl.intel-cet	2020-03-17 15:31:17.000000000 +0100
7d1228
+++ openssl-1.1.1e/crypto/aes/asm/aesni-x86_64.pl	2020-03-19 17:07:02.626522694 +0100
7d1228
@@ -275,6 +275,7 @@ $code.=<<___;
7d1228
 .align	16
7d1228
 ${PREFIX}_encrypt:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	movups	($inp),$inout0		# load input
7d1228
 	mov	240($key),$rounds	# key->rounds
7d1228
 ___
7d1228
@@ -293,6 +294,7 @@ $code.=<<___;
7d1228
 .align	16
7d1228
 ${PREFIX}_decrypt:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	movups	($inp),$inout0		# load input
7d1228
 	mov	240($key),$rounds	# key->rounds
7d1228
 ___
7d1228
@@ -613,6 +615,7 @@ $code.=<<___;
7d1228
 .align	16
7d1228
 aesni_ecb_encrypt:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 ___
7d1228
 $code.=<<___ if ($win64);
7d1228
 	lea	-0x58(%rsp),%rsp
7d1228
@@ -985,6 +988,7 @@ $code.=<<___;
7d1228
 .align	16
7d1228
 aesni_ccm64_encrypt_blocks:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 ___
7d1228
 $code.=<<___ if ($win64);
7d1228
 	lea	-0x58(%rsp),%rsp
7d1228
@@ -1077,6 +1081,7 @@ $code.=<<___;
7d1228
 .align	16
7d1228
 aesni_ccm64_decrypt_blocks:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 ___
7d1228
 $code.=<<___ if ($win64);
7d1228
 	lea	-0x58(%rsp),%rsp
7d1228
@@ -1203,6 +1208,7 @@ $code.=<<___;
7d1228
 .align	16
7d1228
 aesni_ctr32_encrypt_blocks:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	cmp	\$1,$len
7d1228
 	jne	.Lctr32_bulk
7d1228
 
7d1228
@@ -1775,6 +1781,7 @@ $code.=<<___;
7d1228
 .align	16
7d1228
 aesni_xts_encrypt:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	lea	(%rsp),%r11			# frame pointer
7d1228
 .cfi_def_cfa_register	%r11
7d1228
 	push	%rbp
7d1228
@@ -2258,6 +2265,7 @@ $code.=<<___;
7d1228
 .align	16
7d1228
 aesni_xts_decrypt:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	lea	(%rsp),%r11			# frame pointer
7d1228
 .cfi_def_cfa_register	%r11
7d1228
 	push	%rbp
7d1228
@@ -2783,6 +2791,7 @@ $code.=<<___;
7d1228
 .align	32
7d1228
 aesni_ocb_encrypt:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	lea	(%rsp),%rax
7d1228
 	push	%rbx
7d1228
 .cfi_push	%rbx
7d1228
@@ -3249,6 +3258,7 @@ __ocb_encrypt1:
7d1228
 .align	32
7d1228
 aesni_ocb_decrypt:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	lea	(%rsp),%rax
7d1228
 	push	%rbx
7d1228
 .cfi_push	%rbx
7d1228
@@ -3737,6 +3747,7 @@ $code.=<<___;
7d1228
 .align	16
7d1228
 ${PREFIX}_cbc_encrypt:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	test	$len,$len		# check length
7d1228
 	jz	.Lcbc_ret
7d1228
 
7d1228
diff -up openssl-1.1.1e/crypto/aes/asm/vpaes-x86_64.pl.intel-cet openssl-1.1.1e/crypto/aes/asm/vpaes-x86_64.pl
7d1228
--- openssl-1.1.1e/crypto/aes/asm/vpaes-x86_64.pl.intel-cet	2020-03-17 15:31:17.000000000 +0100
7d1228
+++ openssl-1.1.1e/crypto/aes/asm/vpaes-x86_64.pl	2020-03-19 17:00:15.974621757 +0100
7d1228
@@ -696,6 +696,7 @@ _vpaes_schedule_mangle:
7d1228
 .align	16
7d1228
 ${PREFIX}_set_encrypt_key:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 ___
7d1228
 $code.=<<___ if ($win64);
7d1228
 	lea	-0xb8(%rsp),%rsp
7d1228
@@ -746,6 +747,7 @@ $code.=<<___;
7d1228
 .align	16
7d1228
 ${PREFIX}_set_decrypt_key:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 ___
7d1228
 $code.=<<___ if ($win64);
7d1228
 	lea	-0xb8(%rsp),%rsp
7d1228
@@ -801,6 +803,7 @@ $code.=<<___;
7d1228
 .align	16
7d1228
 ${PREFIX}_encrypt:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 ___
7d1228
 $code.=<<___ if ($win64);
7d1228
 	lea	-0xb8(%rsp),%rsp
7d1228
@@ -846,6 +849,7 @@ $code.=<<___;
7d1228
 .align	16
7d1228
 ${PREFIX}_decrypt:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 ___
7d1228
 $code.=<<___ if ($win64);
7d1228
 	lea	-0xb8(%rsp),%rsp
7d1228
@@ -897,6 +901,7 @@ $code.=<<___;
7d1228
 .align	16
7d1228
 ${PREFIX}_cbc_encrypt:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	xchg	$key,$len
7d1228
 ___
7d1228
 ($len,$key)=($key,$len);
7d1228
diff -up openssl-1.1.1e/crypto/async/arch/async_posix.c.intel-cet openssl-1.1.1e/crypto/async/arch/async_posix.c
7d1228
--- openssl-1.1.1e/crypto/async/arch/async_posix.c.intel-cet	2020-03-17 15:31:17.000000000 +0100
7d1228
+++ openssl-1.1.1e/crypto/async/arch/async_posix.c	2020-03-19 17:00:15.974621757 +0100
7d1228
@@ -34,7 +34,9 @@ void async_local_cleanup(void)
7d1228
 
7d1228
 int async_fibre_makecontext(async_fibre *fibre)
7d1228
 {
7d1228
+#ifndef USE_SWAPCONTEXT
7d1228
     fibre->env_init = 0;
7d1228
+#endif
7d1228
     if (getcontext(&fibre->fibre) == 0) {
7d1228
         fibre->fibre.uc_stack.ss_sp = OPENSSL_malloc(STACKSIZE);
7d1228
         if (fibre->fibre.uc_stack.ss_sp != NULL) {
7d1228
diff -up openssl-1.1.1e/crypto/async/arch/async_posix.h.intel-cet openssl-1.1.1e/crypto/async/arch/async_posix.h
7d1228
--- openssl-1.1.1e/crypto/async/arch/async_posix.h.intel-cet	2020-03-19 17:00:15.435631166 +0100
7d1228
+++ openssl-1.1.1e/crypto/async/arch/async_posix.h	2020-03-19 17:00:15.975621739 +0100
7d1228
@@ -25,17 +25,33 @@
7d1228
 #  define ASYNC_POSIX
7d1228
 #  define ASYNC_ARCH
7d1228
 
7d1228
+#  ifdef __CET__
7d1228
+/*
7d1228
+ * When Intel CET is enabled, makecontext will create a different
7d1228
+ * shadow stack for each context.  async_fibre_swapcontext cannot
7d1228
+ * use _longjmp.  It must call swapcontext to swap shadow stack as
7d1228
+ * well as normal stack.
7d1228
+ */
7d1228
+#   define USE_SWAPCONTEXT
7d1228
+#  endif
7d1228
 #  include <ucontext.h>
7d1228
-#  include <setjmp.h>
7d1228
+#  ifndef USE_SWAPCONTEXT
7d1228
+#   include <setjmp.h>
7d1228
+#  endif
7d1228
 
7d1228
 typedef struct async_fibre_st {
7d1228
     ucontext_t fibre;
7d1228
+#  ifndef USE_SWAPCONTEXT
7d1228
     jmp_buf env;
7d1228
     int env_init;
7d1228
+#  endif
7d1228
 } async_fibre;
7d1228
 
7d1228
 static ossl_inline int async_fibre_swapcontext(async_fibre *o, async_fibre *n, int r)
7d1228
 {
7d1228
+#  ifdef USE_SWAPCONTEXT
7d1228
+    swapcontext(&o->fibre, &n->fibre);
7d1228
+#  else
7d1228
     o->env_init = 1;
7d1228
 
7d1228
     if (!r || !_setjmp(o->env)) {
7d1228
@@ -44,6 +60,7 @@ static ossl_inline int async_fibre_swapc
7d1228
         else
7d1228
             setcontext(&n->fibre);
7d1228
     }
7d1228
+#  endif
7d1228
 
7d1228
     return 1;
7d1228
 }
7d1228
diff -up openssl-1.1.1e/crypto/camellia/asm/cmll-x86_64.pl.intel-cet openssl-1.1.1e/crypto/camellia/asm/cmll-x86_64.pl
7d1228
--- openssl-1.1.1e/crypto/camellia/asm/cmll-x86_64.pl.intel-cet	2020-03-17 15:31:17.000000000 +0100
7d1228
+++ openssl-1.1.1e/crypto/camellia/asm/cmll-x86_64.pl	2020-03-19 17:00:15.975621739 +0100
7d1228
@@ -685,6 +685,7 @@ $code.=<<___;
7d1228
 .align	16
7d1228
 Camellia_cbc_encrypt:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	cmp	\$0,%rdx
7d1228
 	je	.Lcbc_abort
7d1228
 	push	%rbx
7d1228
diff -up openssl-1.1.1e/crypto/modes/asm/ghash-x86_64.pl.intel-cet openssl-1.1.1e/crypto/modes/asm/ghash-x86_64.pl
7d1228
--- openssl-1.1.1e/crypto/modes/asm/ghash-x86_64.pl.intel-cet	2020-03-17 15:31:17.000000000 +0100
7d1228
+++ openssl-1.1.1e/crypto/modes/asm/ghash-x86_64.pl	2020-03-19 17:00:15.975621739 +0100
7d1228
@@ -239,6 +239,7 @@ $code=<<___;
7d1228
 .align	16
7d1228
 gcm_gmult_4bit:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	push	%rbx
7d1228
 .cfi_push	%rbx
7d1228
 	push	%rbp		# %rbp and others are pushed exclusively in
7d1228
@@ -286,6 +287,7 @@ $code.=<<___;
7d1228
 .align	16
7d1228
 gcm_ghash_4bit:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	push	%rbx
7d1228
 .cfi_push	%rbx
7d1228
 	push	%rbp
7d1228
@@ -612,6 +614,7 @@ $code.=<<___;
7d1228
 .align	16
7d1228
 gcm_gmult_clmul:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 .L_gmult_clmul:
7d1228
 	movdqu		($Xip),$Xi
7d1228
 	movdqa		.Lbswap_mask(%rip),$T3
7d1228
@@ -663,6 +666,7 @@ $code.=<<___;
7d1228
 .align	32
7d1228
 gcm_ghash_clmul:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 .L_ghash_clmul:
7d1228
 ___
7d1228
 $code.=<<___ if ($win64);
7d1228
@@ -1166,6 +1170,7 @@ $code.=<<___;
7d1228
 .align	32
7d1228
 gcm_gmult_avx:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	jmp	.L_gmult_clmul
7d1228
 .cfi_endproc
7d1228
 .size	gcm_gmult_avx,.-gcm_gmult_avx
7d1228
@@ -1177,6 +1182,7 @@ $code.=<<___;
7d1228
 .align	32
7d1228
 gcm_ghash_avx:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 ___
7d1228
 if ($avx) {
7d1228
 my ($Xip,$Htbl,$inp,$len)=@_4args;
7d1228
diff -up openssl-1.1.1e/crypto/perlasm/cbc.pl.intel-cet openssl-1.1.1e/crypto/perlasm/cbc.pl
7d1228
--- openssl-1.1.1e/crypto/perlasm/cbc.pl.intel-cet	2020-03-17 15:31:17.000000000 +0100
7d1228
+++ openssl-1.1.1e/crypto/perlasm/cbc.pl	2020-03-19 17:00:15.976621722 +0100
7d1228
@@ -165,21 +165,28 @@ sub cbc
7d1228
 	&jmp_ptr($count);
7d1228
 
7d1228
 &set_label("ej7");
7d1228
+	&endbranch()
7d1228
 	&movb(&HB("edx"),	&BP(6,$in,"",0));
7d1228
 	&shl("edx",8);
7d1228
 &set_label("ej6");
7d1228
+	&endbranch()
7d1228
 	&movb(&HB("edx"),	&BP(5,$in,"",0));
7d1228
 &set_label("ej5");
7d1228
+	&endbranch()
7d1228
 	&movb(&LB("edx"),	&BP(4,$in,"",0));
7d1228
 &set_label("ej4");
7d1228
+	&endbranch()
7d1228
 	&mov("ecx",		&DWP(0,$in,"",0));
7d1228
 	&jmp(&label("ejend"));
7d1228
 &set_label("ej3");
7d1228
+	&endbranch()
7d1228
 	&movb(&HB("ecx"),	&BP(2,$in,"",0));
7d1228
 	&shl("ecx",8);
7d1228
 &set_label("ej2");
7d1228
+	&endbranch()
7d1228
 	&movb(&HB("ecx"),	&BP(1,$in,"",0));
7d1228
 &set_label("ej1");
7d1228
+	&endbranch()
7d1228
 	&movb(&LB("ecx"),	&BP(0,$in,"",0));
7d1228
 &set_label("ejend");
7d1228
 
7d1228
diff -up openssl-1.1.1e/crypto/perlasm/x86_64-xlate.pl.intel-cet openssl-1.1.1e/crypto/perlasm/x86_64-xlate.pl
7d1228
--- openssl-1.1.1e/crypto/perlasm/x86_64-xlate.pl.intel-cet	2020-03-17 15:31:17.000000000 +0100
7d1228
+++ openssl-1.1.1e/crypto/perlasm/x86_64-xlate.pl	2020-03-19 17:00:15.984621582 +0100
7d1228
@@ -101,6 +101,33 @@ elsif (!$gas)
7d1228
     $decor="\$L\$";
7d1228
 }
7d1228
 
7d1228
+my $cet_property;
7d1228
+if ($flavour =~ /elf/) {
7d1228
+	# Always generate .note.gnu.property section for ELF outputs to
7d1228
+	# mark Intel CET support since all input files must be marked
7d1228
+	# with Intel CET support in order for linker to mark output with
7d1228
+	# Intel CET support.
7d1228
+	my $p2align=3; $p2align=2 if ($flavour eq "elf32");
7d1228
+	$cet_property = <<_____;
7d1228
+	.section ".note.gnu.property", "a"
7d1228
+	.p2align $p2align
7d1228
+	.long 1f - 0f
7d1228
+	.long 4f - 1f
7d1228
+	.long 5
7d1228
+0:
7d1228
+	.asciz "GNU"
7d1228
+1:
7d1228
+	.p2align $p2align
7d1228
+	.long 0xc0000002
7d1228
+	.long 3f - 2f
7d1228
+2:
7d1228
+	.long 3
7d1228
+3:
7d1228
+	.p2align $p2align
7d1228
+4:
7d1228
+_____
7d1228
+}
7d1228
+
7d1228
 my $current_segment;
7d1228
 my $current_function;
7d1228
 my %globals;
7d1228
@@ -1213,6 +1240,7 @@ while(defined(my $line=<>)) {
7d1228
     print $line,"\n";
7d1228
 }
7d1228
 
7d1228
+print "$cet_property"			if ($cet_property);
7d1228
 print "\n$current_segment\tENDS\n"	if ($current_segment && $masm);
7d1228
 print "END\n"				if ($masm);
7d1228
 
7d1228
diff -up openssl-1.1.1e/crypto/perlasm/x86gas.pl.intel-cet openssl-1.1.1e/crypto/perlasm/x86gas.pl
7d1228
--- openssl-1.1.1e/crypto/perlasm/x86gas.pl.intel-cet	2020-03-17 15:31:17.000000000 +0100
7d1228
+++ openssl-1.1.1e/crypto/perlasm/x86gas.pl	2020-03-19 17:00:15.985621565 +0100
7d1228
@@ -124,6 +124,7 @@ sub ::function_begin_B
7d1228
     push(@out,".align\t$align\n");
7d1228
     push(@out,"$func:\n");
7d1228
     push(@out,"$begin:\n")		if ($global);
7d1228
+    &::endbranch();
7d1228
     $::stack=4;
7d1228
 }
7d1228
 
7d1228
@@ -172,6 +173,26 @@ sub ::file_end
7d1228
 	else		{ push (@out,"$tmp\n"); }
7d1228
     }
7d1228
     push(@out,$initseg) if ($initseg);
7d1228
+    if ($::elf) {
7d1228
+	push(@out,"
7d1228
+	.section \".note.gnu.property\", \"a\"
7d1228
+	.p2align 2
7d1228
+	.long 1f - 0f
7d1228
+	.long 4f - 1f
7d1228
+	.long 5
7d1228
+0:
7d1228
+	.asciz \"GNU\"
7d1228
+1:
7d1228
+	.p2align 2
7d1228
+	.long 0xc0000002
7d1228
+	.long 3f - 2f
7d1228
+2:
7d1228
+	.long 3
7d1228
+3:
7d1228
+	.p2align 2
7d1228
+4:
7d1228
+");
7d1228
+    }
7d1228
 }
7d1228
 
7d1228
 sub ::data_byte	{   push(@out,".byte\t".join(',',@_)."\n");   }
7d1228
diff -up openssl-1.1.1e/crypto/poly1305/asm/poly1305-x86_64.pl.intel-cet openssl-1.1.1e/crypto/poly1305/asm/poly1305-x86_64.pl
7d1228
--- openssl-1.1.1e/crypto/poly1305/asm/poly1305-x86_64.pl.intel-cet	2020-03-19 17:00:38.185234015 +0100
7d1228
+++ openssl-1.1.1e/crypto/poly1305/asm/poly1305-x86_64.pl	2020-03-19 17:05:46.575850341 +0100
7d1228
@@ -2806,6 +2806,7 @@ $code.=<<___;
7d1228
 .align	32
7d1228
 poly1305_blocks_vpmadd52:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	shr	\$4,$len
7d1228
 	jz	.Lno_data_vpmadd52		# too short
7d1228
 
7d1228
@@ -3739,6 +3740,7 @@ $code.=<<___;
7d1228
 .align	32
7d1228
 poly1305_emit_base2_44:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	mov	0($ctx),%r8	# load hash value
7d1228
 	mov	8($ctx),%r9
7d1228
 	mov	16($ctx),%r10
7d1228
diff -up openssl-1.1.1e/crypto/rc4/asm/rc4-x86_64.pl.intel-cet openssl-1.1.1e/crypto/rc4/asm/rc4-x86_64.pl
7d1228
--- openssl-1.1.1e/crypto/rc4/asm/rc4-x86_64.pl.intel-cet	2020-03-19 17:00:38.190233928 +0100
7d1228
+++ openssl-1.1.1e/crypto/rc4/asm/rc4-x86_64.pl	2020-03-19 17:05:02.598618064 +0100
7d1228
@@ -140,6 +140,7 @@ $code=<<___;
7d1228
 .align	16
7d1228
 RC4:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	or	$len,$len
7d1228
 	jne	.Lentry
7d1228
 	ret
7d1228
@@ -455,6 +456,7 @@ $code.=<<___;
7d1228
 .align	16
7d1228
 RC4_set_key:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	lea	8($dat),$dat
7d1228
 	lea	($inp,$len),$inp
7d1228
 	neg	$len
7d1228
@@ -529,6 +531,7 @@ RC4_set_key:
7d1228
 .align	16
7d1228
 RC4_options:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	lea	.Lopts(%rip),%rax
7d1228
 	mov	OPENSSL_ia32cap_P(%rip),%edx
7d1228
 	bt	\$20,%edx
7d1228
diff -up openssl-1.1.1e/crypto/x86_64cpuid.pl.intel-cet openssl-1.1.1e/crypto/x86_64cpuid.pl
7d1228
--- openssl-1.1.1e/crypto/x86_64cpuid.pl.intel-cet	2020-03-17 15:31:17.000000000 +0100
7d1228
+++ openssl-1.1.1e/crypto/x86_64cpuid.pl	2020-03-19 17:03:58.172742775 +0100
7d1228
@@ -40,6 +40,7 @@ print<<___;
7d1228
 .align	16
7d1228
 OPENSSL_atomic_add:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	movl	($arg1),%eax
7d1228
 .Lspin:	leaq	($arg2,%rax),%r8
7d1228
 	.byte	0xf0		# lock
7d1228
@@ -56,6 +57,7 @@ OPENSSL_atomic_add:
7d1228
 .align	16
7d1228
 OPENSSL_rdtsc:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	rdtsc
7d1228
 	shl	\$32,%rdx
7d1228
 	or	%rdx,%rax
7d1228
@@ -68,6 +70,7 @@ OPENSSL_rdtsc:
7d1228
 .align	16
7d1228
 OPENSSL_ia32_cpuid:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	mov	%rbx,%r8		# save %rbx
7d1228
 .cfi_register	%rbx,%r8
7d1228
 
7d1228
@@ -237,6 +240,7 @@ OPENSSL_ia32_cpuid:
7d1228
 .align  16
7d1228
 OPENSSL_cleanse:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	xor	%rax,%rax
7d1228
 	cmp	\$15,$arg2
7d1228
 	jae	.Lot
7d1228
@@ -274,6 +278,7 @@ OPENSSL_cleanse:
7d1228
 .align  16
7d1228
 CRYPTO_memcmp:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	xor	%rax,%rax
7d1228
 	xor	%r10,%r10
7d1228
 	cmp	\$0,$arg3
7d1228
@@ -312,6 +317,7 @@ print<<___ if (!$win64);
7d1228
 .align	16
7d1228
 OPENSSL_wipe_cpu:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	pxor	%xmm0,%xmm0
7d1228
 	pxor	%xmm1,%xmm1
7d1228
 	pxor	%xmm2,%xmm2
7d1228
@@ -346,6 +352,8 @@ print<<___ if ($win64);
7d1228
 .type	OPENSSL_wipe_cpu,\@abi-omnipotent
7d1228
 .align	16
7d1228
 OPENSSL_wipe_cpu:
7d1228
+.cfi_startproc
7d1228
+	endbranch
7d1228
 	pxor	%xmm0,%xmm0
7d1228
 	pxor	%xmm1,%xmm1
7d1228
 	pxor	%xmm2,%xmm2
7d1228
@@ -376,6 +384,7 @@ print<<___;
7d1228
 .align	16
7d1228
 OPENSSL_instrument_bus:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	mov	$arg1,$out	# tribute to Win64
7d1228
 	mov	$arg2,$cnt
7d1228
 	mov	$arg2,$max
7d1228
@@ -410,6 +419,7 @@ OPENSSL_instrument_bus:
7d1228
 .align	16
7d1228
 OPENSSL_instrument_bus2:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	mov	$arg1,$out	# tribute to Win64
7d1228
 	mov	$arg2,$cnt
7d1228
 	mov	$arg3,$max
7d1228
@@ -465,6 +475,7 @@ print<<___;
7d1228
 .align	16
7d1228
 OPENSSL_ia32_${rdop}_bytes:
7d1228
 .cfi_startproc
7d1228
+	endbranch
7d1228
 	xor	%rax, %rax	# return value
7d1228
 	cmp	\$0,$arg2
7d1228
 	je	.Ldone_${rdop}_bytes