Revision 9004627f target-cris/helper.c

b/target-cris/helper.c
82 82
{
83 83
	uint32_t ccs;
84 84
	/* Apply the ccs shift.  */
85
	ccs = env->pregs[SR_CCS];
85
	ccs = env->pregs[PR_CCS];
86 86
	ccs = (ccs & 0xc0000000) | ((ccs << 12) >> 2);
87
//	printf ("ccs=%x %x\n", env->pregs[SR_CCS], ccs);
88
	env->pregs[SR_CCS] = ccs;
87
	env->pregs[PR_CCS] = ccs;
89 88
}
90 89

  
91 90
void do_interrupt(CPUState *env)
......
104 103
	switch (env->exception_index)
105 104
	{
106 105
		case EXCP_BREAK:
107
//			printf ("BREAK! %d\n", env->trapnr);
108 106
			irqnum = env->trapnr;
109
			ebp = env->pregs[SR_EBP];
107
			ebp = env->pregs[PR_EBP];
110 108
			isr = ldl_code(ebp + irqnum * 4);
111
			env->pregs[SR_ERP] = env->pc + 2;
109
			env->pregs[PR_ERP] = env->pc + 2;
112 110
			env->pc = isr;
113 111

  
114 112
			cris_shift_ccs(env);
......
117 115
		case EXCP_MMU_MISS:
118 116
//			printf ("MMU miss\n");
119 117
			irqnum = 4;
120
			ebp = env->pregs[SR_EBP];
118
			ebp = env->pregs[PR_EBP];
121 119
			isr = ldl_code(ebp + irqnum * 4);
122
			env->pregs[SR_ERP] = env->pc;
120
			env->pregs[PR_ERP] = env->pc;
123 121
			env->pc = isr;
124 122
			cris_shift_ccs(env);
125 123
			break;
......
131 129
			if (env->interrupt_request & CPU_INTERRUPT_HARD) {
132 130
				if (!env->pending_interrupts)
133 131
					return;
134
				if (!(env->pregs[SR_CCS] & I_FLAG)) {
132
				if (!(env->pregs[PR_CCS] & I_FLAG)) {
135 133
					return;
136 134
				}
137 135

  
138 136
				irqnum = 31 - clz32(env->pending_interrupts);
139 137
				irqnum += 0x30;
140
				ebp = env->pregs[SR_EBP];
138
				ebp = env->pregs[PR_EBP];
141 139
				isr = ldl_code(ebp + irqnum * 4);
142
				env->pregs[SR_ERP] = env->pc;
140
				env->pregs[PR_ERP] = env->pc;
143 141
				env->pc = isr;
144 142

  
145 143
				cris_shift_ccs(env);
......
161 159

  
162 160
target_phys_addr_t cpu_get_phys_page_debug(CPUState * env, target_ulong addr)
163 161
{
164
//	printf ("%s\n", __func__);
165 162
	uint32_t phy = addr;
166 163
	struct cris_mmu_result_t res;
167 164
	int miss;

Also available in: Unified diff