projects
/
qemu
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
removed stdout reference (not portable)
[qemu]
/
target-ppc
/
op.c
diff --git
a/target-ppc/op.c
b/target-ppc/op.c
index
de7e247
..
f439a81
100644
(file)
--- a/
target-ppc/op.c
+++ b/
target-ppc/op.c
@@
-208,32
+208,28
@@
PPC_OP(set_T2)
}
/* Generate exceptions */
}
/* Generate exceptions */
-PPC_OP(queue_exception_err)
+PPC_OP(raise_exception_err)
{
{
- do_queue_exception_err(PARAM(1), PARAM(2));
+ do_raise_exception_err(PARAM(1), PARAM(2));
}
}
-PPC_OP(queue_exception)
+PPC_OP(raise_exception)
{
{
- do_queue_exception(PARAM(1));
+ do_raise_exception(PARAM(1));
}
}
-PPC_OP(process_exceptions)
+PPC_OP(update_nip)
{
env->nip = PARAM(1);
{
env->nip = PARAM(1);
- if (env->exceptions != 0) {
- do_check_exception_state();
- }
}
PPC_OP(debug)
{
env->nip = PARAM(1);
}
PPC_OP(debug)
{
env->nip = PARAM(1);
- env->brkstate = 1;
#if defined (DEBUG_OP)
dump_state();
#endif
#if defined (DEBUG_OP)
dump_state();
#endif
- do_queue_exception(EXCP_DEBUG);
+ do_raise_exception(EXCP_DEBUG);
RETURN();
}
RETURN();
}
@@
-246,10
+242,7
@@
PPC_OP(load_srin)
PPC_OP(store_srin)
{
PPC_OP(store_srin)
{
-#if defined (DEBUG_OP)
- dump_store_sr(T1 >> 28);
-#endif
- regs->sr[T1 >> 28] = T0;
+ do_store_sr(T1 >> 28);
RETURN();
}
RETURN();
}
@@
-364,58
+357,38
@@
PPC_OP(store_ctr)
RETURN();
}
RETURN();
}
-/* Update time base */
-PPC_OP(update_tb)
+PPC_OP(load_tbl)
{
{
- T0 = regs->tb[0];
- T1 = T0;
- T0 += PARAM(1);
-#if defined (DEBUG_OP)
- dump_update_tb(PARAM(1));
-#endif
- if (T0 < T1) {
- T1 = regs->tb[1] + 1;
- regs->tb[1] = T1;
- }
- regs->tb[0] = T0;
+ T0 = cpu_ppc_load_tbl(regs);
RETURN();
}
RETURN();
}
-PPC_OP(load_tb)
+PPC_OP(load_tbu)
{
{
- T0 = regs->tb[PARAM(1)];
+ T0 = cpu_ppc_load_tbu(regs);
RETURN();
}
RETURN();
}
-PPC_OP(store_tb)
+PPC_OP(store_tbl)
{
{
- regs->tb[PARAM(1)] = T0;
-#if defined (DEBUG_OP)
- dump_store_tb(PARAM(1));
-#endif
+ cpu_ppc_store_tbl(regs, T0);
RETURN();
}
RETURN();
}
-/* Update decrementer */
-PPC_OP(update_decr)
+PPC_OP(store_tbu)
{
{
- T0 = regs->decr;
- T1 = T0;
- T0 -= PARAM(1);
- regs->decr = T0;
- if (PARAM(1) > T1) {
- do_queue_exception(EXCP_DECR);
- }
+ cpu_ppc_store_tbu(regs, T0);
RETURN();
}
RETURN();
}
-PPC_OP(store_decr)
+PPC_OP(load_decr)
{
{
- T1 = regs->decr;
- regs->decr = T0;
- if (Ts0 < 0 && Ts1 > 0) {
- do_queue_exception(EXCP_DECR);
+ T0 = cpu_ppc_load_decr(regs);
}
}
+
+PPC_OP(store_decr)
+{
+ cpu_ppc_store_decr(regs, T0);
RETURN();
}
RETURN();
}
@@
-426,10
+399,7
@@
PPC_OP(load_ibat)
PPC_OP(store_ibat)
{
PPC_OP(store_ibat)
{
-#if defined (DEBUG_OP)
- dump_store_ibat(PARAM(1), PARAM(2));
-#endif
- regs->IBAT[PARAM(1)][PARAM(2)] = T0;
+ do_store_ibat(PARAM(1), PARAM(2));
}
PPC_OP(load_dbat)
}
PPC_OP(load_dbat)
@@
-439,10
+409,7
@@
PPC_OP(load_dbat)
PPC_OP(store_dbat)
{
PPC_OP(store_dbat)
{
-#if defined (DEBUG_OP)
- dump_store_dbat(PARAM(1), PARAM(2));
-#endif
- regs->DBAT[PARAM(1)][PARAM(2)] = T0;
+ do_store_dbat(PARAM(1), PARAM(2));
}
/* FPSCR */
}
/* FPSCR */
@@
-1368,9
+1335,7
@@
PPC_OP(fmsubs)
/* fnmadd - fnmadd. - fnmadds - fnmadds. */
PPC_OP(fnmadd)
{
/* fnmadd - fnmadd. - fnmadds - fnmadds. */
PPC_OP(fnmadd)
{
- FT0 *= FT1;
- FT0 += FT2;
- FT0 = -FT0;
+ do_fnmadd();
RETURN();
}
RETURN();
}
@@
-1384,9
+1349,7
@@
PPC_OP(fnmadds)
/* fnmsub - fnmsub. */
PPC_OP(fnmsub)
{
/* fnmsub - fnmsub. */
PPC_OP(fnmsub)
{
- FT0 *= FT1;
- FT0 -= FT2;
- FT0 = -FT0;
+ do_fnmsub();
RETURN();
}
RETURN();
}
@@
-1468,20
+1431,28
@@
PPC_OP(fneg)
#include "op_mem.h"
#endif
#include "op_mem.h"
#endif
+/* Special op to check and maybe clear reservation */
+PPC_OP(check_reservation)
+{
+ do_check_reservation();
+ RETURN();
+}
+
/* Return from interrupt */
PPC_OP(rfi)
{
/* Return from interrupt */
PPC_OP(rfi)
{
+ regs->nip = regs->spr[SRR0] & ~0x00000003;
+#if 1 // TRY
+ T0 = regs->spr[SRR1] & ~0xFFF00000;
+#else
T0 = regs->spr[SRR1] & ~0xFFFF0000;
T0 = regs->spr[SRR1] & ~0xFFFF0000;
+#endif
do_store_msr();
do_store_msr();
- do_tlbia();
#if defined (DEBUG_OP)
dump_rfi();
#endif
#if defined (DEBUG_OP)
dump_rfi();
#endif
- regs->nip = regs->spr[SRR0] & ~0x00000003;
- do_queue_exception(EXCP_RFI);
- if (env->exceptions != 0) {
- do_check_exception_state();
- }
+ // do_tlbia();
+ do_raise_exception(EXCP_RFI);
RETURN();
}
RETURN();
}
@@
-1493,7
+1464,7
@@
PPC_OP(tw)
(Ts0 == Ts1 && (PARAM(1) & 0x04)) ||
(T0 < T1 && (PARAM(1) & 0x02)) ||
(T0 > T1 && (PARAM(1) & 0x01)))
(Ts0 == Ts1 && (PARAM(1) & 0x04)) ||
(T0 < T1 && (PARAM(1) & 0x02)) ||
(T0 > T1 && (PARAM(1) & 0x01)))
- do_queue_exception_err(EXCP_PROGRAM, EXCP_TRAP);
+ do_raise_exception_err(EXCP_PROGRAM, EXCP_TRAP);
RETURN();
}
RETURN();
}
@@
-1504,7
+1475,7
@@
PPC_OP(twi)
(Ts0 == SPARAM(1) && (PARAM(2) & 0x04)) ||
(T0 < (uint32_t)SPARAM(1) && (PARAM(2) & 0x02)) ||
(T0 > (uint32_t)SPARAM(1) && (PARAM(2) & 0x01)))
(Ts0 == SPARAM(1) && (PARAM(2) & 0x04)) ||
(T0 < (uint32_t)SPARAM(1) && (PARAM(2) & 0x02)) ||
(T0 > (uint32_t)SPARAM(1) && (PARAM(2) & 0x01)))
- do_queue_exception_err(EXCP_PROGRAM, EXCP_TRAP);
+ do_raise_exception_err(EXCP_PROGRAM, EXCP_TRAP);
RETURN();
}
RETURN();
}