diff options
-rw-r--r-- | src/gallium/auxiliary/rtasm/Makefile | 4 | ||||
-rw-r--r-- | src/gallium/auxiliary/rtasm/SConscript | 4 | ||||
-rw-r--r-- | src/gallium/auxiliary/rtasm/rtasm_execmem.c (renamed from src/gallium/auxiliary/rtasm/execmem.c) | 17 | ||||
-rw-r--r-- | src/gallium/auxiliary/rtasm/rtasm_execmem.h (renamed from src/gallium/auxiliary/rtasm/execmem.h) | 8 | ||||
-rw-r--r-- | src/gallium/auxiliary/rtasm/rtasm_x86sse.c (renamed from src/gallium/auxiliary/rtasm/x86sse.c) | 15 | ||||
-rw-r--r-- | src/gallium/auxiliary/rtasm/rtasm_x86sse.h (renamed from src/gallium/auxiliary/rtasm/x86sse.h) | 0 |
6 files changed, 25 insertions, 23 deletions
diff --git a/src/gallium/auxiliary/rtasm/Makefile b/src/gallium/auxiliary/rtasm/Makefile index b3b9934e10..7c8ac60794 100644 --- a/src/gallium/auxiliary/rtasm/Makefile +++ b/src/gallium/auxiliary/rtasm/Makefile @@ -5,9 +5,9 @@ include $(TOP)/configs/current LIBNAME = rtasm DRIVER_SOURCES = \ + execmem.c \ x86sse.c \ - mm.c \ - execmem.c + mm.c C_SOURCES = \ $(DRIVER_SOURCES) diff --git a/src/gallium/auxiliary/rtasm/SConscript b/src/gallium/auxiliary/rtasm/SConscript index c5b1551786..de8456e0ca 100644 --- a/src/gallium/auxiliary/rtasm/SConscript +++ b/src/gallium/auxiliary/rtasm/SConscript @@ -3,9 +3,9 @@ Import('*') rtasm = env.ConvenienceLibrary( target = 'rtasm', source = [ - 'x86sse.c', + 'rtasm_execmem.c', + 'rtasm_x86sse.c', 'mm.c', - 'execmem.c', ]) auxiliaries.insert(0, rtasm) diff --git a/src/gallium/auxiliary/rtasm/execmem.c b/src/gallium/auxiliary/rtasm/rtasm_execmem.c index c7c35f7ef2..cb13db2498 100644 --- a/src/gallium/auxiliary/rtasm/execmem.c +++ b/src/gallium/auxiliary/rtasm/rtasm_execmem.c @@ -31,9 +31,10 @@ #include "pipe/p_compiler.h" +#include "pipe/p_debug.h" #include "pipe/p_thread.h" -#include "execmem.h" +#include "rtasm_execmem.h" #if defined(__linux__) @@ -69,7 +70,7 @@ init_heap(void) void * -_mesa_exec_malloc(size_t size) +rtasm_exec_malloc(size_t size) { struct mem_block *block = NULL; void *addr = NULL; @@ -86,7 +87,7 @@ _mesa_exec_malloc(size_t size) if (block) addr = exec_mem + block->ofs; else - debug_printf("_mesa_exec_malloc failed\n"); + debug_printf("rtasm_exec_malloc failed\n"); _glthread_UNLOCK_MUTEX(exec_mutex); @@ -95,7 +96,7 @@ _mesa_exec_malloc(size_t size) void -_mesa_exec_free(void *addr) +rtasm_exec_free(void *addr) { _glthread_LOCK_MUTEX(exec_mutex); @@ -117,16 +118,16 @@ _mesa_exec_free(void *addr) */ void * -_mesa_exec_malloc(GLuint size) +rtasm_exec_malloc(GLuint size) { - return _mesa_malloc( size ); + return MALLOC( size ); } void -_mesa_exec_free(void *addr) +rtasm_exec_free(void *addr) { - _mesa_free(addr); + FREE(addr); } diff --git a/src/gallium/auxiliary/rtasm/execmem.h b/src/gallium/auxiliary/rtasm/rtasm_execmem.h index 9fd4569165..155c6d34e0 100644 --- a/src/gallium/auxiliary/rtasm/execmem.h +++ b/src/gallium/auxiliary/rtasm/rtasm_execmem.h @@ -28,18 +28,18 @@ * \author Keith Whitwell */ -#ifndef _EXECMEM_H_ -#define _EXECMEM_H_ +#ifndef _RTASM_EXECMEM_H_ +#define _RTASM_EXECMEM_H_ #include "pipe/p_compiler.h" extern void * -_mesa_exec_malloc( size_t size ); +rtasm_exec_malloc( size_t size ); extern void -_mesa_exec_free( void *addr ); +rtasm_exec_free( void *addr ); #endif diff --git a/src/gallium/auxiliary/rtasm/x86sse.c b/src/gallium/auxiliary/rtasm/rtasm_x86sse.c index fff6f77a6b..3c885a9fff 100644 --- a/src/gallium/auxiliary/rtasm/x86sse.c +++ b/src/gallium/auxiliary/rtasm/rtasm_x86sse.c @@ -3,7 +3,8 @@ #include "pipe/p_compiler.h" #include "pipe/p_debug.h" -#include "x86sse.h" +#include "rtasm_execmem.h" +#include "rtasm_x86sse.h" #define DISASSEM 0 #define X86_TWOB 0x0f @@ -18,17 +19,17 @@ static void do_realloc( struct x86_function *p ) { if (p->size == 0) { p->size = 1024; - p->store = _mesa_exec_malloc(p->size); + p->store = rtasm_exec_malloc(p->size); p->csr = p->store; } else { unsigned used = p->csr - p->store; unsigned char *tmp = p->store; p->size *= 2; - p->store = _mesa_exec_malloc(p->size); + p->store = rtasm_exec_malloc(p->size); memcpy(p->store, tmp, used); p->csr = p->store + used; - _mesa_exec_free(tmp); + rtasm_exec_free(tmp); } } @@ -1166,13 +1167,13 @@ void x86_init_func( struct x86_function *p ) void x86_init_func_size( struct x86_function *p, unsigned code_size ) { p->size = code_size; - p->store = _mesa_exec_malloc(code_size); + p->store = rtasm_exec_malloc(code_size); p->csr = p->store; } void x86_release_func( struct x86_function *p ) { - _mesa_exec_free(p->store); + rtasm_exec_free(p->store); p->store = NULL; p->csr = NULL; p->size = 0; @@ -1182,7 +1183,7 @@ void x86_release_func( struct x86_function *p ) void (*x86_get_func( struct x86_function *p ))(void) { if (DISASSEM && p->store) - _mesa_printf("disassemble %p %p\n", p->store, p->csr); + debug_printf("disassemble %p %p\n", p->store, p->csr); return (void (*)(void)) (unsigned long) p->store; } diff --git a/src/gallium/auxiliary/rtasm/x86sse.h b/src/gallium/auxiliary/rtasm/rtasm_x86sse.h index c2aa416492..c2aa416492 100644 --- a/src/gallium/auxiliary/rtasm/x86sse.h +++ b/src/gallium/auxiliary/rtasm/rtasm_x86sse.h |