qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error in accel/tcg?


From: Kenneth Adam Miller
Subject: Re: Error in accel/tcg?
Date: Tue, 20 Jul 2021 11:13:00 -0400

See of course I thought about editing code outside of my target too, but thought against it. And doing it that way may make the compiler happier, but then would it be inviting a runtime error?

On Tue, Jul 20, 2021 at 11:08 AM Peter Maydell <peter.maydell@linaro.org> wrote:
On Tue, 20 Jul 2021 at 16:06, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Tue, 20 Jul 2021 at 10:06, Peter Maydell <peter.maydell@linaro.org> wrote:
> >
> > On Mon, 19 Jul 2021 at 23:20, Kenneth Adam Miller
> > <kennethadammiller@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

[Prev in Thread] Current Thread [Next in Thread]