mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
Hexagon (target/hexagon) Enable more short-circuit packets (HVX)
Look for read-after-write instead of overlap of reads and writes HVX instructions with helpers have pass-by-reference semantics, so we check for overlaps of reads and writes within the same instruction. Signed-off-by: Taylor Simpson <ltaylorsimpson@gmail.com> Reviewed-by: Brian Cain <bcain@quicinc.com> Message-Id: <20240201103340.119081-4-ltaylorsimpson@gmail.com> Signed-off-by: Brian Cain <bcain@quicinc.com>
This commit is contained in:
parent
bd983f68ac
commit
763d2ce7c4
4 changed files with 115 additions and 95 deletions
|
@ -43,6 +43,16 @@ def gen_analyze_func(f, tag, regs, imms):
|
|||
f.write("{\n")
|
||||
|
||||
f.write(" Insn *insn G_GNUC_UNUSED = ctx->insn;\n")
|
||||
if (hex_common.is_hvx_insn(tag)):
|
||||
if hex_common.has_hvx_helper(tag):
|
||||
f.write(
|
||||
" const bool G_GNUC_UNUSED insn_has_hvx_helper = true;\n"
|
||||
)
|
||||
f.write(" ctx_start_hvx_insn(ctx);\n")
|
||||
else:
|
||||
f.write(
|
||||
" const bool G_GNUC_UNUSED insn_has_hvx_helper = false;\n"
|
||||
)
|
||||
|
||||
## Declare all the registers
|
||||
for regno, register in enumerate(regs):
|
||||
|
@ -64,15 +74,6 @@ def gen_analyze_func(f, tag, regs, imms):
|
|||
if reg.is_written():
|
||||
reg.analyze_write(f, tag, regno)
|
||||
|
||||
has_generated_helper = not hex_common.skip_qemu_helper(
|
||||
tag
|
||||
) and not hex_common.is_idef_parser_enabled(tag)
|
||||
|
||||
## Mark HVX instructions with generated helpers
|
||||
if (has_generated_helper and
|
||||
"A_CVI" in hex_common.attribdict[tag]):
|
||||
f.write(" ctx->has_hvx_helper = true;\n")
|
||||
|
||||
f.write("}\n\n")
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue