#define SSE_MAX_VERTICES 4
-typedef void (XSTDCALL *codegen_function) (
+typedef void (PIPE_CDECL *codegen_function) (
const struct tgsi_exec_vector *input, /* 1 */
struct tgsi_exec_vector *output, /* 2 */
float (*constant)[4], /* 3 */
}
-#ifdef WIN32
-static void
-emit_retw(
- struct x86_function *func,
- unsigned short size )
-{
- x86_retw( func, size );
-}
-#else
static void
emit_ret(
struct x86_function *func )
{
x86_ret( func );
}
-#endif
/**
emit_func_call_dst(
struct x86_function *func,
unsigned xmm_dst,
- void (*code)() )
+ void (PIPE_CDECL *code)() )
{
sse_movaps(
func,
x86_push( func, ecx );
x86_mov_reg_imm( func, ecx, (unsigned long) code );
x86_call( func, ecx );
-#ifndef WIN32
x86_pop(func, ecx );
-#endif
}
struct x86_function *func,
unsigned xmm_dst,
unsigned xmm_src,
- void (*code)() )
+ void (PIPE_CDECL *code)() )
{
sse_movaps(
func,
make_xmm( xmm_src ) );
}
-static void XSTDCALL
+static void PIPE_CDECL
cos4f(
float *store )
{
cos4f );
}
-static void XSTDCALL
+static void PIPE_CDECL
ex24f(
float *store )
{
make_xmm( xmm ) );
}
-static void XSTDCALL
+static void PIPE_CDECL
flr4f(
float *store )
{
flr4f );
}
-static void XSTDCALL
+static void PIPE_CDECL
frc4f(
float *store )
{
frc4f );
}
-static void XSTDCALL
+static void PIPE_CDECL
lg24f(
float *store )
{
TGSI_EXEC_TEMP_80000000_C ) );
}
-static void XSTDCALL
+static void PIPE_CDECL
pow4f(
float *store )
{
TGSI_EXEC_TEMP_80000000_C ) );
}
-static void XSTDCALL
+static void PIPE_CDECL
sin4f(
float *store )
{
break;
case TGSI_OPCODE_RET:
-#ifdef WIN32
- emit_retw( func, 16 );
-#else
emit_ret( func );
-#endif
break;
case TGSI_OPCODE_END:
func,
get_immediate_base() );
-#ifdef WIN32
- emit_retw( func, 16 );
-#else
emit_ret( func );
-#endif
tgsi_parse_free( &parse );
/* Surely this should be defined somewhere in a tgsi header:
*/
-typedef void (XSTDCALL *codegen_function)(
+typedef void (PIPE_CDECL *codegen_function)(
const struct tgsi_exec_vector *input,
struct tgsi_exec_vector *output,
const float (*constant)[4],
/* This should match linux gcc cdecl semantics everywhere, so that we
* just codegen one calling convention on all platforms.
*/
-#ifdef WIN32
+#ifdef _MSC_VER
#define PIPE_CDECL __cdecl
#else
#define PIPE_CDECL
-/**
- * For calling code-gen'd functions, phase out in favor of
- * PIPE_CDECL, above, which really means cdecl on all platforms, not
- * like the below...
- */
-#if !defined(XSTDCALL)
-#if defined(WIN32)
-#define XSTDCALL __stdcall /* phase this out */
-#else
-#define XSTDCALL /* XXX: NOTE! not STDCALL! */
-#endif
-#endif
-
-
#endif /* P_COMPILER_H */