Revert revision 1338 "Reduce code required for some flag calculations in two opcode's. (Shouldn't break things but best too do more testing before adding to release branch)." because it broke compilation on linux.

This commit is contained in:
riccardom 2008-12-31 17:34:03 +00:00
parent 8284e81037
commit 475d0151cc
2 changed files with 4 additions and 4 deletions

View File

@ -1162,8 +1162,8 @@ TEMPLATE static u32 FASTCALL OP_ADC_IMM_VAL()
}\
cpu->CPSR.bits.N = BIT31(cpu->R[REG_POS(i,12)]);\
cpu->CPSR.bits.Z = (cpu->R[REG_POS(i,12)]==0);\
cpu->CPSR.bits.C = !UNSIGNED_UNDERFLOW(tmp, cpu->CPSR.bits.C, cpu->R[REG_POS(i,12)]); \
cpu->CPSR.bits.V = SIGNED_UNDERFLOW(tmp, cpu->CPSR.bits.C, cpu->R[REG_POS(i,12)]); \
cpu->CPSR.bits.C = UNSIGNED_OVERFLOW(shift_op, (u32) cpu->CPSR.bits.C, tmp) | UNSIGNED_OVERFLOW(v, tmp, cpu->R[REG_POS(i,12)]);\
cpu->CPSR.bits.V = SIGNED_OVERFLOW(shift_op, (u32) cpu->CPSR.bits.C, tmp) | SIGNED_OVERFLOW(v, tmp, cpu->R[REG_POS(i,12)]);\
return a; \
}

View File

@ -334,8 +334,8 @@ TEMPLATE static u32 FASTCALL OP_ADC_REG()
cpu->CPSR.bits.N = BIT31(res);
cpu->CPSR.bits.Z = res == 0;
cpu->CPSR.bits.C = !UNSIGNED_UNDERFLOW(a, b, res);
cpu->CPSR.bits.V = SIGNED_UNDERFLOW(a, b, res);
cpu->CPSR.bits.C = UNSIGNED_OVERFLOW(b, (u32) cpu->CPSR.bits.C, tmp) | UNSIGNED_OVERFLOW(tmp, a, res);
cpu->CPSR.bits.V = SIGNED_OVERFLOW(b, (u32) cpu->CPSR.bits.C, tmp) | SIGNED_OVERFLOW(tmp, a, res);
return 3;
}