aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-11-15 00:51:41 -0800
committerJason A. Donenfeld <Jason@zx2c4.com>2018-11-15 11:49:49 -0800
commit0f81a44b37eec6e0b21bb95934d9fb529720591b (patch)
tree88876c63af47ca436950568ef9e0391b4c651418 /src
parentpoly1305: specialize to wireguard (diff)
downloadwireguard-monolithic-historical-0f81a44b37eec6e0b21bb95934d9fb529720591b.tar.xz
wireguard-monolithic-historical-0f81a44b37eec6e0b21bb95934d9fb529720591b.zip
perlasm: avoid rep ret
The original hardcodes returns as .byte 0xf3,0xc3, aka "rep ret". We replace this by "ret". "rep ret" was meant to help with AMD K8 chips, cf. http://repzret.org/p/repzret. It makes no sense to continue to use this kludge for code that won't even run on ancient AMD chips.
Diffstat (limited to 'src')
-rw-r--r--src/crypto/zinc/perlasm/x86_64-xlate.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crypto/zinc/perlasm/x86_64-xlate.pl b/src/crypto/zinc/perlasm/x86_64-xlate.pl
index 8a18c5b..0fe1516 100644
--- a/src/crypto/zinc/perlasm/x86_64-xlate.pl
+++ b/src/crypto/zinc/perlasm/x86_64-xlate.pl
@@ -164,7 +164,7 @@ my %globals;
$epilogue = "movq 8(%rsp),%rdi\n\t" .
"movq 16(%rsp),%rsi\n\t";
}
- $epilogue . ".byte 0xf3,0xc3";
+ $epilogue . "ret";
} elsif ($self->{op} eq "call" && !$elf && $current_segment eq ".init") {
".p2align\t3\n\t.quad";
} else {