1 ;*****************************************************************************
2 ;* cpu-a.asm: x86 cpu utilities
3 ;*****************************************************************************
4 ;* Copyright (C) 2003-2011 x264 project
6 ;* Authors: Laurent Aimar <fenrir@via.ecp.fr>
7 ;* Loren Merritt <lorenm@u.washington.edu>
8 ;* Fiona Glaser <fiona@x264.com>
10 ;* This program is free software; you can redistribute it and/or modify
11 ;* it under the terms of the GNU General Public License as published by
12 ;* the Free Software Foundation; either version 2 of the License, or
13 ;* (at your option) any later version.
15 ;* This program is distributed in the hope that it will be useful,
16 ;* but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;* GNU General Public License for more details.
20 ;* You should have received a copy of the GNU General Public License
21 ;* along with this program; if not, write to the Free Software
22 ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.
24 ;* This program is also available under a commercial proprietary license.
25 ;* For more information, contact us at licensing@x264.com.
26 ;*****************************************************************************
34 ;-----------------------------------------------------------------------------
35 ; int cpu_cpuid( int op, int *eax, int *ebx, int *ecx, int *edx )
36 ;-----------------------------------------------------------------------------
37 cglobal cpu_cpuid, 5,7
54 ;-----------------------------------------------------------------------------
55 ; int cpu_cpuid_test( void )
56 ; return 0 if unsupported
57 ;-----------------------------------------------------------------------------
58 cglobal cpu_cpuid_test
80 ;-----------------------------------------------------------------------------
81 ; int cpu_cpuid( int op, int *eax, int *ebx, int *ecx, int *edx )
82 ;-----------------------------------------------------------------------------
83 cglobal cpu_cpuid, 0,6
96 ;-----------------------------------------------------------------------------
97 ; void stack_align( void (*func)(void*), void *arg );
98 ;-----------------------------------------------------------------------------
117 ;-----------------------------------------------------------------------------
118 ; void cpu_emms( void )
119 ;-----------------------------------------------------------------------------
124 ;-----------------------------------------------------------------------------
125 ; void cpu_sfence( void )
126 ;-----------------------------------------------------------------------------
131 ;-----------------------------------------------------------------------------
132 ; void cpu_mask_misalign_sse( void )
133 ;-----------------------------------------------------------------------------
134 cglobal cpu_mask_misalign_sse
137 or dword [rsp], 1<<17