Merge commit 'origin/gallium-0.1' into gallium-0.2
[mesa.git] / src / mesa / x86 / rtasm / x86sse.c
index 39c0e9b851ab747e4c4cbb2db268d30c2ea86f9e..5aedf5b04beb16be24275f357c05908f2cf74983 100644 (file)
@@ -1,6 +1,7 @@
+#ifdef USE_X86_ASM
 #if defined(__i386__) || defined(__386__)
 
-#include "imports.h"
+#include "main/imports.h"
 #include "x86sse.h"
 
 #define DISASSEM 0
@@ -290,7 +291,7 @@ void x86_call( struct x86_function *p, void (*label)())
 void x86_call( struct x86_function *p, struct x86_reg reg)
 {
    emit_1ub(p, 0xff);
-   emit_modrm(p, reg, reg);
+   emit_modrm_noreg(p, 2, reg);
 }
 #endif
 
@@ -1161,11 +1162,12 @@ void x86_init_func( struct x86_function *p )
    p->csr = p->store;
 }
 
-void x86_init_func_size( struct x86_function *p, unsigned code_size )
+int x86_init_func_size( struct x86_function *p, unsigned code_size )
 {
    p->size = code_size;
    p->store = _mesa_exec_malloc(code_size);
    p->csr = p->store;
+   return p->store != NULL;
 }
 
 void x86_release_func( struct x86_function *p )
@@ -1191,3 +1193,9 @@ void x86sse_dummy( void )
 }
 
 #endif
+
+#else  /* USE_X86_ASM */
+
+int x86sse_c_dummy_var; /* silence warning */
+
+#endif /* USE_X86_ASM */