On 12 February 2016 at 15:16, Edgar E. Iglesias <edgar.igles...@gmail.com> wrote: > On Fri, Feb 12, 2016 at 03:15:22PM +0000, Peter Maydell wrote: >> On 12 February 2016 at 15:12, Edgar E. Iglesias >> <edgar.igles...@gmail.com> wrote: >> > On Thu, Feb 11, 2016 at 07:11:48PM +0000, Peter Maydell wrote: >> >> The user-mode versions of get/set_r13_banked() exist just to assert >> >> if they're ever called -- the translate time code should never >> >> emit calls to them because SRS from user mode always UNDEF. >> >> There's no code in the softmmu versions that can't compile in >> >> CONFIG_USER_ONLY, so combine the two functions rather than >> >> having completely split versions under ifdefs. >> >> >> >> Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> >> > >> > Hi Peter, >> > >> > Do we really need the assert? >> > If we keep it, can't we have it for both -user and -softmmu (avoiding the >> > ifdef)? >> >> I would be happy to entirely drop the assert, yes. > > OK, thanks.
It turns out that the compiler was being clever and dropping all the code after the g_assert_not_reached(), which meant I didn't notice that bank_number() is only compiled in in the softmmu build. We should just move bank_number() into being a static inline in internals.h, I think -- it's pretty trivial. Will send that patch... thanks -- PMM