summaryrefslogtreecommitdiffstats
path: root/libass/x86/cpuid.asm
blob: ca0792ca487c7de87f08e8b5cae2be06dd38fcb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
;******************************************************************************
;* add_bitmaps.asm: SSE2 and x86 add_bitmaps
;******************************************************************************

%include "x86inc.asm"

SECTION .text

;------------------------------------------------------------------------------
; void get_cpuid( uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx);
;------------------------------------------------------------------------------

INIT_XMM
cglobal get_cpuid, 4, 5, 0
    push rbx
    push r3
    push r2
    push r1
    push r0
    mov eax, [r0]
    xor ecx, ecx
    cpuid
    pop r4
    mov [r4], eax
    pop r4
    mov [r4], ebx
    pop r4
    mov [r4], ecx
    pop r4
    mov [r4], edx
    pop rbx
    RET