mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
target/openrisc: Represent MACHI:MACLO as a single unit
Significantly simplifies the implementation of the use of MAC. Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
24fc5c0feb
commit
6f7332ba71
4 changed files with 80 additions and 61 deletions
|
@ -120,6 +120,12 @@ void HELPER(mtspr)(CPUOpenRISCState *env,
|
|||
case TO_SPR(2, 1280) ... TO_SPR(2, 1407): /* ITLBW3MR 0-127 */
|
||||
case TO_SPR(2, 1408) ... TO_SPR(2, 1535): /* ITLBW3TR 0-127 */
|
||||
break;
|
||||
case TO_SPR(5, 1): /* MACLO */
|
||||
env->mac = deposit64(env->mac, 0, 32, rb);
|
||||
break;
|
||||
case TO_SPR(5, 2): /* MACHI */
|
||||
env->mac = deposit64(env->mac, 32, 32, rb);
|
||||
break;
|
||||
case TO_SPR(9, 0): /* PICMR */
|
||||
env->picmr |= rb;
|
||||
break;
|
||||
|
@ -245,6 +251,13 @@ target_ulong HELPER(mfspr)(CPUOpenRISCState *env,
|
|||
case TO_SPR(2, 1408) ... TO_SPR(2, 1535): /* ITLBW3TR 0-127 */
|
||||
break;
|
||||
|
||||
case TO_SPR(5, 1): /* MACLO */
|
||||
return (uint32_t)env->mac;
|
||||
break;
|
||||
case TO_SPR(5, 2): /* MACHI */
|
||||
return env->mac >> 32;
|
||||
break;
|
||||
|
||||
case TO_SPR(9, 0): /* PICMR */
|
||||
return env->picmr;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue