[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v11 12/15] target/hexagon: prepare frontend for parser
From: |
Taylor Simpson |
Subject: |
RE: [PATCH v11 12/15] target/hexagon: prepare frontend for parser |
Date: |
Mon, 8 Aug 2022 20:30:19 +0000 |
> -----Original Message-----
> From: Anton Johansson <anjo@rev.ng>
> Sent: Thursday, August 4, 2022 5:56 AM
> To: qemu-devel@nongnu.org
> Cc: ale@rev.ng; anjo@rev.ng; babush@rev.ng; nizzo@rev.ng; Taylor Simpson
> <tsimpson@quicinc.com>; Brian Cain <bcain@quicinc.com>; Michael Lambert
> <mlambert@quicinc.com>; richard.henderson@linaro.org;
> alex.bennee@linaro.org
> Subject: [PATCH v11 12/15] target/hexagon: prepare frontend for parser
>
> This patch adds the necessary changes to the Hexagon frontend, required by
> idef-parser to deal with a :mem_noshuf packet with a store in slot 1 and
> predicated load in slot 0.
>
> Signed-off-by: Anton Johansson <anjo@rev.ng>
> ---
> target/hexagon/cpu.h | 8 ++++++++
> target/hexagon/translate.c | 22 ++++++++++++++++++++++
> target/hexagon/translate.h | 2 ++
> 3 files changed, 32 insertions(+)
>
> -git a/target/hexagon/translate.c b/target/hexagon/translate.c index
> e3e250fd4f..72bf8d591b 100644
> 494,6 +498,22 @@ void process_store(DisasContext *ctx, Packet *pkt, int
> slot_num)
>
> static void process_store_log(DisasContext *ctx, Packet *pkt) {
> + /*
> + * Here we deal with the special case of a :mem_noshuf packet with a
> + * predicated load in slot 0 with a store in slot 1. If the predicated
> + * branch wasn't taken during packet execution, then store in slot 1
> + * will not have been executed, corresponding to hex_did_store_s1 being
> 0.
> + * If this is the case, process the store here.
> + */
> + if (ctx->insn_is_noshuf_pload) {
> + TCGLabel *l = gen_new_label();
> + /* Reset s1_store_processed so process_store actually emits a store
> */
> + ctx->s1_store_processed = false;
> + tcg_gen_brcondi_tl(TCG_COND_EQ, hex_did_s1_store, 1, l);
> + process_store(ctx, pkt, 1);
> + gen_set_label(l);
> + }
> +
Let's follow the convention in CHECK_NOSHUF_PRED where we branch around the
probe of the load when the predicate is false and always call process_store.
Then, the mem_noshuf store will always have been processed - so we don't need
the runtime state to tell us.
Thanks,
Taylor
- [PATCH v11 01/15] target/hexagon: update MAINTAINERS for idef-parser, (continued)
- [PATCH v11 01/15] target/hexagon: update MAINTAINERS for idef-parser, Anton Johansson, 2022/08/04
- [PATCH v11 02/15] target/hexagon: import README for idef-parser, Anton Johansson, 2022/08/04
- [PATCH v11 05/15] target/hexagon: introduce new helper functions, Anton Johansson, 2022/08/04
- [PATCH v11 03/15] target/hexagon: make slot number an unsigned, Anton Johansson, 2022/08/04
- [PATCH v11 11/15] target/hexagon: import lexer for idef-parser, Anton Johansson, 2022/08/04
- [PATCH v11 09/15] target/hexagon: regenerate docker/cirrus files, Anton Johansson, 2022/08/04
- [PATCH v11 06/15] target/hexagon: expose next PC in DisasContext, Anton Johansson, 2022/08/04
- [PATCH v11 07/15] target/hexagon: prepare input for the idef-parser, Anton Johansson, 2022/08/04
- [PATCH v11 10/15] target/hexagon: manually add flex/bison/glib2 to remaining containers, Anton Johansson, 2022/08/04
- [PATCH v11 12/15] target/hexagon: prepare frontend for parser, Anton Johansson, 2022/08/04
- RE: [PATCH v11 12/15] target/hexagon: prepare frontend for parser,
Taylor Simpson <=
- [PATCH v11 14/15] target/hexagon: call idef-parser functions, Anton Johansson, 2022/08/04
- [PATCH v11 15/15] target/hexagon: import additional tests, Anton Johansson, 2022/08/04
- [PATCH v11 13/15] target/hexagon: import parser for idef-parser, Anton Johansson, 2022/08/04