diff options
author | JeffZhao <jeffzhao@zhaoxin.com> | 2018-03-16 07:15:16 +0100 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2018-03-19 11:47:33 +0100 |
commit | 51cf8ba038aae10df9895b0001715938f7ad0c75 (patch) | |
tree | fbaf90d1479545cdaf21c673e8128ec3798527cb | |
parent | Clarify a couple of details around "make variables" (diff) | |
download | openssl-51cf8ba038aae10df9895b0001715938f7ad0c75.tar.xz openssl-51cf8ba038aae10df9895b0001715938f7ad0c75.zip |
engines/asm/e_padlock*: add support for Zhaoxin's x86 platform
VIA and Shanghai United Investment Co.,Ltd. found Shanghai ZhaoXin,
which is a fabless x86 CPU IC design company. ZhaoXin has issued
ZX-C, ZX-D x86 processors, which have 'Shanghai' CPU vendor id.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5640)
-rw-r--r-- | engines/asm/e_padlock-x86.pl | 11 | ||||
-rw-r--r-- | engines/asm/e_padlock-x86_64.pl | 11 |
2 files changed, 20 insertions, 2 deletions
diff --git a/engines/asm/e_padlock-x86.pl b/engines/asm/e_padlock-x86.pl index c4129e837a..0cea549686 100644 --- a/engines/asm/e_padlock-x86.pl +++ b/engines/asm/e_padlock-x86.pl @@ -73,11 +73,20 @@ $chunk="ebx"; &cpuid (); &xor ("eax","eax"); &cmp ("ebx","0x".unpack("H*",'tneC')); - &jne (&label("noluck")); + &jne (&label("zhaoxin")); &cmp ("edx","0x".unpack("H*",'Hrua')); &jne (&label("noluck")); &cmp ("ecx","0x".unpack("H*",'slua')); &jne (&label("noluck")); + &jmp (&label("zhaoxinEnd")); +&set_label("zhaoxin"); + &cmp ("ebx","0x".unpack("H*",'hS ')); + &jne (&label("noluck")); + &cmp ("edx","0x".unpack("H*",'hgna')); + &jne (&label("noluck")); + &cmp ("ecx","0x".unpack("H*",' ia')); + &jne (&label("noluck")); +&set_label("zhaoxinEnd"); &mov ("eax",0xC0000000); &cpuid (); &mov ("edx","eax"); diff --git a/engines/asm/e_padlock-x86_64.pl b/engines/asm/e_padlock-x86_64.pl index 834b1ea79c..9eff881e66 100644 --- a/engines/asm/e_padlock-x86_64.pl +++ b/engines/asm/e_padlock-x86_64.pl @@ -57,11 +57,20 @@ padlock_capability: cpuid xor %eax,%eax cmp \$`"0x".unpack("H*",'tneC')`,%ebx - jne .Lnoluck + jne .Lzhaoxin cmp \$`"0x".unpack("H*",'Hrua')`,%edx jne .Lnoluck cmp \$`"0x".unpack("H*",'slua')`,%ecx jne .Lnoluck + jmp .LzhaoxinEnd +.Lzhaoxin: + cmp \$`"0x".unpack("H*",'hS ')`,%ebx + jne .Lnoluck + cmp \$`"0x".unpack("H*",'hgna')`,%edx + jne .Lnoluck + cmp \$`"0x".unpack("H*",' ia')`,%ecx + jne .Lnoluck +.LzhaoxinEnd: mov \$0xC0000000,%eax cpuid mov %eax,%edx |