fix inline asm for gcc4

This commit is contained in:
gbeauche 2005-04-24 17:22:49 +00:00
parent 57169c7923
commit 1853c38130
2 changed files with 13 additions and 12 deletions

View File

@ -340,17 +340,18 @@ void OPPROTO op_jmp_A0(void)
// Register calling conventions based arches don't need a stack frame
#if defined(__powerpc__) || defined(__x86_64__)
#define DEFINE_OP(NAME, CODE) \
static void OPPROTO impl_##NAME(void) __attribute__((used)); \
void OPPROTO impl_##NAME(void) \
{ \
asm volatile (#NAME ":"); \
CODE; \
FORCE_RET(); \
asm volatile ("." #NAME ":"); \
asm volatile (ASM_SIZE(NAME)); \
} \
void OPPROTO helper_##NAME(void) __attribute__((weak, alias(#NAME)));
#define DEFINE_OP(NAME, CODE) \
static void OPPROTO impl_##NAME(void) __attribute__((used)); \
void OPPROTO impl_##NAME(void) \
{ \
asm volatile (#NAME ":"); \
CODE; \
FORCE_RET(); \
asm volatile ("." #NAME ":"); \
asm volatile (ASM_SIZE(NAME)); \
} \
asm(".weak " #NAME); \
asm(".set helper_" #NAME "," #NAME);
#else
#define DEFINE_OP(NAME, CODE) \
void OPPROTO NAME(void) \

View File

@ -601,7 +601,7 @@ void OPPROTO op_spcflags_clear(void)
#ifdef DYNGEN_FAST_DISPATCH
#if defined(__x86_64__)
#define FAST_COMPARE_SPECFLAGS_DISPATCH(SPCFLAGS, TARGET) \
asm volatile ("test %0,%0 ; jz " #TARGET : "+r" (SPCFLAGS))
asm volatile ("test %0,%0 ; jz " #TARGET : : "r" (SPCFLAGS))
#endif
#ifndef FAST_COMPARE_SPECFLAGS_DISPATCH
#define FAST_COMPARE_SPECFLAGS_DISPATCH(SPCFLAGS, TARGET) \