From: "Alex Bennée" <alex.bennee@linaro.org>
To: Shu-Chun Weng <scw@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <richard.henderson@linaro.org>,
qemu-devel@nongnu.org
Subject: Re: [PATCH] Makes softmmu compile with clang at HEAD
Date: Mon, 30 Mar 2020 22:55:16 +0100 [thread overview]
Message-ID: <87r1x9fqyj.fsf@linaro.org> (raw)
In-Reply-To: <20200318062057.224953-1-scw@google.com>
Shu-Chun Weng <scw@google.com> writes:
> With clang at HEAD, linking fails with "undefined symbol:
> qemu_build_not_reached". It's because `store_helper` and
> `helper_ret_stb_mmu` are mutually recursive and clang inlined latter
> inside the former, making `store_helper` a recursive function and no
> longer fully inlineable preventing constant propogation.
>
> Signed-off-by: Shu-Chun Weng <scw@google.com>
> ---
> accel/tcg/cputlb.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
> index e3b5750c3b..a7c812ed72 100644
> --- a/accel/tcg/cputlb.c
> +++ b/accel/tcg/cputlb.c
> @@ -2050,6 +2050,7 @@ store_helper(CPUArchState *env, target_ulong addr, uint64_t val,
> store_memop(haddr, val, op);
> }
>
> +__attribute__((noinline))
> void helper_ret_stb_mmu(CPUArchState *env, target_ulong addr, uint8_t val,
> TCGMemOpIdx oi, uintptr_t retaddr)
Hmm I wonder if the correct fix is for store_helper to callL
store_memop(addr + i, val8, MO_UB);
direct in the fallback case - although the page crossing may be tricky
to get right. Perhaps we should out of line all the unaligned stuff?
--
Alex Bennée
prev parent reply other threads:[~2020-03-30 21:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-18 6:20 [PATCH] Makes softmmu compile with clang at HEAD Shu-Chun Weng
2020-03-30 20:58 ` Shu-Chun Weng
2020-03-30 21:55 ` Alex Bennée [this message]
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=87r1x9fqyj.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=scw@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).