Commit 4e7a4a4e84998ec1e57d6e2b466db1bee462002e
1 parent
62c5609a
Mark watchpoint features as unimplemented.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2643 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
9 additions
and
3 deletions
target-mips/op.c
@@ -1444,13 +1444,16 @@ void op_mtc0_config2 (void) | @@ -1444,13 +1444,16 @@ void op_mtc0_config2 (void) | ||
1444 | 1444 | ||
1445 | void op_mtc0_watchlo0 (void) | 1445 | void op_mtc0_watchlo0 (void) |
1446 | { | 1446 | { |
1447 | - env->CP0_WatchLo = (int32_t)T0; | 1447 | + /* Watch exceptions for instructions, data loads, data stores |
1448 | + not implemented. */ | ||
1449 | + env->CP0_WatchLo = (int32_t)(T0 & ~0x7); | ||
1448 | RETURN(); | 1450 | RETURN(); |
1449 | } | 1451 | } |
1450 | 1452 | ||
1451 | void op_mtc0_watchhi0 (void) | 1453 | void op_mtc0_watchhi0 (void) |
1452 | { | 1454 | { |
1453 | - env->CP0_WatchHi = T0 & 0x40FF0FF8; | 1455 | + env->CP0_WatchHi = (T0 & 0x40FF0FF8); |
1456 | + env->CP0_WatchHi &= ~(env->CP0_WatchHi & T0 & 0x7); | ||
1454 | RETURN(); | 1457 | RETURN(); |
1455 | } | 1458 | } |
1456 | 1459 | ||
@@ -1620,7 +1623,9 @@ void op_dmtc0_epc (void) | @@ -1620,7 +1623,9 @@ void op_dmtc0_epc (void) | ||
1620 | 1623 | ||
1621 | void op_dmtc0_watchlo0 (void) | 1624 | void op_dmtc0_watchlo0 (void) |
1622 | { | 1625 | { |
1623 | - env->CP0_WatchLo = T0; | 1626 | + /* Watch exceptions for instructions, data loads, data stores |
1627 | + not implemented. */ | ||
1628 | + env->CP0_WatchLo = T0 & ~0x7; | ||
1624 | RETURN(); | 1629 | RETURN(); |
1625 | } | 1630 | } |
1626 | 1631 |
target-mips/translate.c
@@ -5406,6 +5406,7 @@ void cpu_reset (CPUMIPSState *env) | @@ -5406,6 +5406,7 @@ void cpu_reset (CPUMIPSState *env) | ||
5406 | env->CP0_EBase = 0x80000000; | 5406 | env->CP0_EBase = 0x80000000; |
5407 | env->CP0_Status = (1 << CP0St_BEV) | (1 << CP0St_ERL); | 5407 | env->CP0_Status = (1 << CP0St_BEV) | (1 << CP0St_ERL); |
5408 | env->CP0_WatchLo = 0; | 5408 | env->CP0_WatchLo = 0; |
5409 | + env->CP0_WatchHi = 0; | ||
5409 | /* Count register increments in debug mode, EJTAG version 1 */ | 5410 | /* Count register increments in debug mode, EJTAG version 1 */ |
5410 | env->CP0_Debug = (1 << CP0DB_CNT) | (0x1 << CP0DB_VER); | 5411 | env->CP0_Debug = (1 << CP0DB_CNT) | (0x1 << CP0DB_VER); |
5411 | #endif | 5412 | #endif |