All of lore.kernel.org
 help / color / mirror / Atom feed
From: Taylor Simpson <tsimpson@quicinc.com>
To: qemu-devel@nongnu.org
Cc: tsimpson@quicinc.com, richard.henderson@linaro.org,
	philmd@linaro.org, peter.maydell@linaro.org, bcain@quicinc.com,
	quic_mathbern@quicinc.com, stefanha@redhat.com
Subject: [PULL 00/21] Hexagon update: bug fixes, performance, idef-parser
Date: Fri, 16 Dec 2022 12:48:24 -0800	[thread overview]
Message-ID: <20221216204845.19290-1-tsimpson@quicinc.com> (raw)

The following changes since commit 4208e6ae114ac8266dcacc9696a443ce5c37b04e:

  Merge tag 'pull-request-2022-12-15' of https://gitlab.com/thuth/qemu into staging (2022-12-15 21:39:56 +0000)

are available in the Git repository at:

  https://github.com/quic/qemu tags/pull-hex-20221216-1

for you to fetch changes up to 585a86b1041a45c3b4074440c7f1b54944570867:

  target/hexagon: import additional tests (2022-12-16 12:30:28 -0800)

----------------------------------------------------------------

******************************************************************
*****                      WARNING                           *****
***** This PR requires updated CI containers with flex/bison *****
******************************************************************

1)
Performance improvement
Add pkt and insn to DisasContext
Many functions need information from all 3 structures, so merge
them together.

2)
Bug fix
Fix predicated assignment to .tmp and .cur

3)
Performance improvement
Add overrides for S2_asr_r_r_sat/S2_asl_r_r_sat
These functions will not be handled by idef-parser

4-11)
The final 8 patches improve change-of-flow handling.

Currently, we set the PC to a new address before exiting a TB.  The
ultimate goal is to use direct block chaining.  However, several steps
are needed along the way.

4)
When a packet has more than one change-of-flow (COF) instruction, only
the first one taken is considered.  The runtime bookkeeping is only
needed when there is more than one COF instruction in a packet.

5, 6)
Remove PC and next_PC from the runtime state and always use a
translation-time constant.  Note that next_PC is used by call instructions
to set LR and by conditional COF instructions to set the fall-through
address.

7, 8, 9)
Add helper overrides for COF instructions.  In particular, we must
distinguish those that use a PC-relative address for the destination.
These are candidates for direct block chaining later.

10)
Use direct block chaining for packets that have a single PC-relative
COF instruction.  Instead of generating the code while processing the
instruction, we record the effect in DisasContext and generate the code
during gen_end_tb.

11)
Use direct block chaining for tight loops.  We look for TBs that end
with an endloop0 that will branch back to the TB start address.

12-21)
Instruction definition parser (idef-parser) from rev.ng
Parses the instruction semantics and generates TCG

----------------------------------------------------------------
Alessandro Di Federico (4):
      target/hexagon: update MAINTAINERS for idef-parser
      target/hexagon: import README for idef-parser
      target/hexagon: prepare input for the idef-parser
      target/hexagon: call idef-parser functions

Anton Johansson (1):
      target/hexagon: import parser for idef-parser

Niccolò Izzo (2):
      target/hexagon: introduce new helper functions
      target/hexagon: import additional tests

Paolo Montesel (3):
      target/hexagon: make slot number an unsigned
      target/hexagon: make helper functions non-static
      target/hexagon: import lexer for idef-parser

