mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
Rename rtasm files.
This commit is contained in:
parent
df8ab3140c
commit
39ea030842
6 changed files with 25 additions and 23 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
||||
Loading…
Add table
Reference in a new issue