--- nono/m680x0/m68030core.h 2026/04/29 17:04:43 1.1.1.5 +++ nono/m680x0/m68030core.h 2026/04/29 17:04:49 1.1.1.6 @@ -24,17 +24,12 @@ extern void m68030_exception_buserr(m68k extern void m68030_exception_interrupt(m68kcpu *, int); extern void m68030_rte(m68kcpu *); -static inline void cpulog(int lv, const char *fmt, ...) __printflike(2, 3); -static inline void -cpulog(int lv, const char *fmt, ...) -{ - if (__predict_false(gMPU->loglevel >= lv)) { - va_list ap; - va_start(ap, fmt); - gMPU->vputlog(fmt, ap); - va_end(ap); - } -} +// 文字列を作る前にレベルを評価するためマクロ +#define cpulog(lv, fmt...) do { \ + if (__predict_false(gMPU->loglevel >= (lv))) { \ + gMPU->putlogn(fmt); \ + } \ +} while (0) // ops 用のマクロとか