qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kenneth Adam Miller <kennethadammiller@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Richard Henderson <richard.henderson@linaro.org>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: Error in accel/tcg?
Date: Tue, 20 Jul 2021 11:13:00 -0400	[thread overview]
Message-ID: <CAK7rcp-qm1v-fuNvH8-978SHV=sXOK8DhzMUfmWSEwGQ+utJ4A@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA-sq2GfHkpVc8BF-n=KEVwwrtzsbhM9w+_O=GmN+gg5WQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1672 bytes --]

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
>

[-- Attachment #2: Type: text/html, Size: 2464 bytes --]

  reply	other threads:[~2021-07-20 15:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-19 22:18 Error in accel/tcg? Kenneth Adam Miller
2021-07-20  9:06 ` Peter Maydell
2021-07-20 15:06   ` Peter Maydell
2021-07-20 15:07     ` Peter Maydell
2021-07-20 15:13       ` Kenneth Adam Miller [this message]
2021-07-20 15:21         ` Peter Maydell
2021-07-20 15:06   ` Kenneth Adam Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK7rcp-qm1v-fuNvH8-978SHV=sXOK8DhzMUfmWSEwGQ+utJ4A@mail.gmail.com' \
    --to=kennethadammiller@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).