diff options
author | Igor Mammedov <imammedo@redhat.com> | 2017-08-24 18:31:26 +0200 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2017-09-01 11:54:24 -0300 |
commit | 576e1c4c239621482474ba7b495a41bab2d16ae5 (patch) | |
tree | b6c7f91c7c06642b697c42dc8914855b69f97afb /target/sparc/win_helper.c | |
parent | 12a6c15ef31c98ecefa63e91ac36955383038384 (diff) |
sparc: embed sparc_def_t into CPUSPARCState
Make CPUSPARCState::def embedded so it would be allocated as part
of cpu instance and we won't have to worry about cleaning def pointer
up mannualy on cpu destruction.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <1503592308-93913-4-git-send-email-imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'target/sparc/win_helper.c')
-rw-r--r-- | target/sparc/win_helper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target/sparc/win_helper.c b/target/sparc/win_helper.c index 154279ecda..8290a21142 100644 --- a/target/sparc/win_helper.c +++ b/target/sparc/win_helper.c @@ -295,7 +295,7 @@ void helper_wrcwp(CPUSPARCState *env, target_ulong new_cwp) static inline uint64_t *get_gregset(CPUSPARCState *env, uint32_t pstate) { - if (env->def->features & CPU_FEATURE_GL) { + if (env->def.features & CPU_FEATURE_GL) { return env->glregs + (env->gl & 7) * 8; } @@ -343,7 +343,7 @@ void cpu_change_pstate(CPUSPARCState *env, uint32_t new_pstate) uint32_t pstate_regs, new_pstate_regs; uint64_t *src, *dst; - if (env->def->features & CPU_FEATURE_GL) { + if (env->def.features & CPU_FEATURE_GL) { /* PS_AG, IG and MG are not implemented in this case */ new_pstate &= ~(PS_AG | PS_IG | PS_MG); env->pstate = new_pstate; |