From: Florian K. <fk...@so...> - 2025-05-28 21:09:30
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=c164b5714172e7678ab258545c2bc0127f21a318 commit c164b5714172e7678ab258545c2bc0127f21a318 Author: Florian Krohm <fl...@ei...> Date: Wed May 28 21:07:44 2025 +0000 s390x: Remove a fixs390. Add an explanation. Diff: --- VEX/priv/host_s390_defs.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/VEX/priv/host_s390_defs.h b/VEX/priv/host_s390_defs.h index dcdb6713e9..48fbac7644 100644 --- a/VEX/priv/host_s390_defs.h +++ b/VEX/priv/host_s390_defs.h @@ -706,8 +706,18 @@ typedef struct { s390_amode *guest_IA; } xassisted; struct { - /* fixs390: I don't think these are really needed - as the gsp and the offset are fixed no ? */ + /* Note: these fields are needed. Here's why: + These fields are amodes for accessing the host_EvC_COUNTER and + host_EvC_FAILADDR fields in the guest state. + When guest and host architecture are both s390x then we know that + the displacement in evcheck::counter is + offsetof(VexGuestS390XState, host_EvC_COUNTER) and likewise for + the displacement in evcheck::fail_addr. There would be no point + to build these amodes in the first place because we could just + hardwire the displacements in s390_insn_evcheck_emit. + However in a multi-arch setting the amodes point to the + host_EvC_COUNTER/FAILADDR fields in a *different* guest state and + those offsets are not known. So we do need to build the amodes. */ s390_amode *counter; /* dispatch counter */ s390_amode *fail_addr; } evcheck; |