&asm_init($ARGV[0],$0);
-&function_begin_B("_gnutls_cpuid");
+&function_begin_B("gnutls_cpuid");
&push ("ebp");
&mov ("ebp", "esp");
&sub ("esp", 12);
&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);
&pop ("eax");
&and ("eax",0x200000);
&ret ();
-&function_end_B("_gnutls_have_cpuid");
+&function_end_B("gnutls_have_cpuid");
&asciz("CPUID for x86");
&asm_finish();
$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
popq %rbx
leave
ret
-.size _gnutls_cpuid,.-_gnutls_cpuid
+.size gnutls_cpuid,.-gnutls_cpuid
___
$code =~ s/\`([^\`]*)\`/eval($1)/gem;
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 ();
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))
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);
}
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);
}
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 &&
# 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
#
.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
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
# 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
popq %rbx
leave
.byte 0xf3,0xc3
-.size _gnutls_cpuid,.-_gnutls_cpuid
+.size gnutls_cpuid,.-gnutls_cpuid
.section .note.GNU-stack,"",%progbits
#
.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
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
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
#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 */