x86_64cpuid.pl: allow shared build to work without -Bsymbolic.
PR: 2466
This commit is contained in:
parent
b50842036f
commit
ddc20d4da9
@ -508,6 +508,11 @@ my %globals;
|
|||||||
}
|
}
|
||||||
} elsif ($dir =~ /\.(text|data)/) {
|
} elsif ($dir =~ /\.(text|data)/) {
|
||||||
$current_segment=".$1";
|
$current_segment=".$1";
|
||||||
|
} elsif ($dir =~ /\.hidden/) {
|
||||||
|
if ($flavour eq "macosx") { $self->{value} = ".private_extern\t$prefix$line"; }
|
||||||
|
elsif ($flavour eq "mingw64") { $self->{value} = ""; }
|
||||||
|
} elsif ($dir =~ /\.comm/) {
|
||||||
|
$self->{value} = "$dir\t$prefix$line";
|
||||||
}
|
}
|
||||||
$line = "";
|
$line = "";
|
||||||
return $self;
|
return $self;
|
||||||
@ -615,6 +620,19 @@ my %globals;
|
|||||||
.join(",",@str) if (@str);
|
.join(",",@str) if (@str);
|
||||||
last;
|
last;
|
||||||
};
|
};
|
||||||
|
/\.comm/ && do { my @str=split(/,\s*/,$line);
|
||||||
|
my $v=undef;
|
||||||
|
if ($nasm) {
|
||||||
|
$v.="common $prefix@str[0] @str[1]:near";
|
||||||
|
} else {
|
||||||
|
$v="$current_segment\tENDS\n" if ($current_segment);
|
||||||
|
$current_segment = ".data";
|
||||||
|
$v.="$current_segment\tSEGMENT\n";
|
||||||
|
$v.="COMM @str[0]:DWORD:".@str[1]/4;
|
||||||
|
}
|
||||||
|
$self->{value} = $v;
|
||||||
|
last;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
$line = "";
|
$line = "";
|
||||||
}
|
}
|
||||||
@ -629,14 +647,11 @@ my %globals;
|
|||||||
|
|
||||||
sub rex {
|
sub rex {
|
||||||
local *opcode=shift;
|
local *opcode=shift;
|
||||||
my ($dst,$src)=@_;
|
my ($dst,$src,$rex)=@_;
|
||||||
|
|
||||||
if ($dst>=8 || $src>=8) {
|
$rex|=0x04 if($dst>=8);
|
||||||
$rex=0x40;
|
$rex|=0x01 if($src>=8);
|
||||||
$rex|=0x04 if($dst>=8);
|
push @opcode,($rex|0x40) if ($rex);
|
||||||
$rex|=0x01 if($src>=8);
|
|
||||||
push @opcode,$rex;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# older gas and ml64 don't handle SSE>2 instructions
|
# older gas and ml64 don't handle SSE>2 instructions
|
||||||
|
@ -14,9 +14,13 @@ open STDOUT,"| $^X ${dir}perlasm/x86_64-xlate.pl $flavour $output";
|
|||||||
|
|
||||||
print<<___;
|
print<<___;
|
||||||
.extern OPENSSL_cpuid_setup
|
.extern OPENSSL_cpuid_setup
|
||||||
|
.hidden OPENSSL_cpuid_setup
|
||||||
.section .init
|
.section .init
|
||||||
call OPENSSL_cpuid_setup
|
call OPENSSL_cpuid_setup
|
||||||
|
|
||||||
|
.hidden OPENSSL_ia32cap_P
|
||||||
|
.comm OPENSSL_ia32cap_P,8
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
.globl OPENSSL_atomic_add
|
.globl OPENSSL_atomic_add
|
||||||
|
Loading…
x
Reference in New Issue
Block a user