Revision bbaf29c7 target-cris/helper.c

b/target-cris/helper.c
32 32

  
33 33
void do_interrupt (CPUState *env)
34 34
{
35
  env->exception_index = -1;
35
	env->exception_index = -1;
36
	env->pregs[PR_ERP] = env->pc;
36 37
}
37 38

  
38 39
int cpu_cris_handle_mmu_fault(CPUState * env, target_ulong address, int rw,
39 40
                             int mmu_idx, int is_softmmu)
40 41
{
41
    env->exception_index = 0xaa;
42
    env->debug1 = address;
43
    cpu_dump_state(env, stderr, fprintf, 0);
44
    printf("%s addr=%x env->pc=%x\n", __func__, address, env->pc);
45
    return 1;
42
	env->exception_index = 0xaa;
43
	env->debug1 = address;
44
	cpu_dump_state(env, stderr, fprintf, 0);
45
	env->pregs[PR_ERP] = env->pc;
46
	return 1;
46 47
}
47 48

  
48 49
target_phys_addr_t cpu_get_phys_page_debug(CPUState * env, target_ulong addr)
49 50
{
50
    return addr;
51
	return addr;
51 52
}
52 53

  
53 54
#else /* !CONFIG_USER_ONLY */
......
61 62

  
62 63
	address &= TARGET_PAGE_MASK;
63 64
	prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
64
//	printf ("%s pc=%x %x w=%d smmu=%d\n", __func__, env->pc, address, rw, is_softmmu);
65 65
	miss = cris_mmu_translate(&res, env, address, rw, mmu_idx);
66 66
	if (miss)
67 67
	{
......
73 73
	{
74 74
		phy = res.phy;
75 75
	}
76
//	printf ("a=%x phy=%x\n", address, phy);
77 76
	return tlb_set_page(env, address, phy, prot, mmu_idx, is_softmmu);
78 77
}
79 78

  
......
113 112

  
114 113
			break;
115 114
		case EXCP_MMU_MISS:
116
//			printf ("MMU miss\n");
117 115
			irqnum = 4;
118 116
			ebp = env->pregs[PR_EBP];
119 117
			isr = ldl_code(ebp + irqnum * 4);

Also available in: Unified diff