On Fri, 17 Apr 2020 at 15:19, Philippe Mathieu-Daudé <philmd@xxxxxxxxxx> wrote: > > On 4/17/20 3:54 PM, Peter Maydell wrote: > > Your suggested patch isn't quite the same as RTH's suggestion, > > because it puts the assert inside a stub probe_read() > > implementation rather than having the ifdef at the level > > of the writefn body. I have no opinion on whether one or > > the other of these is preferable. > > I'll let Richard modify the writefn() bodies if required, as he > understand what they do :) RTH is suggesting static void dccvap_writefn(CPUARMState *env, const ARMCPRegInfo *opaque, uint64_t value) { #ifdef CONFIG_TCG entire current body of function goes here #else g_assert_not_reached(); #endif } If we take that approach then the stub probe_read() would be pointless, so we should do one or the other, not both. > Btw since we have this rule: > > obj-$(call lnot,$(CONFIG_TCG)) += tcg-stub.o > > I'll use the following patch which is less intrusive: This is temptingly less ifdeffery, certainly -- PMM