mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
target/s390x: fake instruction loading when handling 'ex'
The s390x EXecute instruction is a bit weird as we synthesis the executed instruction from what we have stored in memory. This missed the plugin instrumentation. Work around this with a special helper to inform the rest of the translator about the instruction so things stay consistent. Reviewed-by: David Hildenbrand <david@redhat.com> Acked-by: Ilya Leoshkevich <iii@linux.ibm.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Cc: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20221027183637.2772968-26-alex.bennee@linaro.org>
This commit is contained in:
@@ -211,6 +211,23 @@ translator_ldq_swap(CPUArchState *env, DisasContextBase *db,
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* translator_fake_ldb - fake instruction load
|
||||
* @insn8: byte of instruction
|
||||
* @pc: program counter of instruction
|
||||
*
|
||||
* This is a special case helper used where the instruction we are
|
||||
* about to translate comes from somewhere else (e.g. being
|
||||
* re-synthesised for s390x "ex"). It ensures we update other areas of
|
||||
* the translator with details of the executed instruction.
|
||||
*/
|
||||
|
||||
static inline void translator_fake_ldb(uint8_t insn8, abi_ptr pc)
|
||||
{
|
||||
plugin_insn_append(pc, &insn8, sizeof(insn8));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Return whether addr is on the same page as where disassembly started.
|
||||
* Translators can use this to enforce the rule that only single-insn
|
||||
|
||||
Reference in New Issue
Block a user