trunk/src/emu/cpu/mips/mips3fe.c
r241705 | r241706 | |
106 | 106 | desc.regin[0] |= REGFLAG_R(RSREG) | REGFLAG_R(RTREG); |
107 | 107 | desc.flags |= OPFLAG_IS_CONDITIONAL_BRANCH; |
108 | 108 | } |
109 | | desc.targetpc = desc.pc + 4 + (SIMMVAL << 2); |
| 109 | desc.targetpc = desc.pc + 4 + SIMMVAL * 4; |
110 | 110 | desc.delayslots = 1; |
111 | 111 | desc.skipslots = (opswitch & 0x10) ? 1 : 0; |
112 | 112 | return true; |
r241705 | r241706 | |
122 | 122 | desc.regin[0] |= REGFLAG_R(RSREG); |
123 | 123 | desc.flags |= OPFLAG_IS_CONDITIONAL_BRANCH; |
124 | 124 | } |
125 | | desc.targetpc = desc.pc + 4 + (SIMMVAL << 2); |
| 125 | desc.targetpc = desc.pc + 4 + SIMMVAL * 4; |
126 | 126 | desc.delayslots = 1; |
127 | 127 | desc.skipslots = (opswitch & 0x10) ? 1 : 0; |
128 | 128 | return true; |
r241705 | r241706 | |
396 | 396 | desc.regin[0] |= REGFLAG_R(RSREG); |
397 | 397 | desc.flags |= OPFLAG_IS_CONDITIONAL_BRANCH; |
398 | 398 | } |
399 | | desc.targetpc = desc.pc + 4 + (SIMMVAL << 2); |
| 399 | desc.targetpc = desc.pc + 4 + SIMMVAL * 4; |
400 | 400 | desc.delayslots = 1; |
401 | 401 | desc.skipslots = (RTREG & 0x02) ? 1 : 0; |
402 | 402 | return true; |
r241705 | r241706 | |
423 | 423 | desc.flags |= OPFLAG_IS_CONDITIONAL_BRANCH; |
424 | 424 | } |
425 | 425 | desc.regout[0] |= REGFLAG_R(31); |
426 | | desc.targetpc = desc.pc + 4 + (SIMMVAL << 2); |
| 426 | desc.targetpc = desc.pc + 4 + SIMMVAL * 4; |
427 | 427 | desc.delayslots = 1; |
428 | 428 | desc.skipslots = (RTREG & 0x02) ? 1 : 0; |
429 | 429 | return true; |
r241705 | r241706 | |
508 | 508 | case 0x00: // BCzF |
509 | 509 | case 0x01: // BCzT |
510 | 510 | desc.flags |= OPFLAG_IS_CONDITIONAL_BRANCH; |
511 | | desc.targetpc = desc.pc + 4 + (SIMMVAL << 2); |
| 511 | desc.targetpc = desc.pc + 4 + SIMMVAL * 4; |
512 | 512 | desc.delayslots = 1; |
513 | 513 | return true; |
514 | 514 | } |
r241705 | r241706 | |
580 | 580 | case 0x03: // BCzTL |
581 | 581 | desc.regin[2] |= REGFLAG_FCC; |
582 | 582 | desc.flags |= OPFLAG_IS_CONDITIONAL_BRANCH; |
583 | | desc.targetpc = desc.pc + 4 + (SIMMVAL << 2); |
| 583 | desc.targetpc = desc.pc + 4 + SIMMVAL * 4; |
584 | 584 | desc.delayslots = 1; |
585 | 585 | desc.skipslots = (RTREG & 0x02) ? 1 : 0; |
586 | 586 | return true; |
r241705 | r241706 | |
730 | 730 | case 0x00: // BCzF |
731 | 731 | case 0x01: // BCzT |
732 | 732 | desc.flags |= OPFLAG_IS_CONDITIONAL_BRANCH; |
733 | | desc.targetpc = desc.pc + 4 + (SIMMVAL << 2); |
| 733 | desc.targetpc = desc.pc + 4 + SIMMVAL * 4; |
734 | 734 | desc.delayslots = 1; |
735 | 735 | return true; |
736 | 736 | } |
trunk/src/emu/cpu/rsp/rspfe.c
r241705 | r241706 | |
83 | 83 | desc.regin[0] |= REGFLAG_R(RSREG) | REGFLAG_R(RTREG); |
84 | 84 | desc.flags |= OPFLAG_IS_CONDITIONAL_BRANCH; |
85 | 85 | } |
86 | | desc.targetpc = ((desc.pc + 4 + (SIMMVAL << 2)) & 0x00000fff) | 0x1000; |
| 86 | desc.targetpc = ((desc.pc + 4 + SIMMVAL * 4) & 0x00000fff) | 0x1000; |
87 | 87 | desc.delayslots = 1; |
88 | 88 | desc.skipslots = (opswitch & 0x10) ? 1 : 0; |
89 | 89 | return true; |
r241705 | r241706 | |
97 | 97 | desc.regin[0] |= REGFLAG_R(RSREG); |
98 | 98 | desc.flags |= OPFLAG_IS_CONDITIONAL_BRANCH; |
99 | 99 | } |
100 | | desc.targetpc = ((desc.pc + 4 + (SIMMVAL << 2)) & 0x00000fff) | 0x1000; |
| 100 | desc.targetpc = ((desc.pc + 4 + SIMMVAL * 4) & 0x00000fff) | 0x1000; |
101 | 101 | desc.delayslots = 1; |
102 | 102 | desc.skipslots = (opswitch & 0x10) ? 1 : 0; |
103 | 103 | return true; |
r241705 | r241706 | |
234 | 234 | desc.regin[0] |= REGFLAG_R(RSREG); |
235 | 235 | desc.flags |= OPFLAG_IS_CONDITIONAL_BRANCH; |
236 | 236 | } |
237 | | desc.targetpc = ((desc.pc + 4 + (SIMMVAL << 2)) & 0x00000fff) | 0x1000; |
| 237 | desc.targetpc = ((desc.pc + 4 + SIMMVAL * 4) & 0x00000fff) | 0x1000; |
238 | 238 | desc.delayslots = 1; |
239 | 239 | desc.skipslots = (RTREG & 0x02) ? 1 : 0; |
240 | 240 | return true; |
r241705 | r241706 | |
249 | 249 | desc.flags |= OPFLAG_IS_CONDITIONAL_BRANCH; |
250 | 250 | } |
251 | 251 | desc.regout[0] |= REGFLAG_R(31); |
252 | | desc.targetpc = ((desc.pc + 4 + (SIMMVAL << 2)) & 0x00000fff) | 0x1000; |
| 252 | desc.targetpc = ((desc.pc + 4 + SIMMVAL * 4) & 0x00000fff) | 0x1000; |
253 | 253 | desc.delayslots = 1; |
254 | 254 | desc.skipslots = (RTREG & 0x02) ? 1 : 0; |
255 | 255 | return true; |