aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-01-04 23:28:12 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-01-04 23:28:12 +0000
commitaf5ad10728f8265846f64274edd69c01e6da77e5 (patch)
tree5faa0e6ee15407d22c65fca1771b6b3558fe938e /translate-all.c
parentsuppressed explicit access type and use the exception routine to infer it fro... (diff)
downloadqemu-kvm-af5ad10728f8265846f64274edd69c01e6da77e5.tar.gz
qemu-kvm-af5ad10728f8265846f64274edd69c01e6da77e5.tar.bz2
qemu-kvm-af5ad10728f8265846f64274edd69c01e6da77e5.zip
infer access type
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@530 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'translate-all.c')
-rw-r--r--translate-all.c38
1 files changed, 36 insertions, 2 deletions
diff --git a/translate-all.c b/translate-all.c
index b02c87a22..c8f345735 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -25,7 +25,7 @@
#include "config.h"
-#define IN_OP_I386
+#define NO_CPU_IO_DEFS
#include "cpu.h"
#include "exec-all.h"
#include "disas.h"
@@ -192,7 +192,41 @@ int cpu_restore_state(TranslationBlock *tb,
#elif defined(TARGET_SPARC)
env->pc = gen_opc_pc[j];
#elif defined(TARGET_PPC)
- env->nip = gen_opc_pc[j];
+ {
+ int type;
+ /* for PPC, we need to look at the micro operation to get the
+ access type */
+ env->nip = gen_opc_pc[j];
+ switch(c) {
+#if defined(CONFIG_USER_ONLY)
+#define CASE3(op)\
+ case INDEX_op_ ## op ## _raw
+#else
+#define CASE3(op)\
+ case INDEX_op_ ## op ## _raw:\
+ case INDEX_op_ ## op ## _user:\
+ case INDEX_op_ ## op ## _kernel
+#endif
+
+ CASE3(stfd):
+ CASE3(stfs):
+ CASE3(lfd):
+ CASE3(lfs):
+ type = ACCESS_FLOAT;
+ break;
+ CASE3(stwcx):
+ type = ACCESS_RES;
+ break;
+ CASE3(eciwx):
+ CASE3(ecowx):
+ type = ACCESS_EXT;
+ break;
+ default:
+ type = ACCESS_INT;
+ break;
+ }
+ env->access_type = type;
+ }
#endif
return 0;
}