From 109457994ebcdecb50c52dcead07d5369bb592e3 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sun, 29 Jul 2012 12:46:56 +0000 Subject: [PATCH] Classic: on x86 GCC asm builds, fix crash with floor sprites of (x or y) size 2. The idiv instruction also signals an FPE when the resulting *signed* quotient overflows, so we simply use div instead. git-svn-id: https://svn.eduke32.com/eduke32@2850 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/engine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 673895aee..c3650ed20 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -3938,7 +3938,7 @@ static void transmaskwallscan(int32_t x1, int32_t x2) // from pragmas.h # define ourdivscale32(d,b) \ ({ int32_t __d=(d), __b=(b), __r; \ - __asm__ __volatile__ ("xorl %%eax, %%eax; idivl %%ebx" \ + __asm__ __volatile__ ("xorl %%eax, %%eax; divl %%ebx" \ : "=a" (__r), "=d" (__d) : "d" (__d), "b" (__b) : "cc"); \ __r; }) #else