Added SR to M68K reg_read and reg_write (#1507)

This commit is contained in:
Brandon Miller 2021-12-02 01:12:49 -05:00 committed by GitHub
parent c190069b10
commit d204dc6374
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,10 +57,11 @@ static void reg_read(CPUM68KState *env, unsigned int regid, void *value)
case UC_M68K_REG_PC:
*(int32_t *)value = env->pc;
break;
case UC_M68K_REG_SR:
*(int32_t *)value = env->sr;
break;
}
}
return;
}
static void reg_write(CPUM68KState *env, unsigned int regid, const void *value)
@ -76,6 +77,9 @@ static void reg_write(CPUM68KState *env, unsigned int regid, const void *value)
case UC_M68K_REG_PC:
env->pc = *(uint32_t *)value;
break;
case UC_M68K_REG_SR:
env->sr = *(uint32_t *)value;
break;
}
}
}