Taylor Simpson (11):
      Hexagon (target/hexagon) Add pkt and insn to DisasContext
      Hexagon (target/hexagon) Fix predicated assignment to .tmp and .cur
      Hexagon (target/hexagon) Add overrides for S2_asr_r_r_sat/S2_asl_r_r_sat
      Hexagon (target/hexagon) Only use branch_taken when packet has multi cof
      Hexagon (target/hexagon) Remove PC from the runtime state
      Hexagon (target/hexagon) Remove next_PC from runtime state
      Hexagon (target/hexagon) Add overrides for direct call instructions
      Hexagon (target/hexagon) Add overrides for compound compare and jump
      Hexagon (target/hexagon) Add overrides for various forms of jump
      Hexagon (target/hexagon) Use direct block chaining for direct jump/branch
      Hexagon (target/hexagon) Use direct block chaining for tight loops

 target/hexagon/idef-parser/README.rst       |  722 ++++++++
 target/hexagon/cpu.h                        |   14 +-
 target/hexagon/gen_tcg.h                    |  412 ++++-
 target/hexagon/gen_tcg_hvx.h                |    6 +-
 target/hexagon/genptr.h                     |   36 +
 target/hexagon/idef-parser/idef-parser.h    |  253 +++
 target/hexagon/idef-parser/parser-helpers.h |  376 +++++
 target/hexagon/insn.h                       |    9 +-
 target/hexagon/macros.h                     |   27 +-
 target/hexagon/mmvec/macros.h               |    4 +-
 target/hexagon/op_helper.h                  |   37 +
 target/hexagon/translate.h                  |   20 +-
 target/hexagon/decode.c                     |   15 +-
 target/hexagon/genptr.c                     |  585 ++++++-
 target/hexagon/idef-parser/parser-helpers.c | 2360 +++++++++++++++++++++++++++
 target/hexagon/op_helper.c                  |   55 +-
 target/hexagon/translate.c                  |  229 ++-
 tests/tcg/hexagon/hvx_misc.c                |   72 +
 tests/tcg/hexagon/usr.c                     |   34 +-
 MAINTAINERS                                 |    9 +
 meson_options.txt                           |    3 +
 target/hexagon/README                       |    5 +
 target/hexagon/gen_helper_funcs.py          |   30 +-
 target/hexagon/gen_helper_protos.py         |   31 +-
 target/hexagon/gen_idef_parser_funcs.py     |  130 ++
 target/hexagon/gen_tcg_funcs.py             |   79 +-
 target/hexagon/hex_common.py                |   40 +-
 target/hexagon/idef-parser/idef-parser.lex  |  471 ++++++
 target/hexagon/idef-parser/idef-parser.y    |  965 +++++++++++
 target/hexagon/idef-parser/macros.inc       |  140 ++
 target/hexagon/idef-parser/prepare          |   24 +
 target/hexagon/meson.build                  |  158 +-
 tests/tcg/hexagon/Makefile.target           |   28 +-
 tests/tcg/hexagon/crt.S                     |   14 +
 tests/tcg/hexagon/test_abs.S                |   17 +
 tests/tcg/hexagon/test_bitcnt.S             |   40 +
 tests/tcg/hexagon/test_bitsplit.S           |   22 +
 tests/tcg/hexagon/test_call.S               |   64 +
 tests/tcg/hexagon/test_clobber.S            |   29 +
 tests/tcg/hexagon/test_cmp.S                |   31 +
 tests/tcg/hexagon/test_dotnew.S             |   38 +
 tests/tcg/hexagon/test_ext.S                |   13 +
 tests/tcg/hexagon/test_fibonacci.S          |   30 +
 tests/tcg/hexagon/test_hl.S                 |   16 +
 tests/tcg/hexagon/test_hwloops.S            |   19 +
 tests/tcg/hexagon/test_jmp.S                |   22 +
 tests/tcg/hexagon/test_lsr.S                |   36 +
 tests/tcg/hexagon/test_mpyi.S               |   17 +
 tests/tcg/hexagon/test_packet.S             |   29 +
 tests/tcg/hexagon/test_reorder.S            |   33 +
 tests/tcg/hexagon/test_round.S              |   29 +
 tests/tcg/hexagon/test_vavgw.S              |   31 +
 tests/tcg/hexagon/test_vcmpb.S              |   30 +
 tests/tcg/hexagon/test_vcmpw.S              |   30 +
 tests/tcg/hexagon/test_vlsrw.S              |   20 +
 tests/tcg/hexagon/test_vmaxh.S              |   35 +
 tests/tcg/hexagon/test_vminh.S              |   35 +
 tests/tcg/hexagon/test_vpmpyh.S             |   28 +
 tests/tcg/hexagon/test_vspliceb.S           |   31 +
 59 files changed, 7908 insertions(+), 210 deletions(-)
 create mode 100644 target/hexagon/idef-parser/README.rst
 create mode 100644 target/hexagon/idef-parser/idef-parser.h
 create mode 100644 target/hexagon/idef-parser/parser-helpers.h
 create mode 100644 target/hexagon/op_helper.h
 create mode 100644 target/hexagon/idef-parser/parser-helpers.c
 create mode 100644 target/hexagon/gen_idef_parser_funcs.py
 create mode 100644 target/hexagon/idef-parser/idef-parser.lex
 create mode 100644 target/hexagon/idef-parser/idef-parser.y
 create mode 100644 target/hexagon/idef-parser/macros.inc
 create mode 100755 target/hexagon/idef-parser/prepare
 create mode 100644 tests/tcg/hexagon/crt.S
 create mode 100644 tests/tcg/hexagon/test_abs.S
 create mode 100644 tests/tcg/hexagon/test_bitcnt.S
 create mode 100644 tests/tcg/hexagon/test_bitsplit.S
 create mode 100644 tests/tcg/hexagon/test_call.S
 create mode 100644 tests/tcg/hexagon/test_clobber.S
 create mode 100644 tests/tcg/hexagon/test_cmp.S
 create mode 100644 tests/tcg/hexagon/test_dotnew.S
 create mode 100644 tests/tcg/hexagon/test_ext.S
 create mode 100644 tests/tcg/hexagon/test_fibonacci.S
 create mode 100644 tests/tcg/hexagon/test_hl.S
 create mode 100644 tests/tcg/hexagon/test_hwloops.S
 create mode 100644 tests/tcg/hexagon/test_jmp.S
 create mode 100644 tests/tcg/hexagon/test_lsr.S
 create mode 100644 tests/tcg/hexagon/test_mpyi.S
 create mode 100644 tests/tcg/hexagon/test_packet.S
 create mode 100644 tests/tcg/hexagon/test_reorder.S
 create mode 100644 tests/tcg/hexagon/test_round.S
 create mode 100644 tests/tcg/hexagon/test_vavgw.S
 create mode 100644 tests/tcg/hexagon/test_vcmpb.S
 create mode 100644 tests/tcg/hexagon/test_vcmpw.S
 create mode 100644 tests/tcg/hexagon/test_vlsrw.S
 create mode 100644 tests/tcg/hexagon/test_vmaxh.S
 create mode 100644 tests/tcg/hexagon/test_vminh.S
 create mode 100644 tests/tcg/hexagon/test_vpmpyh.S
 create mode 100644 tests/tcg/hexagon/test_vspliceb.S

             reply	other threads:[~2022-12-16 21:05 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-16 20:48 Taylor Simpson [this message]
2022-12-16 20:48 ` [PULL 01/21] Hexagon (target/hexagon) Add pkt and insn to DisasContext Taylor Simpson
2022-12-16 20:48 ` [PULL 02/21] Hexagon (target/hexagon) Fix predicated assignment to .tmp and .cur Taylor Simpson
2022-12-16 20:48 ` [PULL 03/21] Hexagon (target/hexagon) Add overrides for S2_asr_r_r_sat/S2_asl_r_r_sat Taylor Simpson
2022-12-16 20:48 ` [PULL 04/21] Hexagon (target/hexagon) Only use branch_taken when packet has multi cof Taylor Simpson
2022-12-16 20:48 ` [PULL 05/21] Hexagon (target/hexagon) Remove PC from the runtime state Taylor Simpson
2022-12-16 20:48 ` [PULL 06/21] Hexagon (target/hexagon) Remove next_PC from " Taylor Simpson
2022-12-16 20:48 ` [PULL 07/21] Hexagon (target/hexagon) Add overrides for direct call instructions Taylor Simpson
2022-12-16 20:48 ` [PULL 08/21] Hexagon (target/hexagon) Add overrides for compound compare and jump Taylor Simpson
2022-12-16 20:48 ` [PULL 09/21] Hexagon (target/hexagon) Add overrides for various forms of jump Taylor Simpson
2022-12-16 20:48 ` [PULL 10/21] Hexagon (target/hexagon) Use direct block chaining for direct jump/branch Taylor Simpson
2022-12-16 20:48 ` [PULL 11/21] Hexagon (target/hexagon) Use direct block chaining for tight loops Taylor Simpson
2022-12-16 20:48 ` [PULL 12/21] target/hexagon: update MAINTAINERS for idef-parser Taylor Simpson
2022-12-16 20:48 ` [PULL 13/21] target/hexagon: import README " Taylor Simpson
2022-12-16 20:48 ` [PULL 14/21] target/hexagon: make slot number an unsigned Taylor Simpson
2022-12-16 20:48 ` [PULL 15/21] target/hexagon: make helper functions non-static Taylor Simpson
2022-12-16 20:48 ` [PULL 16/21] target/hexagon: introduce new helper functions Taylor Simpson
2022-12-16 20:48 ` [PULL 17/21] target/hexagon: prepare input for the idef-parser Taylor Simpson
2022-12-29 10:41   ` Thomas Huth
2022-12-31 14:00     ` Alessandro Di Federico via
2022-12-16 20:48 ` [PULL 18/21] target/hexagon: import lexer for idef-parser Taylor Simpson
2022-12-16 20:48 ` [PULL 19/21] target/hexagon: import parser " Taylor Simpson
2023-06-23 12:50   ` Peter Maydell
2023-06-26  9:54     ` Anton Johansson via
2022-12-16 20:48 ` [PULL 20/21] target/hexagon: call idef-parser functions Taylor Simpson
2022-12-16 20:48 ` [PULL 21/21] target/hexagon: import additional tests Taylor Simpson
2022-12-17 21:21 ` [PULL 00/21] Hexagon update: bug fixes, performance, idef-parser Peter Maydell
2022-12-18  9:33   ` Anton Johansson via
2022-12-18 13:52 ` Peter Maydell
2022-12-18 15:34   ` Anton Johansson via
2022-12-18 16:53   ` Richard Henderson
2022-12-18 17:01     ` Peter Maydell
2022-12-19 11:18       ` Philippe Mathieu-Daudé
2022-12-19 10:28 ` Peter Maydell
2022-12-19 18:54   ` Taylor Simpson
2022-12-20 12:49     ` Alessandro Di Federico via
2022-12-19 23:19 ` Philippe Mathieu-Daudé
2022-12-20  7:30   ` Philippe Mathieu-Daudé
2022-12-20 12:51     ` Alessandro Di Federico via
2022-12-20 14:19       ` Philippe Mathieu-Daudé
2022-12-20 18:13         ` Taylor Simpson

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=20221216204845.19290-1-tsimpson@quicinc.com \
    --to=tsimpson@quicinc.com \
    --cc=bcain@quicinc.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quic_mathbern@quicinc.com \
    --cc=richard.henderson@linaro.org \
    --cc=stefanha@redhat.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.