remove ASM div64_32() implementation

* Prone to miscompilation
* Only helps with very old PCs
* Really only helps with voxel rendering
This commit is contained in:
Fabian Greffrath 2025-03-04 10:02:57 +01:00
parent 3034f5d2c4
commit 1b0b2f7599

View File

@ -30,20 +30,6 @@
#define div64_32(a, b) _div64((a), (b), NULL)
#elif defined(__GNUC__) && defined(__x86_64__)
inline static int32_t div64_32(int64_t a, int32_t b)
{
if (__builtin_constant_p(b))
{
return a / b;
}
volatile int32_t lo = a;
volatile int32_t hi = a >> 32;
asm("idivl %[divisor]" : "+a" (lo), "+d" (hi) : [divisor] "r" (b));
return lo;
}
#else
#define div64_32(a, b) ((fixed_t)((a) / (b)))