aboutsummaryrefslogtreecommitdiff
path: root/target-sparc/op_helper.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-05-27 19:36:00 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-05-27 19:36:00 +0000
commit1b2e93c175a947653326efce9a6f36791d458691 (patch)
tree0a64de498eae9e09102ed8ec3ed812de5ea18064 /target-sparc/op_helper.c
parentb3a2319792ad5c0f0f8c3d2f4d02b95fd7efbc69 (diff)
Separate fault for code access to unassigned memory
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2876 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sparc/op_helper.c')
-rw-r--r--target-sparc/op_helper.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c
index b2f982f4ee..dc1c04deb5 100644
--- a/target-sparc/op_helper.c
+++ b/target-sparc/op_helper.c
@@ -1111,7 +1111,10 @@ void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec,
printf("Unassigned mem access to " TARGET_FMT_plx " from " TARGET_FMT_lx
"\n", addr, env->pc);
#endif
- raise_exception(TT_DATA_ACCESS);
+ if (is_exec)
+ raise_exception(TT_CODE_ACCESS);
+ else
+ raise_exception(TT_DATA_ACCESS);
}
env = saved_env;
}
@@ -1130,7 +1133,10 @@ void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec,
addr, env->pc);
env = saved_env;
#endif
- raise_exception(TT_DATA_ACCESS);
+ if (is_exec)
+ raise_exception(TT_CODE_ACCESS);
+ else
+ raise_exception(TT_DATA_ACCESS);
}
#endif