[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [RFC PATCH v3 00/34] Hexagon patch series
From: |
Taylor Simpson |
Subject: |
RE: [RFC PATCH v3 00/34] Hexagon patch series |
Date: |
Mon, 31 Aug 2020 23:48:03 +0000 |
> -----Original Message-----
> From: Richard Henderson <richard.henderson@linaro.org>
> Sent: Monday, August 31, 2020 2:44 PM
> To: Taylor Simpson <tsimpson@quicinc.com>; qemu-devel@nongnu.org
> Cc: philmd@redhat.com; laurent@vivier.eu; riku.voipio@iki.fi;
> aleksandar.m.mail@gmail.com; ale@rev.ng
> Subject: Re: [RFC PATCH v3 00/34] Hexagon patch series
>
> On 8/31/20 10:57 AM, Taylor Simpson wrote:
> > OK, here's the list of items. Let me know if I missed anything. I'll
> > indicate which ones can be done quickly and which ones would take more
> time.
> > I added a column for blocker if you or anyone else has input on that.
> >
> > PatchItemEffortBlocker
> > Use qemu softfloat??Yes
>
> Hmm, this table didn't render. Below, yes/no for blocker column.
Sorry about that - not sure what happened.
I will work all those you marked "yes" or "no, but should be easy".
> > 25Expand DECL/READ/WRITE/FREE macros into generated codesmall
>
> Yes.
>
> In the end I think some of these will in the end want to be helper functions.
> As I was thinking how to best write A2_add, I was thinking
See my response to the thread on patch 30/34.
Since you mention A2_paddit, here's what it would look like assuming it is
overridden.
static void generate_A2_paddt(CPUHexagonState *env, DisasContext *ctx, insn_t
*insn, packet_t *pkt)
{
/* A2_paddit */
int PuN = insn->regno[0];
TCGv PuV = hex_pred[PuN];
Int RdN = insn->regno[1];
TCGv RdV = tcg_temp_local_new();
if (!is_preloaded(ctx, RdN)) {
tcg_gen_mov_tl(hex_new_value[RdN], hex_gpr[RdN]);
}
int RsN = insn->regno[2];
TCGv RsV = hex_gpr[RsN];
int siV = insn->immed[0];
fGEN_TCG_A2_paddit({if(fLSBOLD(PuV)){fIMMEXT(siV); RdV=RsV+siV;} else
{CANCEL;}});
gen_log_reg_write(RdN, RdV, insn->slot, 1); /* Only does the write if we
haven't cancelled */
ctx_log_reg_write(ctx, RdN);
tcg_temp_free(RdV);
/* A2_paddit */
}
Here's what the override looks like (there are a bunch of these, so we have a
helper macro which could also be a function)
/* Predicated add instructions */
#define GEN_TCG_padd(PRED, ADD) \
do { \
TCGv LSB = tcg_temp_new(); \
TCGv mask = tcg_temp_new(); \
TCGv zero = tcg_const_tl(0); \
PRED; \
ADD; \
tcg_gen_movi_tl(mask, 1 << insn->slot); \
tcg_gen_or_tl(mask, hex_slot_cancelled, mask); \
tcg_gen_movcond_tl(TCG_COND_NE, hex_slot_cancelled, LSB, zero, \
hex_slot_cancelled, mask); \
tcg_temp_free(LSB); \
tcg_temp_free(mask); \
tcg_temp_free(zero); \
} while (0)
#define fGEN_TCG_A2_paddit(SHORTCODE) \
GEN_TCG_padd(fLSBOLD(PuV), tcg_gen_addi_tl(RdV, RsV, siV))
- Re: [RFC PATCH v3 30/34] Hexagon (target/hexagon) TCG for instructions with multiple definitions, (continued)
[RFC PATCH v3 33/34] Hexagon (tests/tcg/hexagon) TCG tests, Taylor Simpson, 2020/08/18
Re: [RFC PATCH v3 00/34] Hexagon patch series, no-reply, 2020/08/18
Re: [RFC PATCH v3 00/34] Hexagon patch series, Richard Henderson, 2020/08/28