Blame gdk-pixbuf/pixops/have_mmx.S

Packit a4058c
/*
Packit a4058c
 * Copyright (C) 2000 Red Hat, Inc
Packit a4058c
 *
Packit a4058c
 * This library is free software; you can redistribute it and/or
Packit a4058c
 * modify it under the terms of the GNU Lesser General Public
Packit a4058c
 * License as published by the Free Software Foundation; either
Packit a4058c
 * version 2 of the License, or (at your option) any later version.
Packit a4058c
 *
Packit a4058c
 * This library is distributed in the hope that it will be useful,
Packit a4058c
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit a4058c
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit a4058c
 * Lesser General Public License for more details.
Packit a4058c
 *
Packit a4058c
 * You should have received a copy of the GNU Lesser General Public
Packit a4058c
 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
Packit a4058c
 */
Packit a4058c
	.file	"have_mmx.S"
Packit a4058c
	.version	"01.01"
Packit a4058c
gcc2_compiled.:
Packit a4058c
.text
Packit a4058c
	.align 16
Packit a4058c
Packit a4058c
#if !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(__INTERIX)
Packit a4058c
Packit a4058c
/* Magic indicating no need for an executable stack */
Packit a4058c
#if !defined __powerpc64__ && !defined __ia64__
Packit a4058c
.section .note.GNU-stack;  .previous
Packit a4058c
#endif
Packit a4058c
	
Packit a4058c
.globl _pixops_have_mmx
Packit a4058c
	.type	 _pixops_have_mmx,@function
Packit a4058c
_pixops_have_mmx:
Packit a4058c
Packit a4058c
#else
Packit a4058c
Packit a4058c
.globl __pixops_have_mmx
Packit a4058c
__pixops_have_mmx:
Packit a4058c
Packit a4058c
#endif
Packit a4058c
	
Packit a4058c
	push	%ebx
Packit a4058c
Packit a4058c
/* # Check if bit 21 in flags word is writeable */
Packit a4058c
Packit a4058c
	pushfl	
Packit a4058c
	popl	%eax
Packit a4058c
	movl	%eax,%ebx
Packit a4058c
	xorl	$0x00200000, %eax
Packit a4058c
	pushl   %eax
Packit a4058c
	popfl
Packit a4058c
	pushfl
Packit a4058c
	popl	%eax
Packit a4058c
Packit a4058c
	cmpl	%eax, %ebx
Packit a4058c
Packit a4058c
	je .notfound
Packit a4058c
Packit a4058c
/* # OK, we have CPUID */
Packit a4058c
Packit a4058c
	movl	$1, %eax
Packit a4058c
	cpuid
Packit a4058c
	
Packit a4058c
	test	$0x00800000, %edx
Packit a4058c
	jz	.notfound
Packit a4058c
Packit a4058c
	movl	$1, %eax
Packit a4058c
	jmp	.out
Packit a4058c
Packit a4058c
.notfound:
Packit a4058c
	movl  	$0, %eax
Packit a4058c
.out:	
Packit a4058c
	popl	%ebx
Packit a4058c
	ret
Packit a4058c