summaryrefslogtreecommitdiffstats
path: root/crypto/perlasm
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2016-06-12 16:21:37 +0200
committerAndy Polyakov <appro@openssl.org>2016-06-14 23:43:52 +0200
commit4e3d2866b6e8e7a700ea22e05840a093bfd7a4b1 (patch)
treec92501b12234e5d90595bf593b747a184e253ca8 /crypto/perlasm
parentcc77d0d84ab8e476f74373cad3d65210042baf02 (diff)
perlasm/x86*.pl: add endbranch instruction.
For further information see "Control-flow Enforcement Technology Preview" by Intel. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/perlasm')
-rwxr-xr-xcrypto/perlasm/x86_64-xlate.pl4
-rw-r--r--crypto/perlasm/x86asm.pl5
2 files changed, 9 insertions, 0 deletions
diff --git a/crypto/perlasm/x86_64-xlate.pl b/crypto/perlasm/x86_64-xlate.pl
index 391362d46e..885690507e 100755
--- a/crypto/perlasm/x86_64-xlate.pl
+++ b/crypto/perlasm/x86_64-xlate.pl
@@ -864,6 +864,10 @@ my $vprotq = sub {
}
};
+my $endbranch = sub {
+ (0xf3,0x0f,0x1e,0xfa);
+};
+
if ($nasm) {
print <<___;
default rel
diff --git a/crypto/perlasm/x86asm.pl b/crypto/perlasm/x86asm.pl
index 4590adee2f..1ff46c92cc 100644
--- a/crypto/perlasm/x86asm.pl
+++ b/crypto/perlasm/x86asm.pl
@@ -172,6 +172,11 @@ sub ::vprotd
{ &::generic("vprotd",@_); }
}
+sub ::endbranch
+{
+ &::data_byte(0xf3,0x0f,0x1e,0xfb);
+}
+
# label management
$lbdecor="L"; # local label decoration, set by package
$label="000";