OSDN Git Service

Rename rtasm files.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Tue, 19 Feb 2008 03:00:48 +0000 (12:00 +0900)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Tue, 19 Feb 2008 05:01:49 +0000 (14:01 +0900)
src/gallium/auxiliary/rtasm/Makefile
src/gallium/auxiliary/rtasm/SConscript
src/gallium/auxiliary/rtasm/rtasm_execmem.c [moved from src/gallium/auxiliary/rtasm/execmem.c with 91% similarity]
src/gallium/auxiliary/rtasm/rtasm_execmem.h [moved from src/gallium/auxiliary/rtasm/execmem.h with 92% similarity]
src/gallium/auxiliary/rtasm/rtasm_x86sse.c [moved from src/gallium/auxiliary/rtasm/x86sse.c with 98% similarity]
src/gallium/auxiliary/rtasm/rtasm_x86sse.h [moved from src/gallium/auxiliary/rtasm/x86sse.h with 100% similarity]

index b3b9934..7c8ac60 100644 (file)
@@ -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)
index c5b1551..de8456e 100644 (file)
@@ -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)
similarity index 91%
rename from src/gallium/auxiliary/rtasm/execmem.c
rename to src/gallium/auxiliary/rtasm/rtasm_execmem.c
index c7c35f7..cb13db2 100644 (file)
 
 
 #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);
 }
 
 
similarity index 92%
rename from src/gallium/auxiliary/rtasm/execmem.h
rename to src/gallium/auxiliary/rtasm/rtasm_execmem.h
index 9fd4569..155c6d3 100644 (file)
  * \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
similarity index 98%
rename from src/gallium/auxiliary/rtasm/x86sse.c
rename to src/gallium/auxiliary/rtasm/rtasm_x86sse.c
index fff6f77..3c885a9 100644 (file)
@@ -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;
 }