| 997 | |
| 998 | template <uint page> |
| 999 | __fi bool rcntWrite32(u32 mem, mem32_t& value) |
| 1000 | { |
| 1001 | pxAssume(mem >= RCNT0_COUNT && mem < 0x10002000); |
| 1002 | |
| 1003 | // [TODO] : counters should actually just use the EE's hw register space for storing |
| 1004 | // count, mode, target, and hold. This will allow for a simplified handler for register |
| 1005 | // reads. |
| 1006 | |
| 1007 | switch( mem ) |
| 1008 | { |
| 1009 | case(RCNT0_COUNT): return rcntWcount(0, value), false; |
| 1010 | case(RCNT0_MODE): return rcntWmode(0, value), false; |
| 1011 | case(RCNT0_TARGET): return rcntWtarget(0, value), false; |
| 1012 | case(RCNT0_HOLD): return rcntWhold(0, value), false; |
| 1013 | |
| 1014 | case(RCNT1_COUNT): return rcntWcount(1, value), false; |
| 1015 | case(RCNT1_MODE): return rcntWmode(1, value), false; |
| 1016 | case(RCNT1_TARGET): return rcntWtarget(1, value), false; |
| 1017 | case(RCNT1_HOLD): return rcntWhold(1, value), false; |
| 1018 | |
| 1019 | case(RCNT2_COUNT): return rcntWcount(2, value), false; |
| 1020 | case(RCNT2_MODE): return rcntWmode(2, value), false; |
| 1021 | case(RCNT2_TARGET): return rcntWtarget(2, value), false; |
| 1022 | |
| 1023 | case(RCNT3_COUNT): return rcntWcount(3, value), false; |
| 1024 | case(RCNT3_MODE): return rcntWmode(3, value), false; |
| 1025 | case(RCNT3_TARGET): return rcntWtarget(3, value), false; |
| 1026 | } |
| 1027 | |
| 1028 | // unhandled .. do memory writeback. |
| 1029 | return true; |
| 1030 | } |
| 1031 | |
| 1032 | template u16 rcntRead32<0x00>(u32 mem); |
| 1033 | template u16 rcntRead32<0x01>(u32 mem); |
nothing calls this directly
no test coverage detected