X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fauxiliary%2Frtasm%2Frtasm_x86sse.c;h=9f70b73698aaa2735bf0fda24ae110d4b495605a;hb=f667526016dd1710fafd50eb09ac2c5c5b36063e;hp=f675427d987b51e08440e5a433c914aeba389887;hpb=0f185cb027b12356895e424506846fa449e7c47f;p=mesa.git diff --git a/src/gallium/auxiliary/rtasm/rtasm_x86sse.c b/src/gallium/auxiliary/rtasm/rtasm_x86sse.c index f675427d987..9f70b73698a 100644 --- a/src/gallium/auxiliary/rtasm/rtasm_x86sse.c +++ b/src/gallium/auxiliary/rtasm/rtasm_x86sse.c @@ -87,7 +87,7 @@ void x86_print_reg( struct x86_reg reg ) foo++; \ if (*foo) \ foo++; \ - debug_printf( "\n% 4x% 15s ", p->csr - p->store, foo ); \ + debug_printf( "\n%4x %14s ", p->csr - p->store, foo ); \ } while (0) #define DUMP_I( I ) do { \ @@ -1743,20 +1743,35 @@ void x86_release_func( struct x86_function *p ) } -void (*x86_get_func( struct x86_function *p ))(void) +static INLINE x86_func +voidptr_to_x86_func(void *v) +{ + union { + void *v; + x86_func f; + } u; + assert(sizeof(u.v) == sizeof(u.f)); + u.v = v; + return u.f; +} + + +x86_func x86_get_func( struct x86_function *p ) { DUMP_END(); if (DISASSEM && p->store) debug_printf("disassemble %p %p\n", p->store, p->csr); if (p->store == p->error_overflow) - return (void (*)(void)) NULL; + return voidptr_to_x86_func(NULL); else - return (void (*)(void)) p->store; + return voidptr_to_x86_func(p->store); } #else +void x86sse_dummy( void ); + void x86sse_dummy( void ) { }