The branch master has been updated
       via  51cf8ba038aae10df9895b0001715938f7ad0c75 (commit)
      from  ec4c389108c2c5bcd96cf4125ec2f715523dab7b (commit)


- Log -----------------------------------------------------------------
commit 51cf8ba038aae10df9895b0001715938f7ad0c75
Author: JeffZhao <jeffz...@zhaoxin.com>
Date:   Fri Mar 16 14:15:16 2018 +0800

    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 <ap...@openssl.org>
    Reviewed-by: Matt Caswell <m...@openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/5640)

-----------------------------------------------------------------------

Summary of changes:
 engines/asm/e_padlock-x86.pl    | 11 ++++++++++-
 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 c4129e8..0cea549 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 834b1ea..9eff881 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
_____
openssl-commits mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits

Reply via email to