]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Exported gnutls_cpuid() and gnutls_have_cpuid().
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 8 Dec 2011 17:15:44 +0000 (18:15 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 8 Dec 2011 17:15:44 +0000 (18:15 +0100)
devel/perlasm/cpuid-x86.pl
devel/perlasm/cpuid-x86_64.pl
lib/accelerated/accelerated.c
lib/accelerated/x86/aes-padlock.c
lib/accelerated/x86/aes-x86.c
lib/accelerated/x86/asm-coff/cpuid-x86-64-coff.s
lib/accelerated/x86/asm-coff/cpuid-x86-coff.s
lib/accelerated/x86/asm/cpuid-x86-64.s
lib/accelerated/x86/asm/cpuid-x86.s
lib/accelerated/x86/x86.h

index 50def40ba13b45a30e607a06d8e7c27aae9497e7..8eb12ef5f780059503f573abda84b99c096bd9b1 100644 (file)
@@ -12,7 +12,7 @@ require "x86asm.pl";
 
 &asm_init($ARGV[0],$0);
 
-&function_begin_B("_gnutls_cpuid");
+&function_begin_B("gnutls_cpuid");
        &push   ("ebp");
        &mov    ("ebp", "esp");
        &sub    ("esp", 12);
@@ -39,9 +39,9 @@ require "x86asm.pl";
        &mov    ("esp","ebp");
        &pop    ("ebp");
        &ret    ();
-&function_end_B("_gnutls_cpuid");
+&function_end_B("gnutls_cpuid");
 
-&function_begin_B("_gnutls_have_cpuid");
+&function_begin_B("gnutls_have_cpuid");
        &pushf  ();
        &pop    ("eax");
        &or     ("eax",0x200000);
@@ -51,7 +51,7 @@ require "x86asm.pl";
        &pop    ("eax");
        &and     ("eax",0x200000);
        &ret    ();
-&function_end_B("_gnutls_have_cpuid");
+&function_end_B("gnutls_have_cpuid");
 
 &asciz("CPUID for x86");
 &asm_finish();
index b821a49f0d343bd7ba1024dd40cebd74194bcae9..ef1c95c2a73b878ab816f8b78ac8fd2ab5efa3a2 100644 (file)
@@ -26,10 +26,10 @@ $code=".text\n";
 
 
 $code.=<<___;
-.globl _gnutls_cpuid
-.type _gnutls_cpuid,\@abi-omnipotent
+.globl gnutls_cpuid
+.type gnutls_cpuid,\@abi-omnipotent
 .align 16
-_gnutls_cpuid:
+gnutls_cpuid:
        pushq   %rbp
        movq    %rsp, %rbp
        pushq   %rbx
@@ -58,7 +58,7 @@ _gnutls_cpuid:
        popq    %rbx
        leave
        ret
-.size _gnutls_cpuid,.-_gnutls_cpuid
+.size gnutls_cpuid,.-gnutls_cpuid
 ___
 
 $code =~ s/\`([^\`]*)\`/eval($1)/gem;
index 8d138f03db53c18bebfc4f181da1184a5cefe9a2..6047dd141aa0fdb83e5f1667aa264c75346ba24d 100644 (file)
@@ -30,7 +30,7 @@
 void _gnutls_register_accel_crypto(void)
 {
 #if defined(ASM_X86)
-  if (_gnutls_have_cpuid() != 0)
+  if (gnutls_have_cpuid() != 0)
     {
       register_x86_crypto ();
       register_padlock_crypto ();
index 881eb75c19df3e42cc4e45443c29c544eea0cf67..962c1bb9a0f2ca3544ab9f5bc6933f3dd6c04aa3 100644 (file)
@@ -214,7 +214,7 @@ static unsigned
 check_via (void)
 {
   unsigned int a, b, c, d;
-  _gnutls_cpuid (0, &a, &b, &c, &d);
+  gnutls_cpuid (0, &a, &b, &c, &d);
 
   if ((memcmp (&b, "Cent", 4) == 0 &&
        memcmp (&d, "aurH", 4) == 0 && memcmp (&c, "auls", 4) == 0))
index 5f465a529018ffd1a1a37cf7b6f8f54a9bf4e0f4..79877810492d36cdf76ebfd336db536011dfa21b 100644 (file)
@@ -126,7 +126,7 @@ static unsigned
 check_optimized_aes (void)
 {
   unsigned int a, b, c, d;
-  _gnutls_cpuid (1, &a, &b, &c, &d);
+  gnutls_cpuid (1, &a, &b, &c, &d);
 
   return (c & 0x2000000);
 }
@@ -136,7 +136,7 @@ static unsigned
 check_pclmul (void)
 {
   unsigned int a, b, c, d;
-  _gnutls_cpuid (1, &a, &b, &c, &d);
+  gnutls_cpuid (1, &a, &b, &c, &d);
 
   return (c & 0x2);
 }
@@ -146,7 +146,7 @@ static unsigned
 check_intel_or_amd (void)
 {
   unsigned int a, b, c, d;
-  _gnutls_cpuid (0, &a, &b, &c, &d);
+  gnutls_cpuid (0, &a, &b, &c, &d);
 
   if ((memcmp (&b, "Genu", 4) == 0 &&
        memcmp (&d, "ineI", 4) == 0 &&
index 3ca96a945230ca954df06a9a2b0cc4b35e115183..432bce78a86ae1ddfae0b19ff884f0bf400c7efd 100644 (file)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 .text  
-.globl _gnutls_cpuid
-.def   _gnutls_cpuid;  .scl 2; .type 32;       .endef
+.globl gnutls_cpuid
+.def   gnutls_cpuid;   .scl 2; .type 32;       .endef
 .p2align       4
-_gnutls_cpuid:
+gnutls_cpuid:
        pushq   %rbp
        movq    %rsp,%rbp
        pushq   %rbx
index 076b19348c0aa3075ac4d230064690e0b703c235..9c6142a513f88d45e22bc93b37fc2b87edd6b7dc 100644 (file)
 #
 .file  "devel/perlasm/cpuid-x86.s"
 .text
-.def   __gnutls_cpuid; .scl    3;      .type   32;     .endef
+.globl _gnutls_cpuid
+.def   _gnutls_cpuid;  .scl    2;      .type   32;     .endef
 .align 16
-__gnutls_cpuid:
+_gnutls_cpuid:
+.L_gnutls_cpuid_begin:
        pushl   %ebp
        movl    %esp,%ebp
        subl    $12,%esp
@@ -49,9 +51,11 @@ __gnutls_cpuid:
        movl    %ebp,%esp
        popl    %ebp
        ret
-.def   __gnutls_have_cpuid;    .scl    3;      .type   32;     .endef
+.globl _gnutls_have_cpuid
+.def   _gnutls_have_cpuid;     .scl    2;      .type   32;     .endef
 .align 16
-__gnutls_have_cpuid:
+_gnutls_have_cpuid:
+.L_gnutls_have_cpuid_begin:
        pushfl
        popl    %eax
        orl     $2097152,%eax
index db6a58027429ea2cd020abf50e207f3c9c097b97..0a8e8b3b01b502063d81506a326175c8cbac718c 100644 (file)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 .text  
-.globl _gnutls_cpuid
-.type  _gnutls_cpuid,@function
+.globl gnutls_cpuid
+.type  gnutls_cpuid,@function
 .align 16
-_gnutls_cpuid:
+gnutls_cpuid:
        pushq   %rbp
        movq    %rsp,%rbp
        pushq   %rbx
@@ -51,6 +51,6 @@ _gnutls_cpuid:
        popq    %rbx
        leave
        .byte   0xf3,0xc3
-.size  _gnutls_cpuid,.-_gnutls_cpuid
+.size  gnutls_cpuid,.-gnutls_cpuid
 
 .section .note.GNU-stack,"",%progbits
index 2d28bdc5eb803a01e071b476b739e41a4c0a99ad..d32009b25d5e978a0d7463ad6093f18b824d0f94 100644 (file)
 #
 .file  "devel/perlasm/cpuid-x86.s"
 .text
-.type  _gnutls_cpuid,@function
+.globl gnutls_cpuid
+.type  gnutls_cpuid,@function
 .align 16
-_gnutls_cpuid:
+gnutls_cpuid:
+.L_gnutls_cpuid_begin:
        pushl   %ebp
        movl    %esp,%ebp
        subl    $12,%esp
@@ -49,10 +51,12 @@ _gnutls_cpuid:
        movl    %ebp,%esp
        popl    %ebp
        ret
-.size  _gnutls_cpuid,.-_gnutls_cpuid
-.type  _gnutls_have_cpuid,@function
+.size  gnutls_cpuid,.-.L_gnutls_cpuid_begin
+.globl gnutls_have_cpuid
+.type  gnutls_have_cpuid,@function
 .align 16
-_gnutls_have_cpuid:
+gnutls_have_cpuid:
+.L_gnutls_have_cpuid_begin:
        pushfl
        popl    %eax
        orl     $2097152,%eax
@@ -62,7 +66,7 @@ _gnutls_have_cpuid:
        popl    %eax
        andl    $2097152,%eax
        ret
-.size  _gnutls_have_cpuid,.-_gnutls_have_cpuid
+.size  gnutls_have_cpuid,.-.L_gnutls_have_cpuid_begin
 .byte  67,80,85,73,68,32,102,111,114,32,120,56,54,0
 
 .section .note.GNU-stack,"",%progbits
index 6730fa8380ad84d47391565665cd24789dc62b9e..a5f796754927bc691db69594b2fac7fcc7d90ddd 100644 (file)
 
 #if defined(ASM_X86)
 
-void _gnutls_cpuid(unsigned int func, unsigned int *ax, unsigned int *bx, unsigned int *cx, unsigned int* dx);
+void gnutls_cpuid(unsigned int func, unsigned int *ax, unsigned int *bx, unsigned int *cx, unsigned int* dx);
 
 # ifdef ASM_X86_32
-unsigned int _gnutls_have_cpuid(void);
+unsigned int gnutls_have_cpuid(void);
 # else
 #  define _gnutls_have_cpuid() 1
 # endif /* ASM_X86_32 */