mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
target/s390x: Implement EXECUTE via new TranslationBlock
Previously, helper_ex would construct the insn and then implement the insn via direct calls other helpers. This was sufficient to boot Linux but that is all. It is easy enough to go the whole nine yards by stashing state for EXECUTE within the cpu, and then rely on a new TB to be created that properly and completely interprets the insn. Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
06fc03486c
commit
303c681a8f
5 changed files with 85 additions and 141 deletions
|
@ -34,6 +34,7 @@ static int cpu_post_load(void *opaque, int version_id)
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void cpu_pre_save(void *opaque)
|
||||
{
|
||||
S390CPU *cpu = opaque;
|
||||
|
@ -156,6 +157,23 @@ const VMStateDescription vmstate_riccb = {
|
|||
}
|
||||
};
|
||||
|
||||
static bool exval_needed(void *opaque)
|
||||
{
|
||||
S390CPU *cpu = opaque;
|
||||
return cpu->env.ex_value != 0;
|
||||
}
|
||||
|
||||
const VMStateDescription vmstate_exval = {
|
||||
.name = "cpu/exval",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = exval_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_UINT64(env.ex_value, S390CPU),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
};
|
||||
|
||||
const VMStateDescription vmstate_s390_cpu = {
|
||||
.name = "cpu",
|
||||
.post_load = cpu_post_load,
|
||||
|
@ -188,6 +206,7 @@ const VMStateDescription vmstate_s390_cpu = {
|
|||
&vmstate_fpu,
|
||||
&vmstate_vregs,
|
||||
&vmstate_riccb,
|
||||
&vmstate_exval,
|
||||
NULL
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue