From: Richard Henderson <rth@twiddle.net>
To: "Emilio G. Cota" <cota@braap.org>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 18/45] target/m68k: check CF_PARALLEL instead of parallel_cpus
Date: Mon, 17 Jul 2017 13:52:34 -1000 [thread overview]
Message-ID: <032f07a7-e498-982b-ad12-0327bd5d604d@twiddle.net> (raw)
In-Reply-To: <1500235468-15341-19-git-send-email-cota@braap.org>
On 07/16/2017 10:04 AM, Emilio G. Cota wrote:
> Thereby decoupling the resulting translated code from the current state
> of the system.
>
> Signed-off-by: Emilio G. Cota <cota@braap.org>
> ---
> target/m68k/helper.h | 2 ++
> target/m68k/op_helper.c | 32 ++++++++++++++++++++++++++++----
> target/m68k/translate.c | 12 ++++++++++--
> 3 files changed, 40 insertions(+), 6 deletions(-)
>
> diff --git a/target/m68k/helper.h b/target/m68k/helper.h
> index 475a1f2..137ef48 100644
> --- a/target/m68k/helper.h
> +++ b/target/m68k/helper.h
> @@ -10,7 +10,9 @@ DEF_HELPER_4(divsll, void, env, int, int, s32)
> DEF_HELPER_2(set_sr, void, env, i32)
> DEF_HELPER_3(movec, void, env, i32, i32)
> DEF_HELPER_4(cas2w, void, env, i32, i32, i32)
> +DEF_HELPER_4(cas2w_parallel, void, env, i32, i32, i32)
> DEF_HELPER_4(cas2l, void, env, i32, i32, i32)
> +DEF_HELPER_4(cas2l_parallel, void, env, i32, i32, i32)
>
> #define dh_alias_fp ptr
> #define dh_ctype_fp FPReg *
> diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c
> index 7b5126c..061d468 100644
> --- a/target/m68k/op_helper.c
> +++ b/target/m68k/op_helper.c
> @@ -361,7 +361,8 @@ void HELPER(divsll)(CPUM68KState *env, int numr, int regr, int32_t den)
> env->dregs[numr] = quot;
> }
>
> -void HELPER(cas2w)(CPUM68KState *env, uint32_t regs, uint32_t a1, uint32_t a2)
> +static void do_cas2w(CPUM68KState *env, uint32_t regs, uint32_t a1, uint32_t a2,
> + bool parallel)
> {
> uint32_t Dc1 = extract32(regs, 9, 3);
> uint32_t Dc2 = extract32(regs, 6, 3);
> @@ -374,7 +375,7 @@ void HELPER(cas2w)(CPUM68KState *env, uint32_t regs, uint32_t a1, uint32_t a2)
> int16_t l1, l2;
> uintptr_t ra = GETPC();
>
> - if (parallel_cpus) {
> + if (parallel) {
> /* Tell the main loop we need to serialize this insn. */
> cpu_loop_exit_atomic(ENV_GET_CPU(env), ra);
> } else {
> @@ -399,7 +400,19 @@ void HELPER(cas2w)(CPUM68KState *env, uint32_t regs, uint32_t a1, uint32_t a2)
> env->dregs[Dc2] = deposit32(env->dregs[Dc2], 0, 16, l2);
> }
>
> -void HELPER(cas2l)(CPUM68KState *env, uint32_t regs, uint32_t a1, uint32_t a2)
> +void HELPER(cas2w)(CPUM68KState *env, uint32_t regs, uint32_t a1, uint32_t a2)
> +{
> + do_cas2w(env, regs, a1, a2, false);
> +}
> +
> +void HELPER(cas2w_parallel)(CPUM68KState *env, uint32_t regs, uint32_t a1,
> + uint32_t a2)
> +{
> + do_cas2w(env, regs, a1, a2, true);
Well, cas2w_parallel is now exactly equivalent to gen_helper_exit_atomic.
I probably should have done that parallel check in the translator to begin.
r~
next prev parent reply other threads:[~2017-07-17 23:52 UTC|newest]
Thread overview: 93+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-16 20:03 [Qemu-devel] [PATCH v2 00/45] tcg: support for multiple TCG contexts Emilio G. Cota
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 01/45] vl: fix breakage of -tb-size Emilio G. Cota
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 02/45] translate-all: remove redundant !tcg_enabled check in dump_exec_info Emilio G. Cota
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 03/45] cputlb: bring back tlb_flush_count under !TLB_DEBUG Emilio G. Cota
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 04/45] tcg: fix corruption of code_time profiling counter upon tb_flush Emilio G. Cota
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 05/45] exec-all: fix typos in TranslationBlock's documentation Emilio G. Cota
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 06/45] translate-all: make have_tb_lock static Emilio G. Cota
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 07/45] cpu-exec: rename have_tb_lock to acquired_tb_lock in tb_find Emilio G. Cota
2017-07-17 22:39 ` Richard Henderson
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 08/45] tcg/i386: constify tcg_target_callee_save_regs Emilio G. Cota
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 09/45] tcg/mips: " Emilio G. Cota
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 10/45] translate-all: guarantee that tb_hash only holds valid TBs Emilio G. Cota
2017-07-17 22:55 ` Richard Henderson
2017-07-18 0:27 ` Emilio G. Cota
2017-07-18 3:40 ` Richard Henderson
2017-07-18 4:54 ` Emilio G. Cota
2017-07-18 5:29 ` Richard Henderson
2017-07-18 23:30 ` Emilio G. Cota
2017-07-18 23:43 ` Richard Henderson
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 11/45] exec-all: bring tb->invalid into tb->cflags Emilio G. Cota
2017-07-17 23:07 ` Richard Henderson
2017-07-18 0:28 ` Emilio G. Cota
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 12/45] tcg: remove addr argument from lookup_tb_ptr Emilio G. Cota
2017-07-17 23:25 ` Richard Henderson
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 13/45] tcg: consolidate TB lookups in tb_lookup__cpu_state Emilio G. Cota
2017-07-17 23:41 ` Richard Henderson
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 14/45] tcg: define CF_PARALLEL and use it for TB hashing Emilio G. Cota
2017-07-17 23:46 ` Richard Henderson
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 15/45] target/arm: check CF_PARALLEL instead of parallel_cpus Emilio G. Cota
2017-07-17 23:46 ` Richard Henderson
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 16/45] target/hppa: " Emilio G. Cota
2017-07-17 23:47 ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 17/45] target/i386: " Emilio G. Cota
2017-07-17 23:47 ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 18/45] target/m68k: " Emilio G. Cota
2017-07-17 23:52 ` Richard Henderson [this message]
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 19/45] target/s390x: " Emilio G. Cota
2017-07-17 23:53 ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 20/45] target/sparc: " Emilio G. Cota
2017-07-17 23:54 ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 21/45] tcg: " Emilio G. Cota
2017-07-17 23:55 ` Richard Henderson
2017-07-18 0:34 ` Emilio G. Cota
2017-07-18 3:42 ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 22/45] cpu-exec: lookup/generate TB outside exclusive region during step_atomic Emilio G. Cota
2017-07-18 0:01 ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 23/45] translate-all: define and use DEBUG_TB_FLUSH_GATE Emilio G. Cota
2017-07-18 0:01 ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 24/45] exec-all: introduce TB_PAGE_ADDR_FMT Emilio G. Cota
2017-07-18 0:02 ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 25/45] translate-all: define and use DEBUG_TB_INVALIDATE_GATE Emilio G. Cota
2017-07-18 0:02 ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 26/45] translate-all: define and use DEBUG_TB_CHECK_GATE Emilio G. Cota
2017-07-18 0:03 ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 27/45] exec-all: extract tb->tc_* into a separate struct tc_tb Emilio G. Cota
2017-07-18 0:04 ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 28/45] translate-all: use a binary search tree to track TBs in TBContext Emilio G. Cota
2017-07-18 0:05 ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 29/45] exec-all: rename tb_free to tb_remove Emilio G. Cota
2017-07-18 0:05 ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 30/45] translate-all: report correct avg host TB size Emilio G. Cota
2017-07-18 0:06 ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 31/45] tci: move tci_regs to tcg_qemu_tb_exec's stack Emilio G. Cota
2017-07-18 0:08 ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 32/45] tcg: take tb_ctx out of TCGContext Emilio G. Cota
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 33/45] tcg: take .helpers " Emilio G. Cota
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 34/45] tcg: define tcg_init_ctx and make tcg_ctx a pointer Emilio G. Cota
2017-07-18 0:09 ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 35/45] gen-icount: fold exitreq_label into TCGContext Emilio G. Cota
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 36/45] tcg: dynamically allocate optimizer globals + fold " Emilio G. Cota
2017-07-18 3:53 ` Richard Henderson
2017-07-18 4:33 ` Emilio G. Cota
2017-07-18 4:38 ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 37/45] tcg: introduce **tcg_ctxs to keep track of all TCGContext's Emilio G. Cota
2017-07-18 4:17 ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 38/45] tcg: distribute profiling counters across TCGContext's Emilio G. Cota
2017-07-18 4:20 ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 39/45] osdep: move qemu_real_host_page_size/mask to osdep Emilio G. Cota
2017-07-18 4:22 ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 40/45] osdep: introduce qemu_mprotect_rwx/none Emilio G. Cota
2017-07-18 4:26 ` Richard Henderson
2017-07-18 4:57 ` Emilio G. Cota
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 41/45] translate-all: use qemu_protect_rwx/none helpers Emilio G. Cota
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 42/45] tcg: define TCG_HIGHWATER Emilio G. Cota
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 43/45] tcg: introduce regions to split code_gen_buffer Emilio G. Cota
2017-07-18 5:09 ` Richard Henderson
2017-07-18 17:44 ` Emilio G. Cota
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 44/45] translate-all: do not allocate a guard page for code_gen_buffer Emilio G. Cota
2017-07-18 4:35 ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 45/45] tcg: enable multiple TCG contexts in softmmu Emilio G. Cota
2017-07-18 5:25 ` Richard Henderson
2017-07-18 17:52 ` Emilio G. Cota
2017-07-18 18:26 ` 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=032f07a7-e498-982b-ad12-0327bd5d604d@twiddle.net \
--to=rth@twiddle.net \
--cc=cota@braap.org \
--cc=qemu-devel@nongnu.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.