+ Fix for 64 bit asm

+ Fix for MinGW

SVN revision: 38799
This commit is contained in:
Jorge Luis Zapata Muga 2009-01-26 19:35:12 +00:00
parent 75299a9fa3
commit e5123aac83
2 changed files with 16 additions and 1 deletions

View File

@ -15,6 +15,10 @@
* License along with this library;
* if not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "eina_cpu.h"
/*============================================================================*
* Local *
@ -25,10 +29,18 @@
static inline void _x86_cpuid(int op, int *a, int *b, int *c, int *d)
{
asm volatile(
#if defined(__x86_64__)
"pushq %%rbx \n\t" /* save %ebx */
#else
"pushl %%ebx \n\t" /* save %ebx */
#endif
"cpuid \n\t"
"movl %%ebx, %1 \n\t" /* save what cpuid just put in %ebx */
#if defined(__x86_64__)
"popq %%rbx \n\t" /* restore the old %ebx */
#else
"popl %%ebx \n\t" /* restore the old %ebx */
#endif
: "=a"(*a), "=r"(*b), "=c"(*c), "=d"(*d)
: "a"(op)
: "cc");

View File

@ -21,12 +21,15 @@
* version Gustavo did is hardcoded here
* http://blog.gustavobarbieri.com.br/2007/06/03/evas-now-using-rectangle-split-and-merge/
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <stdlib.h>
#include <stdio.h>
#include "eina_tiler.h"
#include "eina_private.h"
#include "eina_types.h"
/*============================================================================*
* Local *
*============================================================================*/