struct x86_function *func,
unsigned xmm_dst,
unsigned storage,
- unsigned char *code )
+ void (*code)() )
{
x86_push(
func,
unsigned xmm_dst,
unsigned xmm_src,
unsigned storage,
- unsigned char *code )
+ void (*code)() )
{
x86_push(
func,
func,
xmm_dst,
ALIGN16( (unsigned) g_cos_storage ),
- (unsigned char *) cos4f );
+ cos4f );
}
/* XXX: move into machine context */
func,
xmm_dst,
ALIGN16( (unsigned) g_sin_storage ),
- (unsigned char *) sin4f );
+ sin4f );
}
static void
xmm_dst,
xmm_src,
ALIGN16( (unsigned) g_pow_storage ),
- (unsigned char *) pow4f );
+ pow4f );
}
/* XXX: move into machine context */
func,
xmm_dst,
ALIGN16( (unsigned) g_ex2_storage ),
- (unsigned char *) ex24f );
+ ex24f );
}
/* XXX: move into machine context */
func,
xmm_dst,
ALIGN16( (unsigned) g_lg2_storage ),
- (unsigned char *) lg24f );
+ lg24f );
}
/* XXX: move into machine context */
func,
xmm_dst,
ALIGN16( (unsigned) g_flr_storage ),
- (unsigned char *) flr4f );
+ flr4f );
}
/* XXX: move into machine context */
func,
xmm_dst,
ALIGN16( (unsigned) g_frc_storage ),
- (unsigned char *) frc4f );
+ frc4f );
}
static void
#define DISASSEM 0
#define X86_TWOB 0x0f
+static GLubyte *cptr( void (*label)() )
+{
+ return (char *)(unsigned long)label;
+}
+
+
/* Emit bytes to the instruction stream:
*/
static void emit_1b( struct x86_function *p, GLbyte b0 )
emit_1i(p, label - x86_get_label(p) - 4);
}
-void x86_call( struct x86_function *p, GLubyte *label)
+void x86_call( struct x86_function *p, void (*label)())
{
emit_1ub(p, 0xe8);
- emit_1i(p, label - x86_get_label(p) - 4);
+ emit_1i(p, cptr(label) - x86_get_label(p) - 4);
}
/* michal:
{
if (DISASSEM)
_mesa_printf("disassemble %p %p\n", p->store, p->csr);
- return (void (*)(void))p->store;
+ return (void (*)(void)) (unsigned long) p->store;
}
#else
void x86_jmp( struct x86_function *p, GLubyte *label );
-void x86_call( struct x86_function *p, GLubyte *label );
+void x86_call( struct x86_function *p, void (*label)() );
/* michal:
* Temporary. As I need immediate operands, and dont want to mess with the codegen,