summaryrefslogtreecommitdiffhomepage
path: root/src/crypto/zinc
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
commitdfe3c11022d3ccd9fbe933a224a43cdeddf07851 (patch)
treee7f465048b70d27df2201bfc36fc686d90e14072 /src/crypto/zinc
parenteb531fdd490b5b870e56d2ff9802c4bc5cee7237 (diff)
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. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/crypto/zinc')
-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 {