mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
%esi gets modified by swapchar2 but isn't listed as an output operand for the GCC extended assembly version. This causes the compiler to fail to restore it after swapchar2 executes, causing crashes if used in a loop. This change fixes the security camera crash when using GCC 4.4.x or 4.5.0.
git-svn-id: https://svn.eduke32.com/eduke32@1624 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
b0a27e4c34
commit
4ba108994c
2 changed files with 1 additions and 14 deletions
|
@ -1067,7 +1067,7 @@ void copybufreverse(void *S, void *D, int32_t c);
|
||||||
__asm__ __volatile__ ("addl %%ebx, %%esi; movw (%%eax), %%cx; movb (%%ebx), %%dl; " \
|
__asm__ __volatile__ ("addl %%ebx, %%esi; movw (%%eax), %%cx; movb (%%ebx), %%dl; " \
|
||||||
"movb %%cl, (%%ebx); movb (%%esi), %%dh; movb %%ch, (%%esi); " \
|
"movb %%cl, (%%ebx); movb (%%esi), %%dh; movb %%ch, (%%esi); " \
|
||||||
"movw %%dx, (%%eax)" \
|
"movw %%dx, (%%eax)" \
|
||||||
: : "a" (__a), "b" (__b), "S" (__S) : "ecx", "edx", "memory", "cc"); \
|
: "=S" (__S) : "a" (__a), "b" (__b), "S" (__S) : "ecx", "edx", "memory", "cc"); \
|
||||||
0; })
|
0; })
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10284,12 +10284,6 @@ void setviewback(void)
|
||||||
//
|
//
|
||||||
// squarerotatetile
|
// squarerotatetile
|
||||||
//
|
//
|
||||||
#ifdef __GNUC__
|
|
||||||
#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
|
|
||||||
#if (GCC_VERSION >= 40400)
|
|
||||||
#pragma GCC optimize("0")
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
void squarerotatetile(int16_t tilenume)
|
void squarerotatetile(int16_t tilenume)
|
||||||
{
|
{
|
||||||
int32_t siz;
|
int32_t siz;
|
||||||
|
@ -10308,13 +10302,6 @@ void squarerotatetile(int16_t tilenume)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef __GNUC__
|
|
||||||
#if (GCC_VERSION >= 40400)
|
|
||||||
#pragma GCC reset_options
|
|
||||||
#endif
|
|
||||||
#undef GCC_VERSION
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// preparemirror
|
// preparemirror
|
||||||
|
|
Loading…
Reference in a new issue