Fixed inline assembler in winlink.cpp when compiled with optimisations.

This commit is contained in:
jbo_85
2006-03-25 21:59:52 +00:00
parent 48283a231b
commit 7111ad97ad
2 changed files with 5 additions and 3 deletions

View File

@@ -405,7 +405,7 @@ ${WINDIR}/zsnes.res: ${WINDIR}/zsnes.rc ${WINDIR}/afxres.h ${WINDIR}/resource.h
rc ${WINDIR}/zsnes.rc
else
${WINDIR}/winlink${OE}: ${WINDIR}/winlink.cpp ${WINDIR}/resource.h
${CPPC} -O0 ${CFLAGS} -masm=intel -o $@ -c ${WINDIR}/winlink.cpp
${CPPC} ${COPT} ${CFLAGS} -masm=intel -o $@ -c ${WINDIR}/winlink.cpp
${WINDIR}/zsnes${OE}: ${WINDIR}/zsnes.rc ${WINDIR}/afxres.h ${WINDIR}/resource.h
${WINDRES} --include-dir ${WINDIR} ${WINDIR}/zsnes.rc -o${WINDIR}/zsnes${OE}
${OBJFIX}: objfix.c

View File

@@ -56,8 +56,10 @@ asm_call() can be treated like any C function, use it to call an assembly functi
#ifdef __GNUC__ //MinGW
//Simple start and end structure, set as volatile so perhaps we can use -O1+ later
#define ASM_BEGIN asm volatile (
#define ASM_END );
#define ASM_BEGIN asm volatile ( \
ASM_COMMAND(pushad)
#define ASM_END ASM_COMMAND(popad) \
);
//All commands need quotes and a newline and tab. C vars are _ prefixed
#define ASM_COMMAND(line) #line"\n\t"
#define ASM_COMMAND2(line, part2) #line", "#part2"\n\t"