target: e2k: Impl reading some regs through rrd.

%wd, %pcsp.lo, %pcsp.hi, %pcshtp, %cr1.hi, %cr1.lo.
This commit is contained in:
Denis Drakhnia 2020-12-03 21:24:54 +02:00
parent f6d13b7031
commit 83f9917a3c

View File

@ -47,6 +47,18 @@ static uint64_t* state_reg_ptr(CPUE2KState *env, int idx)
uint64_t helper_state_reg_read_i64(CPUE2KState *env, int idx)
{
switch (idx) {
case 0x01:
return e2k_state_wd(env); /* %wd */
case 0x0f:
return e2k_state_pcsp_lo(env); /* %pcsp.lo */
case 0x0d:
return e2k_state_pcsp_hi(env); /* %pcsp.hi */
case 0x13:
return env->pcshtp; /* %pcshtp */
case 0x55:
return e2k_state_cr1_hi(env); /* %cr1.hi */
case 0x57:
return e2k_state_cr1_lo(env); /* %cr1.lo */
case 0x81: /* %ip */
return env->ip;
case 0x90: /* %clkr */