/[qemu]/qemu/target-ppc/translate.c
ViewVC logotype

Diff of /qemu/target-ppc/translate.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.31 by bellard, Thu May 12 18:46:11 2005 UTC revision 1.32 by bellard, Sat Jun 4 22:22:27 2005 UTC
# Line 1370  GEN_HANDLER(lswi, 0x1F, 0x15, 0x12, 0x00 Line 1370  GEN_HANDLER(lswi, 0x1F, 0x15, 0x12, 0x00
1370          gen_op_load_gpr_T0(ra);          gen_op_load_gpr_T0(ra);
1371      }      }
1372      gen_op_set_T1(nb);      gen_op_set_T1(nb);
1373        /* NIP cannot be restored if the memory exception comes from an helper */
1374        gen_op_update_nip((ctx)->nip - 4);
1375      op_ldsts(lswi, start);      op_ldsts(lswi, start);
1376  }  }
1377    
# Line 1388  GEN_HANDLER(lswx, 0x1F, 0x15, 0x10, 0x00 Line 1390  GEN_HANDLER(lswx, 0x1F, 0x15, 0x10, 0x00
1390          gen_op_add();          gen_op_add();
1391      }      }
1392      gen_op_load_xer_bc();      gen_op_load_xer_bc();
1393        /* NIP cannot be restored if the memory exception comes from an helper */
1394        gen_op_update_nip((ctx)->nip - 4);
1395      op_ldstsx(lswx, rD(ctx->opcode), ra, rb);      op_ldstsx(lswx, rD(ctx->opcode), ra, rb);
1396  }  }
1397    
# Line 1404  GEN_HANDLER(stswi, 0x1F, 0x15, 0x16, 0x0 Line 1408  GEN_HANDLER(stswi, 0x1F, 0x15, 0x16, 0x0
1408      if (nb == 0)      if (nb == 0)
1409          nb = 32;          nb = 32;
1410      gen_op_set_T1(nb);      gen_op_set_T1(nb);
1411        /* NIP cannot be restored if the memory exception comes from an helper */
1412        gen_op_update_nip((ctx)->nip - 4);
1413      op_ldsts(stsw, rS(ctx->opcode));      op_ldsts(stsw, rS(ctx->opcode));
1414  }  }
1415    
# Line 1421  GEN_HANDLER(stswx, 0x1F, 0x15, 0x14, 0x0 Line 1427  GEN_HANDLER(stswx, 0x1F, 0x15, 0x14, 0x0
1427          gen_op_add();          gen_op_add();
1428      }      }
1429      gen_op_load_xer_bc();      gen_op_load_xer_bc();
1430        /* NIP cannot be restored if the memory exception comes from an helper */
1431        gen_op_update_nip((ctx)->nip - 4);
1432      op_ldsts(stsw, rS(ctx->opcode));      op_ldsts(stsw, rS(ctx->opcode));
1433  }  }
1434    
# Line 2123  GEN_HANDLER(mftb, 0x1F, 0x13, 0x0B, 0x00 Line 2131  GEN_HANDLER(mftb, 0x1F, 0x13, 0x0B, 0x00
2131  }  }
2132    
2133  /* mtcrf */  /* mtcrf */
2134  GEN_HANDLER(mtcrf, 0x1F, 0x10, 0x04, 0x00100801, PPC_MISC)  /* The mask should be 0x00100801, but Mac OS X 10.4 use an alternate form */
2135    GEN_HANDLER(mtcrf, 0x1F, 0x10, 0x04, 0x00000801, PPC_MISC)
2136  {  {
2137      gen_op_load_gpr_T0(rS(ctx->opcode));      gen_op_load_gpr_T0(rS(ctx->opcode));
2138      gen_op_store_cr(CRM(ctx->opcode));      gen_op_store_cr(CRM(ctx->opcode));
# Line 3312  int gen_intermediate_code_internal (CPUS Line 3321  int gen_intermediate_code_internal (CPUS
3321               ctx.exception != EXCP_TRAP)) {               ctx.exception != EXCP_TRAP)) {
3322              RET_EXCP(ctxp, EXCP_TRACE, 0);              RET_EXCP(ctxp, EXCP_TRACE, 0);
3323          }          }
3324            if (ctx.exception != EXCP_NONE)
3325                break;
3326          /* if we reach a page boundary, stop generation */          /* if we reach a page boundary, stop generation */
3327          if ((ctx.nip & (TARGET_PAGE_SIZE - 1)) == 0) {          if ((ctx.nip & (TARGET_PAGE_SIZE - 1)) == 0) {
3328              RET_EXCP(ctxp, EXCP_BRANCH, 0);              gen_op_b((long)ctx.tb, ctx.nip);
3329      }              ctx.exception = EXCP_BRANCH;
3330                break;
3331            }
3332      }      }
3333      if (ctx.exception == EXCP_NONE) {      if (ctx.exception == EXCP_NONE) {
3334          gen_op_b((unsigned long)ctx.tb, ctx.nip);          gen_op_b((unsigned long)ctx.tb, ctx.nip);

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26