+#ifdef USE_X86_ASM
#if defined(__i386__) || defined(__386__)
-#include "imports.h"
+#include "main/imports.h"
#include "x86sse.h"
#define DISASSEM 0
static void do_realloc( struct x86_function *p )
{
- _mesa_printf("do_realloc %d %p\n", p->size, p->store);
-
if (p->size == 0) {
p->size = 1024;
p->store = _mesa_exec_malloc(p->size);
emit_1i(p, label - x86_get_label(p) - 4);
}
+#if 0
+/* This doesn't work once we start reallocating & copying the
+ * generated code on buffer fills, because the call is relative to the
+ * current pc.
+ */
void x86_call( struct x86_function *p, void (*label)())
{
emit_1ub(p, 0xe8);
emit_1i(p, cptr(label) - x86_get_label(p) - 4);
}
+#else
+void x86_call( struct x86_function *p, struct x86_reg reg)
+{
+ emit_1ub(p, 0xff);
+ emit_modrm_noreg(p, 2, reg);
+}
+#endif
+
/* michal:
* Temporary. As I need immediate operands, and dont want to mess with the codegen,
assert(0);
}
else if (dst.idx == 0) {
- assert(arg.file = file_REG32);
+ assert(arg.file == file_REG32);
emit_1ub(p, 0xd8);
emit_modrm_noreg(p, argmem_noreg, arg);
}
}
#endif
+
+#else /* USE_X86_ASM */
+
+int x86sse_c_dummy_var; /* silence warning */
+
+#endif /* USE_X86_ASM */