aboutsummaryrefslogtreecommitdiff
path: root/target-ppc/translate.c
diff options
context:
space:
mode:
authorj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-11-02 22:47:50 +0000
committerj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-11-02 22:47:50 +0000
commit9fceefa7d12c832c4da69737ce216c415309a7c3 (patch)
tree1d1a1bab7e73577bb5aa0c91cdf695e4c2fb80b1 /target-ppc/translate.c
parent5b52b9911f5fecd936fa982a99c37750544e87f8 (diff)
Don't print any message when a priviledge exception occurs on mfpvr
as the Linux allows applications to read this register. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3510 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/translate.c')
-rw-r--r--target-ppc/translate.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index 015a6215a3..3b1c9919aa 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -3550,11 +3550,17 @@ static always_inline void gen_op_mfspr (DisasContext *ctx)
gen_op_store_T0_gpr(rD(ctx->opcode));
} else {
/* Privilege exception */
- if (loglevel != 0) {
- fprintf(logfile, "Trying to read privileged spr %d %03x\n",
- sprn, sprn);
+ /* This is a hack to avoid warnings when running Linux:
+ * this OS breaks the PowerPC virtualisation model,
+ * allowing userland application to read the PVR
+ */
+ if (sprn != SPR_PVR) {
+ if (loglevel != 0) {
+ fprintf(logfile, "Trying to read privileged spr %d %03x\n",
+ sprn, sprn);
+ }
+ printf("Trying to read privileged spr %d %03x\n", sprn, sprn);
}
- printf("Trying to read privileged spr %d %03x\n", sprn, sprn);
GEN_EXCP_PRIVREG(ctx);
}
} else {