]> Pileus Git - ~andy/gtk/blob - gdk-pixbuf/pixops/have_mmx.S
Directory full of pixel data scaling code that will eventually migrate
[~andy/gtk] / gdk-pixbuf / pixops / have_mmx.S
1         .file   "have_mmx.S"
2         .version        "01.01"
3 gcc2_compiled.:
4 .text
5         .align 16
6 .globl pixops_have_mmx
7         .type    pixops_have_mmx,@function
8
9 pixops_have_mmx:
10         push    %ebx
11
12 # Check if bit 21 in flags word is writeable
13
14         pushfl  
15         popl    %eax
16         movl    %eax,%ebx
17         xorl    $0x00200000, %eax
18         pushl   %eax
19         popfl
20         pushfl
21         popl    %eax
22
23         cmpl    %eax, %ebx
24
25         je .notfound
26
27 # OK, we have CPUID
28
29         movl    $1, %eax
30         cpuid
31         
32         test    $0x00800000, %edx
33         jz      .notfound
34
35         movl    $1, %eax
36         jmp     .out
37
38 .notfound:
39         movl    $0, %eax
40 .out:   
41         popl    %ebx
42         ret