提交 51cf8ba0 编写于 作者: J JeffZhao 提交者: Andy Polyakov

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: NAndy Polyakov <appro@openssl.org>
Reviewed-by: NMatt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5640)
上级 ec4c3891
......@@ -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");
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册