only enable __GNU_INLINE_X86_32__ for x86/IA32

also don't error out if both __MSVC_INLINE__ and __GNU_INLINE_X86_32__
are not set, we have C fallbacks now
This commit is contained in:
notaz 2016-04-24 18:04:43 +03:00
parent 4b5cc03bf0
commit 78b26698ac

View File

@ -109,6 +109,24 @@ MY_STATIC_ASSERT(size_tSize, sizeof(size_t) == sizeof(void*));
#define ASMSYM(x) #x
#endif
/* should we enable inline asm? */
#ifndef USE_PORTABLE_C
#if defined(__MSVC_INLINE__)
/* the build system selected __MSVC_INLINE__ */
#elif defined(__GNU_INLINE_X86_32__)
/* the build system selected __GNU_INLINE_X86_32__ */
#elif defined(_MSC_VER) && defined(_M_IX86)
#define __MSVC_INLINE__
#elif defined (__GNUC__) && defined(__i386)
#define __GNU_INLINE_X86_32__
#endif
#if defined(__GNU_INLINE_X86_32__)
#define FPU_REGS "st", "st(1)", "st(2)", "st(3)", "st(4)", "st(5)", "st(6)", "st(7)"
#define MMX_REGS "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7"
#endif
#endif
#ifdef PLATFORM_UNIX /* rcg10042001 */
#include <stdio.h>
#include <string.h>
@ -134,25 +152,6 @@ MY_STATIC_ASSERT(size_tSize, sizeof(size_t) == sizeof(void*));
#endif
#endif
#if ((defined __GNUC__) && (!defined __GNU_INLINE_X86__))
#define __GNU_INLINE_X86__
#endif
#if (defined __INTEL_COMPILER)
#if ((!defined __GNU_INLINE_X86__) && (!defined __MSVC_INLINE__))
#error Please define __GNU_INLINE_X86__ or __MSVC_INLINE__ with Intel C++.
#endif
#if ((defined __GNU_INLINE_X86__) && (defined __MSVC_INLINE__))
#error Define either __GNU_INLINE_X86__ or __MSVC_INLINE__ with Intel C++.
#endif
#endif
#if defined(__GNU_INLINE_X86__) && defined(__i386__)
#define FPU_REGS "st", "st(1)", "st(2)", "st(3)", "st(4)", "st(5)", "st(6)", "st(7)"
#define MMX_REGS "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7"
#endif
#ifndef PAGESIZE
#define PAGESIZE 4096
#endif