> ltaylorsimp...@gmail.com wrote: > > > -----Original Message----- > > From: Matheus Tavares Bernardino <quic_mathb...@quicinc.com> > > Sent: Wednesday, July 5, 2023 12:35 PM > > To: qemu-devel@nongnu.org > > Cc: quic_mathb...@quicinc.com; bc...@quicinc.com; > > ltaylorsimp...@gmail.com; quic_mlie...@quicinc.com; > > richard.hender...@linaro.org > > Subject: [PATCH v2] Hexagon: move GETPC() calls to top level helpers > > > > diff --git a/target/hexagon/macros.h b/target/hexagon/macros.h index > > 5451b061ee..e44a932434 100644 > > --- a/target/hexagon/macros.h > > +++ b/target/hexagon/macros.h > > @@ -173,15 +173,6 @@ > > #define fLOAD(NUM, SIZE, SIGN, EA, DST) \ > > - DST = (size##SIZE##SIGN##_t)MEM_LOAD##SIZE##SIGN(EA) > > + DST = (size##SIZE##SIGN##_t)({ \ > > + check_noshuf(env, pkt_has_store_s1, slot, EA, SIZE, GETPC()); \ > > + MEM_LOAD##SIZE(env, EA, GETPC()); \ > > + }) > > #endif > > This should be formatted as > #define fLOAD(...) \ > do { \ > check_noshuf(...); \ > DST = ...; \ > } while (0)
Ah, indeed, thanks! > > a/target/hexagon/op_helper.h b/target/hexagon/op_helper.h index > > 8f3764d15e..7744e819ef 100644 > > --- a/target/hexagon/op_helper.h > > +++ b/target/hexagon/op_helper.h > > +void check_noshuf(CPUHexagonState *env, bool pkt_has_store_s1, > > + uint32_t slot, target_ulong vaddr, int size, > > +uintptr_t ra); > > Are you sure this needs to be non-static? Yeah, since we remove the mem_load*() functions, check_noshuf() must now be visible to the other compilation units that include macros.h, as we will expand the fLOAD() macro to call it.