summaryrefslogtreecommitdiff
path: root/src/mesa/x86/rtasm
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/x86/rtasm')
-rw-r--r--src/mesa/x86/rtasm/x86sse.c13
-rw-r--r--src/mesa/x86/rtasm/x86sse.h3
2 files changed, 15 insertions, 1 deletions
diff --git a/src/mesa/x86/rtasm/x86sse.c b/src/mesa/x86/rtasm/x86sse.c
index 385fb84c01..e944d00f9e 100644
--- a/src/mesa/x86/rtasm/x86sse.c
+++ b/src/mesa/x86/rtasm/x86sse.c
@@ -278,11 +278,24 @@ void x86_jmp( struct x86_function *p, unsigned char *label)
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(p, reg, reg);
+}
+#endif
+
/* michal:
* Temporary. As I need immediate operands, and dont want to mess with the codegen,
diff --git a/src/mesa/x86/rtasm/x86sse.h b/src/mesa/x86/rtasm/x86sse.h
index d53b6d71a6..c2aa416492 100644
--- a/src/mesa/x86/rtasm/x86sse.h
+++ b/src/mesa/x86/rtasm/x86sse.h
@@ -119,7 +119,8 @@ void x86_fixup_fwd_jump( struct x86_function *p,
void x86_jmp( struct x86_function *p, unsigned char *label );
-void x86_call( struct x86_function *p, void (*label)() );
+/* void x86_call( struct x86_function *p, void (*label)() ); */
+void x86_call( struct x86_function *p, struct x86_reg reg);
/* michal:
* Temporary. As I need immediate operands, and dont want to mess with the codegen,