Patchwork target-sh4: fix index of address read error exception

login
register
mail settings
Submitter Alexandre Courbot
Date Jan. 25, 2011, 4:51 a.m.
Message ID <1295931077-29499-1-git-send-email-gnurou@gmail.com>
Download mbox | patch
Permalink /patch/80312/
State New
Headers show

Comments

Alexandre Courbot - Jan. 25, 2011, 4:51 a.m.
Exception index of address read error should be 0x0e0.
---
 target-sh4/helper.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Aurelien Jarno - Jan. 25, 2011, 8:03 a.m.
On Tue, Jan 25, 2011 at 01:51:16PM +0900, Alexandre Courbot wrote:
> Exception index of address read error should be 0x0e0.
> ---
>  target-sh4/helper.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/target-sh4/helper.c b/target-sh4/helper.c
> index 45449ea..2d76f22 100644
> --- a/target-sh4/helper.c
> +++ b/target-sh4/helper.c
> @@ -479,7 +479,7 @@ int cpu_sh4_handle_mmu_fault(CPUState * env, target_ulong address, int rw,
>  	    break;
>  	case MMU_IADDR_ERROR:
>  	case MMU_DADDR_ERROR_READ:
> -	    env->exception_index = 0x0c0;
> +	    env->exception_index = 0x0e0;
>  	    break;
>  	case MMU_DADDR_ERROR_WRITE:
>  	    env->exception_index = 0x100;

Thanks, applied.

Patch

diff --git a/target-sh4/helper.c b/target-sh4/helper.c
index 45449ea..2d76f22 100644
--- a/target-sh4/helper.c
+++ b/target-sh4/helper.c
@@ -479,7 +479,7 @@  int cpu_sh4_handle_mmu_fault(CPUState * env, target_ulong address, int rw,
 	    break;
 	case MMU_IADDR_ERROR:
 	case MMU_DADDR_ERROR_READ:
-	    env->exception_index = 0x0c0;
+	    env->exception_index = 0x0e0;
 	    break;
 	case MMU_DADDR_ERROR_WRITE:
 	    env->exception_index = 0x100;