have_mmx.s
来自「这是符合Linux操作系统标准的POIXS 的pixops-2.0.5源程序」· S 代码 · 共 61 行
S
61 行
/* Copyright (C) 2000 Red Hat, Inc. * This file is part of the Pixops Library. * * The pixops library is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as published * by the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * The pixops library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public * License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; if not, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ .file "have_mmx.S" .version "01.01"gcc2_compiled.:.text .align 16.globl pixops_have_mmx .type pixops_have_mmx,@functionpixops_have_mmx: push %ebx# Check if bit 21 in flags word is writeable pushfl popl %eax movl %eax,%ebx xorl $0x00200000, %eax pushl %eax popfl pushfl popl %eax cmpl %eax, %ebx je .notfound# OK, we have CPUID movl $1, %eax cpuid test $0x00800000, %edx jz .notfound movl $1, %eax jmp .out.notfound: movl $0, %eax.out: popl %ebx ret
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?