From: "Alex Bennée" <alex.bennee@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org, peter.maydell@linaro.org
Subject: Re: [Qemu-devel] [PATCH 2/1] target/arm: Use helper_retaddr in stxp helpers
Date: Tue, 14 Nov 2017 16:09:26 +0000 [thread overview]
Message-ID: <87h8twall5.fsf@linaro.org> (raw)
In-Reply-To: <20171114125304.854-1-richard.henderson@linaro.org>
Richard Henderson <richard.henderson@linaro.org> writes:
> We use raw memory primitives along the !parallel_cpus paths in order to
> simplify the endianness handling. Because of that, we did not benefit
> from the generic changes to cpu_ldst_user_only_template.h.
>
> The simplest fix is to manipulate helper_retaddr here.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> target/arm/helper-a64.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/target/arm/helper-a64.c b/target/arm/helper-a64.c
> index d0e435ca4b..96a3ecf707 100644
> --- a/target/arm/helper-a64.c
> +++ b/target/arm/helper-a64.c
> @@ -456,6 +456,8 @@ static uint64_t do_paired_cmpxchg64_le(CPUARMState *env, uint64_t addr,
> #ifdef CONFIG_USER_ONLY
> /* ??? Enforce alignment. */
> uint64_t *haddr = g2h(addr);
> +
> + helper_retaddr = ra;
> o0 = ldq_le_p(haddr + 0);
> o1 = ldq_le_p(haddr + 1);
> oldv = int128_make128(o0, o1);
> @@ -465,6 +467,7 @@ static uint64_t do_paired_cmpxchg64_le(CPUARMState *env, uint64_t addr,
> stq_le_p(haddr + 0, int128_getlo(newv));
> stq_le_p(haddr + 1, int128_gethi(newv));
> }
> + helper_retaddr = 0;
> #else
> int mem_idx = cpu_mmu_index(env, false);
> TCGMemOpIdx oi0 = make_memop_idx(MO_LEQ | MO_ALIGN_16, mem_idx);
> @@ -523,6 +526,8 @@ static uint64_t do_paired_cmpxchg64_be(CPUARMState *env, uint64_t addr,
> #ifdef CONFIG_USER_ONLY
> /* ??? Enforce alignment. */
> uint64_t *haddr = g2h(addr);
> +
> + helper_retaddr = ra;
> o1 = ldq_be_p(haddr + 0);
> o0 = ldq_be_p(haddr + 1);
> oldv = int128_make128(o0, o1);
> @@ -532,6 +537,7 @@ static uint64_t do_paired_cmpxchg64_be(CPUARMState *env, uint64_t addr,
> stq_be_p(haddr + 0, int128_gethi(newv));
> stq_be_p(haddr + 1, int128_getlo(newv));
> }
> + helper_retaddr = 0;
> #else
> int mem_idx = cpu_mmu_index(env, false);
> TCGMemOpIdx oi0 = make_memop_idx(MO_BEQ | MO_ALIGN_16, mem_idx);
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée
next prev parent reply other threads:[~2017-11-14 16:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-14 9:42 [Qemu-devel] [PATCH] tcg: Record code_gen_buffer address for user-only memory helpers Richard Henderson
2017-11-14 12:01 ` Peter Maydell
2017-11-14 12:53 ` [Qemu-devel] [PATCH 2/1] target/arm: Use helper_retaddr in stxp helpers Richard Henderson
2017-11-14 13:13 ` Peter Maydell
2017-11-14 16:09 ` Alex Bennée [this message]
2017-11-14 13:41 ` [Qemu-devel] [PATCH 3/1] target/arm: Fix GETPC usage in do_paired_cmpxchg64_l/be Richard Henderson
2017-11-14 16:11 ` Alex Bennée
2017-11-14 16:09 ` [Qemu-devel] [PATCH] tcg: Record code_gen_buffer address for user-only memory helpers Alex Bennée
2017-11-15 9:39 ` 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=87h8twall5.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.