On Tue, 20 Jul 2021 at 16:06, Peter Maydell <peter.mayd...@linaro.org> wrote:
>
> On Tue, 20 Jul 2021 at 10:06, Peter Maydell <peter.mayd...@linaro.org> wrote:
> >
> > On Mon, 19 Jul 2021 at 23:20, Kenneth Adam Miller
> > <kennethadammil...@gmail.com> wrote:
> > >
> > > Hello,
> > >
> > > I get the following error:
> > >
> > > <long cmd here> -c ../accel/tcg/cputlb.c
> > > ../qemu/accel/tcg/cputlb.c: In function 'tlb_flush_page_by_mmuidx':
> > > ../qemu/accel/tcg/cputlb.c:602:23: error: comparison is always true due 
> > > to limited range of data type [-Werror=type-limits]
> > >     } else if (idxmap < TARGET_PAGE_SIZE) {
> > >
> > > I don't know why that suddenly shows up.

> You'll get this warning, incidentally, if you have a
> target which sets TARGET_PAGE_BITS to 16 or more.
> Currently the only target which does that is hexagon, and
> that is linux-user only, so it doesn't run into this (yet).
>
> The warning is harmless (apart from preventing compilation with
> -Werror), but there's no in-theory reason why softmmu shouldn't
> work with 64K pages, so we should figure out a way to rephrase
> the cputlb.c code to suppress it.

Assuming you do have something with TARGET_PAGE_BITS 16, if
you rewrite the conditions to
 "if ((uint32_t)idxmap < TARGET_PAGE_SIZE)" does that make
the compiler happier ?

-- PMM

Reply via email to