Revision a496775f target-ppc/op_helper.c
b/target-ppc/op_helper.c | ||
---|---|---|
68 | 68 |
do_raise_exception_err(exception, 0); |
69 | 69 |
} |
70 | 70 |
|
71 |
void cpu_dump_EA (target_ulong EA); |
|
72 |
void do_print_mem_EA (target_ulong EA) |
|
73 |
{ |
|
74 |
cpu_dump_EA(EA); |
|
75 |
} |
|
76 |
|
|
71 | 77 |
/*****************************************************************************/ |
72 | 78 |
/* Registers load and stores */ |
73 | 79 |
void do_load_cr (void) |
... | ... | |
181 | 187 |
set_float_rounding_mode(rnd_type, &env->fp_status); |
182 | 188 |
} |
183 | 189 |
|
190 |
target_ulong ppc_load_dump_spr (int sprn) |
|
191 |
{ |
|
192 |
if (loglevel) { |
|
193 |
fprintf(logfile, "Read SPR %d %03x => " ADDRX "\n", |
|
194 |
sprn, sprn, env->spr[sprn]); |
|
195 |
} |
|
196 |
|
|
197 |
return env->spr[sprn]; |
|
198 |
} |
|
199 |
|
|
200 |
void ppc_store_dump_spr (int sprn, target_ulong val) |
|
201 |
{ |
|
202 |
if (loglevel) { |
|
203 |
fprintf(logfile, "Write SPR %d %03x => " ADDRX " <= " ADDRX "\n", |
|
204 |
sprn, sprn, env->spr[sprn], val); |
|
205 |
} |
|
206 |
env->spr[sprn] = val; |
|
207 |
} |
|
208 |
|
|
184 | 209 |
/*****************************************************************************/ |
185 | 210 |
/* Fixed point operations helpers */ |
186 | 211 |
#if defined(TARGET_PPC64) |
... | ... | |
1250 | 1275 |
target_ulong val; |
1251 | 1276 |
|
1252 | 1277 |
if (unlikely(env->dcr_env == NULL)) { |
1253 |
printf("No DCR environment\n"); |
|
1278 |
if (loglevel) { |
|
1279 |
fprintf(logfile, "No DCR environment\n"); |
|
1280 |
} |
|
1254 | 1281 |
do_raise_exception_err(EXCP_PROGRAM, EXCP_INVAL | EXCP_INVAL_INVAL); |
1255 | 1282 |
} else if (unlikely(ppc_dcr_read(env->dcr_env, T0, &val) != 0)) { |
1256 |
printf("DCR read error\n"); |
|
1283 |
if (loglevel) { |
|
1284 |
fprintf(logfile, "DCR read error %d %03x\n", (int)T0, (int)T0); |
|
1285 |
} |
|
1257 | 1286 |
do_raise_exception_err(EXCP_PROGRAM, EXCP_INVAL | EXCP_PRIV_REG); |
1258 | 1287 |
} else { |
1259 | 1288 |
T0 = val; |
... | ... | |
1263 | 1292 |
void do_store_dcr (void) |
1264 | 1293 |
{ |
1265 | 1294 |
if (unlikely(env->dcr_env == NULL)) { |
1266 |
printf("No DCR environment\n"); |
|
1295 |
if (loglevel) { |
|
1296 |
fprintf(logfile, "No DCR environment\n"); |
|
1297 |
} |
|
1267 | 1298 |
do_raise_exception_err(EXCP_PROGRAM, EXCP_INVAL | EXCP_INVAL_INVAL); |
1268 | 1299 |
} else if (unlikely(ppc_dcr_write(env->dcr_env, T0, T1) != 0)) { |
1269 |
printf("DCR write error\n"); |
|
1300 |
if (loglevel) { |
|
1301 |
fprintf(logfile, "DCR write error %d %03x\n", (int)T0, (int)T0); |
|
1302 |
} |
|
1270 | 1303 |
do_raise_exception_err(EXCP_PROGRAM, EXCP_INVAL | EXCP_PRIV_REG); |
1271 | 1304 |
} |
1272 | 1305 |
} |
Also available in: Unified diff