perlasm/x86*.pl: add endbranch instruction.
authorAndy Polyakov <appro@openssl.org>
Sun, 12 Jun 2016 14:21:37 +0000 (16:21 +0200)
committerAndy Polyakov <appro@openssl.org>
Tue, 14 Jun 2016 21:43:52 +0000 (23:43 +0200)
For further information see "Control-flow Enforcement Technology
Preview" by Intel.

Reviewed-by: Rich Salz <rsalz@openssl.org>
crypto/perlasm/x86_64-xlate.pl
crypto/perlasm/x86asm.pl

index 391362d..8856905 100755 (executable)
@@ -864,6 +864,10 @@ my $vprotq = sub {
     }
 };
 
+my $endbranch = sub {
+    (0xf3,0x0f,0x1e,0xfa);
+};
+
 if ($nasm) {
     print <<___;
 default        rel
index 4590ade..1ff46c9 100644 (file)
@@ -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";