summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rc4
diff options
context:
space:
mode:
authorderaadt <>2023-04-25 04:42:26 +0000
committerderaadt <>2023-04-25 04:42:26 +0000
commite2118101444d3cf3cab87297b363cecd5357ae89 (patch)
treeb4ae043f669d9d718f1fecb4ca705a0cf2d2ddc7 /src/lib/libcrypto/rc4
parentc6490b97c04798e5cd36a489e3ba5ffc4a66550b (diff)
downloadopenbsd-e2118101444d3cf3cab87297b363cecd5357ae89.tar.gz
openbsd-e2118101444d3cf3cab87297b363cecd5357ae89.tar.bz2
openbsd-e2118101444d3cf3cab87297b363cecd5357ae89.zip
Add endbr64 where needed by inspection. Passes regresson tests.
ok jsing, and kind of tb an earlier version
Diffstat (limited to 'src/lib/libcrypto/rc4')
-rw-r--r--src/lib/libcrypto/rc4/asm/rc4-md5-x86_64.pl3
-rwxr-xr-xsrc/lib/libcrypto/rc4/asm/rc4-x86_64.pl6
2 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/libcrypto/rc4/asm/rc4-md5-x86_64.pl b/src/lib/libcrypto/rc4/asm/rc4-md5-x86_64.pl
index 501d9e936b..6d058bd9d4 100644
--- a/src/lib/libcrypto/rc4/asm/rc4-md5-x86_64.pl
+++ b/src/lib/libcrypto/rc4/asm/rc4-md5-x86_64.pl
@@ -109,6 +109,7 @@ $code.=<<___;
109.globl $func 109.globl $func
110.type $func,\@function,$nargs 110.type $func,\@function,$nargs
111$func: 111$func:
112 endbr64
112 cmp \$0,$len 113 cmp \$0,$len
113 je .Labort 114 je .Labort
114 push %rbx 115 push %rbx
@@ -453,6 +454,7 @@ $code.=<<___;
453.type RC4_set_key,\@function,3 454.type RC4_set_key,\@function,3
454.align 16 455.align 16
455RC4_set_key: 456RC4_set_key:
457 endbr64
456 lea 8($dat),$dat 458 lea 8($dat),$dat
457 lea ($inp,$len),$inp 459 lea ($inp,$len),$inp
458 neg $len 460 neg $len
@@ -494,6 +496,7 @@ RC4_set_key:
494.type RC4_options,\@abi-omnipotent 496.type RC4_options,\@abi-omnipotent
495.align 16 497.align 16
496RC4_options: 498RC4_options:
499 endbr64
497 lea .Lopts(%rip),%rax 500 lea .Lopts(%rip),%rax
498 ret 501 ret
499.align 64 502.align 64
diff --git a/src/lib/libcrypto/rc4/asm/rc4-x86_64.pl b/src/lib/libcrypto/rc4/asm/rc4-x86_64.pl
index 8de869489f..2bac7d744d 100755
--- a/src/lib/libcrypto/rc4/asm/rc4-x86_64.pl
+++ b/src/lib/libcrypto/rc4/asm/rc4-x86_64.pl
@@ -127,7 +127,9 @@ $code=<<___;
127.globl RC4 127.globl RC4
128.type RC4,\@function,4 128.type RC4,\@function,4
129.align 16 129.align 16
130RC4: or $len,$len 130RC4:
131 endbr64
132 or $len,$len
131 jne .Lentry 133 jne .Lentry
132 ret 134 ret
133.Lentry: 135.Lentry:
@@ -433,6 +435,7 @@ $code.=<<___;
433.type RC4_set_key,\@function,3 435.type RC4_set_key,\@function,3
434.align 16 436.align 16
435RC4_set_key: 437RC4_set_key:
438 endbr64
436 lea 8($dat),$dat 439 lea 8($dat),$dat
437 lea ($inp,$len),$inp 440 lea ($inp,$len),$inp
438 neg $len 441 neg $len
@@ -505,6 +508,7 @@ RC4_set_key:
505.type RC4_options,\@abi-omnipotent 508.type RC4_options,\@abi-omnipotent
506.align 16 509.align 16
507RC4_options: 510RC4_options:
511 endbr64
508 lea .Lopts(%rip),%rax 512 lea .Lopts(%rip),%rax
509 mov OPENSSL_ia32cap_P(%rip),%edx 513 mov OPENSSL_ia32cap_P(%rip),%edx
510 bt \$IA32CAP_BIT0_INTELP4,%edx 514 bt \$IA32CAP_BIT0_INTELP4,%edx