| 42 | } |
| 43 | |
| 44 | static __fi bool _add32_Overflow( s32 x, s32 y, s64 &ret ) |
| 45 | { |
| 46 | GPR_reg64 result; result.SD[0] = (s64)x + y; |
| 47 | |
| 48 | // This 32bit method can rely on the MIPS documented method of checking for |
| 49 | // overflow, whichs imply compares bit 32 (rightmost bit of the upper word), |
| 50 | // against bit 31 (leftmost of the lower word). |
| 51 | |
| 52 | // If bit32 != bit31 then we have an overflow. |
| 53 | if( (result.UL[0]>>31) != (result.UL[1] & 1) ) { |
| 54 | cpuException(0x30, cpuRegs.branch); |
| 55 | return true; |
| 56 | } |
| 57 | |
| 58 | ret = result.SD[0]; |
| 59 | |
| 60 | return false; |
| 61 | } |
| 62 | |
| 63 | |
| 64 | const R5900::OPCODE& R5900::GetCurrentInstruction() |
no test coverage detected