ppc: Don't update NIP in lmw/stmw/icbi
Instead, pass GETPC() result to the corresponding helpers. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
		
							parent
							
								
									e41029b378
								
							
						
					
					
						commit
						af6d376ea1
					
				| @ -57,9 +57,9 @@ void helper_lmw(CPUPPCState *env, target_ulong addr, uint32_t reg) | ||||
| { | ||||
|     for (; reg < 32; reg++) { | ||||
|         if (needs_byteswap(env)) { | ||||
|             env->gpr[reg] = bswap32(cpu_ldl_data(env, addr)); | ||||
|             env->gpr[reg] = bswap32(cpu_ldl_data_ra(env, addr, GETPC())); | ||||
|         } else { | ||||
|             env->gpr[reg] = cpu_ldl_data(env, addr); | ||||
|             env->gpr[reg] = cpu_ldl_data_ra(env, addr, GETPC()); | ||||
|         } | ||||
|         addr = addr_add(env, addr, 4); | ||||
|     } | ||||
| @ -69,9 +69,10 @@ void helper_stmw(CPUPPCState *env, target_ulong addr, uint32_t reg) | ||||
| { | ||||
|     for (; reg < 32; reg++) { | ||||
|         if (needs_byteswap(env)) { | ||||
|             cpu_stl_data(env, addr, bswap32((uint32_t)env->gpr[reg])); | ||||
|             cpu_stl_data_ra(env, addr, bswap32((uint32_t)env->gpr[reg]), | ||||
|                                                    GETPC()); | ||||
|         } else { | ||||
|             cpu_stl_data(env, addr, (uint32_t)env->gpr[reg]); | ||||
|             cpu_stl_data_ra(env, addr, (uint32_t)env->gpr[reg], GETPC()); | ||||
|         } | ||||
|         addr = addr_add(env, addr, 4); | ||||
|     } | ||||
| @ -178,7 +179,7 @@ void helper_icbi(CPUPPCState *env, target_ulong addr) | ||||
|      * (not a fetch) by the MMU. To be sure it will be so, | ||||
|      * do the load "by hand". | ||||
|      */ | ||||
|     cpu_ldl_data(env, addr); | ||||
|     cpu_ldl_data_ra(env, addr, GETPC()); | ||||
| } | ||||
| 
 | ||||
| /* XXX: to be tested */ | ||||
|  | ||||
| @ -2869,8 +2869,6 @@ static void gen_lmw(DisasContext *ctx) | ||||
|     TCGv t0; | ||||
|     TCGv_i32 t1; | ||||
|     gen_set_access_type(ctx, ACCESS_INT); | ||||
|     /* NIP cannot be restored if the memory exception comes from an helper */ | ||||
|     gen_update_nip(ctx, ctx->nip - 4); | ||||
|     t0 = tcg_temp_new(); | ||||
|     t1 = tcg_const_i32(rD(ctx->opcode)); | ||||
|     gen_addr_imm_index(ctx, t0, 0); | ||||
| @ -2885,8 +2883,6 @@ static void gen_stmw(DisasContext *ctx) | ||||
|     TCGv t0; | ||||
|     TCGv_i32 t1; | ||||
|     gen_set_access_type(ctx, ACCESS_INT); | ||||
|     /* NIP cannot be restored if the memory exception comes from an helper */ | ||||
|     gen_update_nip(ctx, ctx->nip - 4); | ||||
|     t0 = tcg_temp_new(); | ||||
|     t1 = tcg_const_i32(rS(ctx->opcode)); | ||||
|     gen_addr_imm_index(ctx, t0, 0); | ||||
| @ -4109,8 +4105,6 @@ static void gen_icbi(DisasContext *ctx) | ||||
| { | ||||
|     TCGv t0; | ||||
|     gen_set_access_type(ctx, ACCESS_CACHE); | ||||
|     /* NIP cannot be restored if the memory exception comes from an helper */ | ||||
|     gen_update_nip(ctx, ctx->nip - 4); | ||||
|     t0 = tcg_temp_new(); | ||||
|     gen_addr_reg_index(ctx, t0); | ||||
|     gen_helper_icbi(cpu_env, t0); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Benjamin Herrenschmidt
						Benjamin Herrenschmidt