Add dummy __has_builtin macro, use rotate builtins if possible

This commit is contained in:
Nekotekina 2019-02-27 23:10:40 +03:00
parent 765d15f23f
commit 7f6a410770
3 changed files with 36 additions and 11 deletions

View file

@ -1205,17 +1205,6 @@ extern bool ppu_stdcx(ppu_thread& ppu, u32 addr, u64 reg_value)
return result;
}
static bool adde_carry(u64 a, u64 b, bool c)
{
#ifdef _MSC_VER
return _addcarry_u64(c, a, b, nullptr) != 0;
#else
bool result;
__asm__("addb $0xff, %[c] \n adcq %[a], %[b] \n setb %[result]" : [a] "+&r" (a), [b] "+&r" (b), [c] "+&r" (c), [result] "=r" (result));
return result;
#endif
}
extern void ppu_initialize()
{
const auto _main = fxm::get<ppu_module>();