summaryrefslogtreecommitdiff
path: root/target-ppc/op.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-04-12 20:39:29 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-04-12 20:39:29 +0000
commita541f297a37e64673aac52abc858e0904e316b48 (patch)
treef0de0d033bf3ed8b6e29a507b1e5c4fc540e575f /target-ppc/op.c
parentdf475d18d890572b8456ebff327bb9debee6289a (diff)
downloadqemu-a541f297a37e64673aac52abc858e0904e316b48.tar.gz
PowerPC system emulation fixes (Jocelyn Mayer)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@722 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/op.c')
-rw-r--r--target-ppc/op.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/target-ppc/op.c b/target-ppc/op.c
index e47e245af4..12c92891cd 100644
--- a/target-ppc/op.c
+++ b/target-ppc/op.c
@@ -18,11 +18,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+//#define DEBUG_OP
+
#include "config.h"
#include "exec.h"
-//#define DEBUG_OP
-
#define regs (env)
#define Ts0 (int32_t)T0
#define Ts1 (int32_t)T1
@@ -226,6 +226,17 @@ PPC_OP(process_exceptions)
}
}
+PPC_OP(debug)
+{
+ env->nip = PARAM(1);
+ env->brkstate = 1;
+#if defined (DEBUG_OP)
+ dump_state();
+#endif
+ do_queue_exception(EXCP_DEBUG);
+ RETURN();
+}
+
/* Segment registers load and store with immediate index */
PPC_OP(load_srin)
{
@@ -1443,10 +1454,9 @@ PPC_OP(fneg)
}
/* Load and store */
-#if defined(CONFIG_USER_ONLY)
#define MEMSUFFIX _raw
#include "op_mem.h"
-#else
+#if !defined(CONFIG_USER_ONLY)
#define MEMSUFFIX _user
#include "op_mem.h"
@@ -1460,8 +1470,11 @@ PPC_OP(rfi)
T0 = regs->spr[SRR1] & ~0xFFFF0000;
do_store_msr();
do_tlbia();
+#if defined (DEBUG_OP)
dump_rfi();
+#endif
regs->nip = regs->spr[SRR0] & ~0x00000003;
+ do_queue_exception(EXCP_RFI);
if (env->exceptions != 0) {
do_check_exception_state();
}