Fixed inline assembler in winlink.cpp when compiled with optimisations.
This commit is contained in:
@@ -405,7 +405,7 @@ ${WINDIR}/zsnes.res: ${WINDIR}/zsnes.rc ${WINDIR}/afxres.h ${WINDIR}/resource.h
|
|||||||
rc ${WINDIR}/zsnes.rc
|
rc ${WINDIR}/zsnes.rc
|
||||||
else
|
else
|
||||||
${WINDIR}/winlink${OE}: ${WINDIR}/winlink.cpp ${WINDIR}/resource.h
|
${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
|
${WINDIR}/zsnes${OE}: ${WINDIR}/zsnes.rc ${WINDIR}/afxres.h ${WINDIR}/resource.h
|
||||||
${WINDRES} --include-dir ${WINDIR} ${WINDIR}/zsnes.rc -o${WINDIR}/zsnes${OE}
|
${WINDRES} --include-dir ${WINDIR} ${WINDIR}/zsnes.rc -o${WINDIR}/zsnes${OE}
|
||||||
${OBJFIX}: objfix.c
|
${OBJFIX}: objfix.c
|
||||||
|
|||||||
@@ -56,8 +56,10 @@ asm_call() can be treated like any C function, use it to call an assembly functi
|
|||||||
#ifdef __GNUC__ //MinGW
|
#ifdef __GNUC__ //MinGW
|
||||||
|
|
||||||
//Simple start and end structure, set as volatile so perhaps we can use -O1+ later
|
//Simple start and end structure, set as volatile so perhaps we can use -O1+ later
|
||||||
#define ASM_BEGIN asm volatile (
|
#define ASM_BEGIN asm volatile ( \
|
||||||
#define ASM_END );
|
ASM_COMMAND(pushad)
|
||||||
|
#define ASM_END ASM_COMMAND(popad) \
|
||||||
|
);
|
||||||
//All commands need quotes and a newline and tab. C vars are _ prefixed
|
//All commands need quotes and a newline and tab. C vars are _ prefixed
|
||||||
#define ASM_COMMAND(line) #line"\n\t"
|
#define ASM_COMMAND(line) #line"\n\t"
|
||||||
#define ASM_COMMAND2(line, part2) #line", "#part2"\n\t"
|
#define ASM_COMMAND2(line, part2) #line", "#part2"\n\t"
|
||||||
|
|||||||
Reference in New Issue
Block a user