summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/perlasm
diff options
context:
space:
mode:
authorbcook <>2015-09-11 12:17:57 +0000
committerbcook <>2015-09-11 12:17:57 +0000
commit656ef1e2adb75d20a81b8763a2088b2c8e6c3058 (patch)
tree03ee90a380bddd9dac65bed24366a6dc8e0abd01 /src/lib/libcrypto/perlasm
parent52f5d74dfdc68d06be5b27e3df8b2fbb6387acf6 (diff)
downloadopenbsd-656ef1e2adb75d20a81b8763a2088b2c8e6c3058.tar.gz
openbsd-656ef1e2adb75d20a81b8763a2088b2c8e6c3058.tar.bz2
openbsd-656ef1e2adb75d20a81b8763a2088b2c8e6c3058.zip
Fixup inter-bank movq/movd operations, emit bytes for pclmulqdq again.
Fixes builds gcc + Apple's assembler, working on reenabling builds with older OpenBSD releases. based on OpenSSL commit: https://git.openssl.org/?p=openssl.git;a=commitdiff;h=902b30df193afc3417a96ba72a81ed390bd50de3 ok miod@
Diffstat (limited to 'src/lib/libcrypto/perlasm')
-rwxr-xr-xsrc/lib/libcrypto/perlasm/x86_64-xlate.pl16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/lib/libcrypto/perlasm/x86_64-xlate.pl b/src/lib/libcrypto/perlasm/x86_64-xlate.pl
index ed1f3ed6ab..82992f41e5 100755
--- a/src/lib/libcrypto/perlasm/x86_64-xlate.pl
+++ b/src/lib/libcrypto/perlasm/x86_64-xlate.pl
@@ -121,7 +121,7 @@ my %globals;
121 $self->{sz} = ""; 121 $self->{sz} = "";
122 } elsif ($self->{op} =~ /^v/) { # VEX 122 } elsif ($self->{op} =~ /^v/) { # VEX
123 $self->{sz} = ""; 123 $self->{sz} = "";
124 } elsif ($self->{op} =~ /movq/ && $line =~ /%xmm/) { 124 } elsif ($self->{op} =~ /mov[dq]/ && $line =~ /%xmm/) {
125 $self->{sz} = ""; 125 $self->{sz} = "";
126 } elsif ($self->{op} =~ /([a-z]{3,})([qlwb])$/) { 126 } elsif ($self->{op} =~ /([a-z]{3,})([qlwb])$/) {
127 $self->{op} = $1; 127 $self->{op} = $1;
@@ -698,6 +698,20 @@ my $pinsrd = sub {
698 } 698 }
699}; 699};
700 700
701my $pclmulqdq = sub {
702 if (shift =~ /\$([x0-9a-f]+),\s*%xmm([0-9]+),\s*%xmm([0-9]+)/) {
703 my @opcode=(0x66);
704 rex(\@opcode,$3,$2);
705 push @opcode,0x0f,0x3a,0x44;
706 push @opcode,0xc0|($2&7)|(($3&7)<<3); # ModR/M
707 my $c=$1;
708 push @opcode,$c=~/^0/?oct($c):$c;
709 @opcode;
710 } else {
711 ();
712 }
713};
714
701if ($nasm) { 715if ($nasm) {
702 print <<___; 716 print <<___;
703default rel 717default rel