From: Florian Krohm Date: Wed, 28 May 2025 21:07:44 +0000 (+0000) Subject: s390x: Remove a fixs390. Add an explanation. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c164b5714172e7678ab258545c2bc0127f21a318;p=thirdparty%2Fvalgrind.git s390x: Remove a fixs390. Add an explanation. --- diff --git a/VEX/priv/host_s390_defs.h b/VEX/priv/host_s390_defs.h index dcdb6713e..48fbac764 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;