diff --git a/SAGE/m68k_cpu.c b/SAGE/m68k_cpu.c index 2a1f58fe..466611ef 100644 --- a/SAGE/m68k_cpu.c +++ b/SAGE/m68k_cpu.c @@ -64,7 +64,7 @@ #define BIT15 0x8000 #define BIT16 0x10000 #define BIT31 0x80000000 -#define BIT32 0x100000000L +#define BIT32 0x100000000LL #define MASK_0(x) ((x) & 1) #define MASK_8U(x) ((x) & 0xffffff00) @@ -78,7 +78,7 @@ #define MASK_32U(x) (0) #define MASK_32L(x) ((x) & 0xffffffff) #define MASK_32SGN(x) ((x) & BIT31) -#define MASK_33(x) ((x) & BIT32) +#define MASK_33(x64) ((x64) & BIT32) #define COMBINE8(tgt,src) (MASK_8U(tgt) | MASK_8L(src)) #define COMBINE16(tgt,src) (MASK_16U(tgt) | MASK_16L(src)) @@ -3052,7 +3052,7 @@ do_roxr32: reg = DR+IR_REGY; if (CCR_X) resx |= BIT32; resx = (resx>>cnt) | (resx<<(33-cnt)); *reg = MASK_32L(resx); - SETF(MASK_33(res),FLAG_X|FLAG_C); + SETF(MASK_33(resx),FLAG_X|FLAG_C); } else SETF(CCR_X,FLAG_C); SETNZ32(resx); CLRF(FLAG_V);