Skip to content

Commit

Permalink
Merge pull request #2220 from fabiangreffrath/volatile_div64_32
Browse files Browse the repository at this point in the history
remove ASM div64_32() implementation
  • Loading branch information
fabiangreffrath authored Mar 4, 2025
2 parents 21ca158 + 1b0b2f7 commit b89a6ae
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/m_fixed.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
int32_t lo = a;
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)))
Expand Down

0 comments on commit b89a6ae

Please sign in to comment.