From: Richard Henderson <richard.henderson@linaro.org>
To: Roman Kiryanov <rkir@google.com>, qemu-devel@nongnu.org
Cc: jansene@google.com
Subject: Re: [PATCH] Make TARGET_PAGE_MASK typed as target_ulong
Date: Sat, 15 Jun 2024 16:59:13 -0700 [thread overview]
Message-ID: <e486aaee-9c2d-4bfa-adaa-d36b6ca64435@linaro.org> (raw)
In-Reply-To: <20240614192938.1690188-1-rkir@google.com>
On 6/14/24 12:29, Roman Kiryanov wrote:
> this fixes the build warnings like
>
> accel/tcg/cputlb.c:416:13: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
> mask &= TARGET_PAGE_MASK | TLB_INVALID_MASK;
> ^~~~~~~~~~~~~~~~
> include/exec/cpu-all.h:169:45: note: expanded from macro 'TARGET_PAGE_MASK'
> ~~~~~~~~~~~~~~~ ^
>
> also this fixes the inconsitency in the return
> type of qemu_target_page_mask (int could be
> shorter than target_long).
>
> Signed-off-by: Roman Kiryanov <rkir@google.com>
No, this will cause failures, because we need this value to sign-extend to when the
context includes {u}int64_t, and target_ulong is uint32_t.
What options are you using, because this warning should not be generated with -fwrapv.
r~
next prev parent reply other threads:[~2024-06-15 23:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-14 19:29 [PATCH] Make TARGET_PAGE_MASK typed as target_ulong Roman Kiryanov
2024-06-15 23:59 ` Richard Henderson [this message]
2024-06-16 17:40 ` Roman Kiryanov
2024-06-16 18:10 ` Richard Henderson
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=e486aaee-9c2d-4bfa-adaa-d36b6ca64435@linaro.org \
--to=richard.henderson@linaro.org \
--cc=jansene@google.com \
--cc=qemu-devel@nongnu.org \
--cc=rkir@google.com \
/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).