From: Richard Henderson <richard.henderson@linaro.org>
To: Taylor Simpson <tsimpson@quicinc.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: "ale@rev.ng" <ale@rev.ng>,
"riku.voipio@iki.fi" <riku.voipio@iki.fi>,
"philmd@redhat.com" <philmd@redhat.com>,
"laurent@vivier.eu" <laurent@vivier.eu>,
"aleksandar.m.mail@gmail.com" <aleksandar.m.mail@gmail.com>
Subject: Re: [RFC PATCH v3 00/34] Hexagon patch series
Date: Mon, 31 Aug 2020 13:43:54 -0700 [thread overview]
Message-ID: <97b529f8-6dff-8cd1-bed2-5ce450fe4b64@linaro.org> (raw)
In-Reply-To: <BYAPR02MB488699D87ED9C3ADBCF155BADE510@BYAPR02MB4886.namprd02.prod.outlook.com>
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.
> Use qemu decodetree.py??
no
> SeveralUse const when appropriatesmall
yes
> SeveralRemove anything after g_assert_not_reachedsmall
yes
> SeveralFix log_store32/64 add/remove/add in patch seriessmall
yes
> SeveralFollow naming guidelines for structs and enumssmall
yes
> 04Move decls to cpu-param.hsmall
Yes. The only reason this even compiled is that you don't do system mode yet. ;-)
> 04Remove CONFIG_USER_ONLY ifdef'ssmall
yes
> 04Remove DEBUG_HEXAGONsmall
yes
> 04Remove stack pointer modification hack, use qemu mechanismsmall
yes
> 04Add property x-lldb-compat to control output in logsmall
yes
> 06Include instruction and raw bytes in disassemblysmall
yes
> 07Use DEF_HELPER_FLAGSsmall
no, but should be easy.
> 07, 26Endianness of merge_bytessmall
Yes, one way or another; hopefully by removing all of the merge_bytes and using
probe_read.
> 07Fix overlap testsmall
yes
> 07Remove HELPER(debug_value)/HELPER(debug_value_i64)small
yes
> 09Include "qemu/osdep.h" instead of <stdint.h>small
yes
> 10 (and others)Stick with stdint.h types except in imported filessmall
yes
> 11Remove description from reg field definitionssmall
yes
> 13Move regmap.h into decode.csmall
yes
> 14, 27Use bit mask instead of strings in decodingsmall
no, but should be easy.
> 14Add comments to decodersmall
yes
> 16Use qemu/int128.hmedium
no
> 17Squash patches dealing with imported filessmall
yes
> 24Use qemu/bitops.h for instruction attributessmall
no
> 24Fix initialization of opcode_short_semanticssmall
yes
> 24Change if (p == NULL) { g_assert_not_reached(); } to assert(p != NULL)small
no
> 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
/* TODO: You currently have an "offset" parameter to
DECL_REG. I can't see that it is ever used?
I would *hope* that this could be resolved earlier,
so that by this time insn->regno[*] is absolute. */
static int resolve_regno(Insn *insn, int slot, int off);
/* Return hex_new_value[regno]; log the write. */
static TCGv reg_for_write(DisasContext *ctx, int regno);
/* Return hex_reg[regno]; force up-to-date value for PC. */
static TCGv reg_for_read(DisasContext *ctx, int regno);
/* if (preg) hex_new_value[regno] = hex_reg[regno],
or !preg if !test_positive.
Leaves hex_new_value[] canonical for gen_reg_writes,
no extra temporary required. */
static void gen_cancel_reg(DisasContext *ctx, int preg,
int rreg, bool test_positive);
DEF_TCG_FUNC(A2_add)
{
int rd = resolve_regno(insn, 0, 0);
int rs = resolve_regno(insn, 1, 0);
int rt = resolve_regno(insn, 2, 0);
tcg_gen_add_tl(reg_for_write(ctx, rd),
reg_for_read(ctx, rs),
reg_for_read(ctx, rt));
}
DEF_TCG_FUNC(A2_paddit)
{
int pu = resolve_regno(insn, 0, 0);
int rd = resolve_regno(insn, 1, 0);
int rs = resolve_regno(insn, 2, 0);
int rt = resolve_regno(insn, 3, 0);
tcg_gen_add_tl(reg_for_write(ctx, rd),
reg_for_read(ctx, rs),
reg_for_read(ctx, rt));
gen_cancel_reg(ctx, insn, rd, pu, true);
}
However, I don't think we have to have a comprehensive set of these now. We
can expand everything into the generator to start, then adjust the generator as
we add helper functions and use them within the overrides.
> 26Rewrite fINSERT*, fEXTRACT*, f?XTN macrossmall
yes
> 26Investigate fRND macrosmall
no, but should be easy.
> 26Change REG = REG to (VOID)REG to suppress compiler warningsmall
yes
> 27Remove multiple includes of imported/iclass.defsmall
yes
> 28Move genptr_helpers.h into genptr.csmall
yes
> 28Remove unneeded tempssmall
no
> 28Use tcg_gen_deposit_tl and tcg_gen_extract_tl when dealing with p3_0small
no
> 29Size opcode_genptr[] properly and initialize with [TAG] = generate_##TAGsmall
yes; i think this will fall out of other changes.
> 30Don't generate helpers for instructions that are overriddensmall
yes
> Don't include "gen_tcg.h" in helper.h
yes
> 31Use bitmask for ctx->reg_log instead of an arraysmall
yes
> 31Use tcg_gen_extract_i32 for gen_slot_cancelled_checksmall
yes
> 31Properly deal with reading instructions across a page boundary and toomedium
> many instructions before finding end-of-packet
Yes, this should be easy. Unless there's some surprise in the code I have
already suggested code.
> 31Don't set PC at the beginning of every packetmedium
no
> 31Don't set slot_cancelled unless neededsmall
no
> 31Don't set hex_pred_written unless neededmedium
no
> 31Change cancelled variable to not localsmall
yes
> 31Remove unnecessary tempsmall
yes
> 31Let tcg_gen_addi_tl check for zerosmall
yes
> 31Move gen_exec_counters to end of TB instead of every packetmedium
no
> 31Move end of TB handling to hexagon_tr_tb_stopsmall
yes
r~
next prev parent reply other threads:[~2020-08-31 20:44 UTC|newest]
Thread overview: 122+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-18 15:50 [RFC PATCH v3 00/34] Hexagon patch series Taylor Simpson
2020-08-18 15:50 ` [RFC PATCH v3 01/34] Hexagon Update MAINTAINERS file Taylor Simpson
2020-08-26 1:55 ` Richard Henderson
2020-08-18 15:50 ` [RFC PATCH v3 02/34] Hexagon (target/hexagon) README Taylor Simpson
2020-08-26 2:06 ` Richard Henderson
2020-08-18 15:50 ` [RFC PATCH v3 03/34] Hexagon (include/elf.h) ELF machine definition Taylor Simpson
2020-08-26 2:06 ` Richard Henderson
2020-08-18 15:50 ` [RFC PATCH v3 04/34] Hexagon (target/hexagon) scalar core definition Taylor Simpson
2020-08-26 13:35 ` Richard Henderson
2020-08-26 23:51 ` Taylor Simpson
2020-08-18 15:50 ` [RFC PATCH v3 05/34] Hexagon (target/hexagon) register names Taylor Simpson
2020-08-26 13:39 ` Richard Henderson
2020-08-18 15:50 ` [RFC PATCH v3 06/34] Hexagon (disas) disassembler Taylor Simpson
2020-08-26 13:52 ` Richard Henderson
2020-08-26 23:52 ` Taylor Simpson
2020-08-18 15:50 ` [RFC PATCH v3 07/34] Hexagon (target/hexagon) scalar core helpers Taylor Simpson
2020-08-26 14:16 ` Richard Henderson
2020-08-26 23:52 ` Taylor Simpson
2020-08-18 15:50 ` [RFC PATCH v3 08/34] Hexagon (target/hexagon) GDB Stub Taylor Simpson
2020-08-26 14:17 ` Richard Henderson
2020-08-18 15:50 ` [RFC PATCH v3 09/34] Hexagon (target/hexagon) architecture types Taylor Simpson
2020-08-26 14:19 ` Richard Henderson
2020-08-26 23:52 ` Taylor Simpson
2020-08-18 15:50 ` [RFC PATCH v3 10/34] Hexagon (target/hexagon) instruction and packet types Taylor Simpson
2020-08-26 14:22 ` Richard Henderson
2020-08-26 23:52 ` Taylor Simpson
2020-08-18 15:50 ` [RFC PATCH v3 11/34] Hexagon (target/hexagon) register fields Taylor Simpson
2020-08-26 14:29 ` Richard Henderson
2020-08-26 23:52 ` Taylor Simpson
2020-08-18 15:50 ` [RFC PATCH v3 12/34] Hexagon (target/hexagon) instruction attributes Taylor Simpson
2020-08-26 14:34 ` Richard Henderson
2020-08-18 15:50 ` [RFC PATCH v3 13/34] Hexagon (target/hexagon) register map Taylor Simpson
2020-08-26 14:36 ` Richard Henderson
2020-08-26 23:52 ` Taylor Simpson
2020-08-18 15:50 ` [RFC PATCH v3 14/34] Hexagon (target/hexagon) instruction/packet decode Taylor Simpson
2020-08-26 15:06 ` Richard Henderson
2020-08-26 23:52 ` Taylor Simpson
2020-08-18 15:50 ` [RFC PATCH v3 15/34] Hexagon (target/hexagon) instruction printing Taylor Simpson
2020-08-26 15:08 ` Richard Henderson
2020-08-18 15:50 ` [RFC PATCH v3 16/34] Hexagon (target/hexagon) utility functions Taylor Simpson
2020-08-26 15:10 ` Richard Henderson
2020-08-26 23:52 ` Taylor Simpson
2020-08-18 15:50 ` [RFC PATCH v3 17/34] Hexagon (target/hexagon/imported) arch import - macro definitions Taylor Simpson
2020-08-26 15:17 ` Richard Henderson
2020-08-26 23:52 ` Taylor Simpson
2020-08-18 15:50 ` [RFC PATCH v3 18/34] Hexagon (target/hexagon/imported) arch import - instruction semantics Taylor Simpson
2020-08-18 15:50 ` [RFC PATCH v3 19/34] Hexagon (target/hexagon/imported) arch import - instruction encoding Taylor Simpson
2020-08-18 15:50 ` [RFC PATCH v3 20/34] Hexagon (target/hexagon) generator phase 1 - C preprocessor for semantics Taylor Simpson
2020-08-18 15:50 ` [RFC PATCH v3 21/34] Hexagon (target/hexagon) generator phase 2 - generate header files Taylor Simpson
2020-08-18 15:50 ` [RFC PATCH v3 22/34] Hexagon (target/hexagon) generator phase 3 - C preprocessor for decode tree Taylor Simpson
2020-08-18 15:50 ` [RFC PATCH v3 23/34] Hexagon (target/hexagon) generater phase 4 - " Taylor Simpson
2020-08-18 15:50 ` [RFC PATCH v3 24/34] Hexagon (target/hexagon) opcode data structures Taylor Simpson
2020-08-26 15:25 ` Richard Henderson
2020-08-26 23:52 ` Taylor Simpson
2020-08-27 4:05 ` Richard Henderson
2020-08-18 15:50 ` [RFC PATCH v3 25/34] Hexagon (target/hexagon) macros to interface with the generator Taylor Simpson
2020-08-29 0:49 ` Richard Henderson
2020-08-30 20:30 ` Taylor Simpson
2020-08-30 20:59 ` Richard Henderson
2020-08-30 21:20 ` Taylor Simpson
2020-08-18 15:50 ` [RFC PATCH v3 26/34] Hexagon (target/hexagon) macros referenced in instruction semantics Taylor Simpson
2020-08-29 1:16 ` Richard Henderson
2020-08-30 20:23 ` Taylor Simpson
2020-08-30 21:06 ` Richard Henderson
2020-10-08 15:00 ` Taylor Simpson
2020-10-08 17:30 ` Richard Henderson
2020-10-08 18:51 ` Taylor Simpson
2020-10-08 20:02 ` Richard Henderson
2020-10-08 20:54 ` Taylor Simpson
2020-10-09 12:59 ` Richard Henderson
2020-10-09 16:02 ` Taylor Simpson
2020-08-18 15:50 ` [RFC PATCH v3 27/34] Hexagon (target/hexagon) instruction classes Taylor Simpson
2020-08-29 1:37 ` Richard Henderson
2020-08-30 20:04 ` Taylor Simpson
2020-08-30 20:43 ` Richard Henderson
2020-08-18 15:50 ` [RFC PATCH v3 28/34] Hexagon (target/hexagon) TCG generation helpers Taylor Simpson
2020-08-29 1:48 ` Richard Henderson
2020-08-30 19:53 ` Taylor Simpson
2020-08-30 20:52 ` Richard Henderson
2020-08-30 21:38 ` Taylor Simpson
2020-08-18 15:50 ` [RFC PATCH v3 29/34] Hexagon (target/hexagon) TCG generation Taylor Simpson
2020-08-29 1:58 ` Richard Henderson
2020-08-30 19:49 ` Taylor Simpson
2020-08-18 15:50 ` [RFC PATCH v3 30/34] Hexagon (target/hexagon) TCG for instructions with multiple definitions Taylor Simpson
2020-08-29 2:02 ` Richard Henderson
2020-08-30 19:48 ` Taylor Simpson
2020-08-30 21:13 ` Richard Henderson
2020-08-30 21:30 ` Taylor Simpson
2020-08-30 23:26 ` Richard Henderson
2020-08-31 17:08 ` Taylor Simpson
2020-08-31 17:29 ` Richard Henderson
2020-08-31 18:14 ` Taylor Simpson
2020-08-31 19:20 ` Richard Henderson
2020-08-31 23:10 ` Taylor Simpson
2020-09-01 2:40 ` Richard Henderson
2020-09-01 4:17 ` Taylor Simpson
2020-09-24 2:56 ` Taylor Simpson
2020-09-24 15:03 ` Richard Henderson
2020-09-24 17:18 ` Taylor Simpson
2020-09-24 19:04 ` Richard Henderson
2020-08-18 15:50 ` [RFC PATCH v3 31/34] Hexagon (target/hexagon) translation Taylor Simpson
2020-08-29 2:49 ` Richard Henderson
2020-08-30 19:37 ` Taylor Simpson
2020-08-30 23:08 ` Richard Henderson
2020-08-18 15:50 ` [RFC PATCH v3 32/34] Hexagon (linux-user/hexagon) Linux user emulation Taylor Simpson
2020-08-29 2:59 ` Richard Henderson
2020-08-18 15:50 ` [RFC PATCH v3 33/34] Hexagon (tests/tcg/hexagon) TCG tests Taylor Simpson
2020-08-29 3:05 ` Richard Henderson
2020-09-01 9:57 ` Alessandro Di Federico
2020-08-18 15:50 ` [RFC PATCH v3 34/34] Hexagon build infrastructure Taylor Simpson
2020-08-29 3:19 ` Richard Henderson
2020-09-24 2:35 ` Taylor Simpson
2020-09-25 16:59 ` Philippe Mathieu-Daudé
2020-08-18 16:32 ` [RFC PATCH v3 00/34] Hexagon patch series no-reply
2020-08-29 3:27 ` Richard Henderson
2020-08-30 20:47 ` Taylor Simpson
2020-08-30 23:33 ` Richard Henderson
2020-08-31 17:57 ` Taylor Simpson
2020-08-31 20:43 ` Richard Henderson [this message]
2020-08-31 23:48 ` Taylor Simpson
2020-09-07 9:49 ` Rob Landley
2020-09-15 0:41 ` [EXT] " Brian Cain
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=97b529f8-6dff-8cd1-bed2-5ce450fe4b64@linaro.org \
--to=richard.henderson@linaro.org \
--cc=ale@rev.ng \
--cc=aleksandar.m.mail@gmail.com \
--cc=laurent@vivier.eu \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
--cc=tsimpson@quicinc.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 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.