aboutsummaryrefslogtreecommitdiff
path: root/target-ppc/op_helper.c
diff options
context:
space:
mode:
authorj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-24 07:36:03 +0000
committerj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-24 07:36:03 +0000
commit6b80055dfa4625cad6c0377e0c82ab7fc162c7dd (patch)
tree42200a3857494d4c7450a2dee33d390ed376ca25 /target-ppc/op_helper.c
parentd4082e95f18fdcbe4f1a80534086d4a28f651d38 (diff)
Debug traces fixes.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2721 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/op_helper.c')
-rw-r--r--target-ppc/op_helper.c39
1 files changed, 20 insertions, 19 deletions
diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c
index 10390a9c1b..ee46253c79 100644
--- a/target-ppc/op_helper.c
+++ b/target-ppc/op_helper.c
@@ -189,7 +189,7 @@ void do_store_fpscr (uint32_t mask)
target_ulong ppc_load_dump_spr (int sprn)
{
- if (loglevel) {
+ if (loglevel != 0) {
fprintf(logfile, "Read SPR %d %03x => " ADDRX "\n",
sprn, sprn, env->spr[sprn]);
}
@@ -199,7 +199,7 @@ target_ulong ppc_load_dump_spr (int sprn)
void ppc_store_dump_spr (int sprn, target_ulong val)
{
- if (loglevel) {
+ if (loglevel != 0) {
fprintf(logfile, "Write SPR %d %03x => " ADDRX " <= " ADDRX "\n",
sprn, sprn, env->spr[sprn], val);
}
@@ -904,6 +904,7 @@ void do_fcmpo (void)
}
#if !defined (CONFIG_USER_ONLY)
+void cpu_dump_rfi (target_ulong RA, target_ulong msr);
void do_rfi (void)
{
#if defined(TARGET_PPC64)
@@ -919,7 +920,7 @@ void do_rfi (void)
do_store_msr(env, (uint32_t)(env->spr[SPR_SRR1] & ~0xFFFF0000UL));
#endif
#if defined (DEBUG_OP)
- dump_rfi();
+ cpu_dump_rfi(env->nip, do_load_msr(env));
#endif
env->interrupt_request |= CPU_INTERRUPT_EXITTB;
}
@@ -935,7 +936,7 @@ void do_rfid (void)
do_store_msr(env, (uint32_t)(env->spr[SPR_SRR1] & ~0xFFFF0000UL));
}
#if defined (DEBUG_OP)
- dump_rfi();
+ cpu_dump_rfi(env->nip, do_load_msr(env));
#endif
env->interrupt_request |= CPU_INTERRUPT_EXITTB;
}
@@ -1136,7 +1137,7 @@ void do_POWER_rfsvc (void)
T0 = env->ctr & 0x0000FFFFUL;
do_store_msr(env, T0);
#if defined (DEBUG_OP)
- dump_rfi();
+ cpu_dump_rfi(env->nip, do_load_msr(env));
#endif
env->interrupt_request |= CPU_INTERRUPT_EXITTB;
}
@@ -1214,7 +1215,7 @@ void do_40x_rfci (void)
env->nip = env->spr[SPR_40x_SRR2];
do_store_msr(env, env->spr[SPR_40x_SRR3] & ~0xFFFF0000);
#if defined (DEBUG_OP)
- dump_rfi();
+ cpu_dump_rfi(env->nip, do_load_msr(env));
#endif
env->interrupt_request = CPU_INTERRUPT_EXITTB;
}
@@ -1231,7 +1232,7 @@ void do_rfci (void)
}
do_store_msr(env, (uint32_t)env->spr[SPR_BOOKE_CSRR1] & ~0x3FFF0000);
#if defined (DEBUG_OP)
- dump_rfi();
+ cpu_dump_rfi(env->nip, do_load_msr(env));
#endif
env->interrupt_request = CPU_INTERRUPT_EXITTB;
}
@@ -1248,7 +1249,7 @@ void do_rfdi (void)
}
do_store_msr(env, (uint32_t)env->spr[SPR_BOOKE_DSRR1] & ~0x3FFF0000);
#if defined (DEBUG_OP)
- dump_rfi();
+ cpu_dump_rfi(env->nip, do_load_msr(env));
#endif
env->interrupt_request = CPU_INTERRUPT_EXITTB;
}
@@ -1265,7 +1266,7 @@ void do_rfmci (void)
}
do_store_msr(env, (uint32_t)env->spr[SPR_BOOKE_MCSRR1] & ~0x3FFF0000);
#if defined (DEBUG_OP)
- dump_rfi();
+ cpu_dump_rfi(env->nip, do_load_msr(env));
#endif
env->interrupt_request = CPU_INTERRUPT_EXITTB;
}
@@ -1275,12 +1276,12 @@ void do_load_dcr (void)
target_ulong val;
if (unlikely(env->dcr_env == NULL)) {
- if (loglevel) {
+ if (loglevel != 0) {
fprintf(logfile, "No DCR environment\n");
}
do_raise_exception_err(EXCP_PROGRAM, EXCP_INVAL | EXCP_INVAL_INVAL);
} else if (unlikely(ppc_dcr_read(env->dcr_env, T0, &val) != 0)) {
- if (loglevel) {
+ if (loglevel != 0) {
fprintf(logfile, "DCR read error %d %03x\n", (int)T0, (int)T0);
}
do_raise_exception_err(EXCP_PROGRAM, EXCP_INVAL | EXCP_PRIV_REG);
@@ -1292,12 +1293,12 @@ void do_load_dcr (void)
void do_store_dcr (void)
{
if (unlikely(env->dcr_env == NULL)) {
- if (loglevel) {
+ if (loglevel != 0) {
fprintf(logfile, "No DCR environment\n");
}
do_raise_exception_err(EXCP_PROGRAM, EXCP_INVAL | EXCP_INVAL_INVAL);
} else if (unlikely(ppc_dcr_write(env->dcr_env, T0, T1) != 0)) {
- if (loglevel) {
+ if (loglevel != 0) {
fprintf(logfile, "DCR write error %d %03x\n", (int)T0, (int)T0);
}
do_raise_exception_err(EXCP_PROGRAM, EXCP_INVAL | EXCP_PRIV_REG);
@@ -2515,7 +2516,7 @@ void do_4xx_tlbwe_hi (void)
target_ulong page, end;
#if defined (DEBUG_SOFTWARE_TLB)
- if (loglevel) {
+ if (loglevel != 0) {
fprintf(logfile, "%s T0 " REGX " T1 " REGX "\n", __func__, T0, T1);
}
#endif
@@ -2525,7 +2526,7 @@ void do_4xx_tlbwe_hi (void)
if (tlb->prot & PAGE_VALID) {
end = tlb->EPN + tlb->size;
#if defined (DEBUG_SOFTWARE_TLB)
- if (loglevel) {
+ if (loglevel != 0) {
fprintf(logfile, "%s: invalidate old TLB %d start " ADDRX
" end " ADDRX "\n", __func__, (int)T0, tlb->EPN, end);
}
@@ -2568,7 +2569,7 @@ void do_4xx_tlbwe_hi (void)
if (tlb->prot & PAGE_VALID) {
end = tlb->EPN + tlb->size;
#if defined (DEBUG_SOFTWARE_TLB)
- if (loglevel) {
+ if (loglevel != 0) {
fprintf(logfile, "%s: invalidate TLB %d start " ADDRX
" end " ADDRX "\n", __func__, (int)T0, tlb->EPN, end);
}
@@ -2583,7 +2584,7 @@ void do_4xx_tlbwe_lo (void)
ppcemb_tlb_t *tlb;
#if defined (DEBUG_SOFTWARE_TLB)
- if (loglevel) {
+ if (loglevel != 0) {
fprintf(logfile, "%s T0 " REGX " T1 " REGX "\n", __func__, T0, T1);
}
#endif
@@ -2596,8 +2597,8 @@ void do_4xx_tlbwe_lo (void)
if (T1 & 0x100)
tlb->prot |= PAGE_WRITE;
#if defined (DEBUG_SOFTWARE_TLB)
- if (loglevel) {
- fprintf(logfile, "%s: set up TLB %d RPN " ADDRX " EPN " ADDRX
+ if (loglevel != 0) {
+ fprintf(logfile, "%s: set up TLB %d RPN " PADDRX " EPN " ADDRX
" size " ADDRX " prot %c%c%c%c PID %d\n", __func__,
(int)T0, tlb->RPN, tlb->EPN, tlb->size,
tlb->prot & PAGE_READ ? 'r' : '-',