qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 1e5363: Hexagon (target/hexagon) Add pkt and


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 1e5363: Hexagon (target/hexagon) Add pkt and insn to Disas...
Date: Mon, 19 Dec 2022 02:26:44 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 1e536334ccb0a1606f814a38a4996b3b818e9fab
      
https://github.com/qemu/qemu/commit/1e536334ccb0a1606f814a38a4996b3b818e9fab
  Author: Taylor Simpson <tsimpson@quicinc.com>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/hexagon/gen_tcg_funcs.py
    M target/hexagon/gen_tcg_hvx.h
    M target/hexagon/genptr.c
    M target/hexagon/insn.h
    M target/hexagon/macros.h
    M target/hexagon/mmvec/macros.h
    M target/hexagon/translate.c
    M target/hexagon/translate.h

  Log Message:
  -----------
  Hexagon (target/hexagon) Add pkt and insn to DisasContext

This enables us to reduce the number of parameters to many functions
In particular, the generated functions previously took all 3 as arguments

Not only does this simplify the code, it improves the translation time

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <20221108162906.3166-2-tsimpson@quicinc.com>


  Commit: 83853ea0efee80f8c39a73753a048a769a02a2c7
      
https://github.com/qemu/qemu/commit/83853ea0efee80f8c39a73753a048a769a02a2c7
  Author: Taylor Simpson <tsimpson@quicinc.com>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/hexagon/gen_tcg_funcs.py
    M target/hexagon/translate.h
    M tests/tcg/hexagon/hvx_misc.c

  Log Message:
  -----------
  Hexagon (target/hexagon) Fix predicated assignment to .tmp and .cur

Here are example instructions with a predicated .tmp/.cur assignment
    if (p1) v12.tmp = vmem(r7 + #0)
    if (p0) v12.cur = vmem(r9 + #0)
The .tmp/.cur indicates that references to v12 in the same packet
take the result of the load.  However, when the predicate is false,
the value at the start of the packet should be used.  After the packet
commits, the .tmp value is dropped, but the .cur value is maintained.

To fix this bug, we preload the original value from the HVX register
into the temporary used for the result.

Test cases added to tests/tcg/hexagon/hvx_misc.c

Acked-by: Richard Henderson <richard.henderson@linaro.org>
Co-authored-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
Signed-off-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <20221108162906.3166-3-tsimpson@quicinc.com>


  Commit: 8e8a85c14eed845346f64431da6417869f88c470
      
https://github.com/qemu/qemu/commit/8e8a85c14eed845346f64431da6417869f88c470
  Author: Taylor Simpson <tsimpson@quicinc.com>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/hexagon/gen_tcg.h
    M target/hexagon/genptr.c
    M tests/tcg/hexagon/usr.c

  Log Message:
  -----------
  Hexagon (target/hexagon) Add overrides for S2_asr_r_r_sat/S2_asl_r_r_sat

These instructions will not be generated by idef-parser, so we override
them manually.

Test cases added to tests/tcg/hexagon/usr.c

Co-authored-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
Signed-off-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20221108162906.3166-4-tsimpson@quicinc.com>


  Commit: fb67c2bf24f4399bb0347580324740409e1bb2d7
      
https://github.com/qemu/qemu/commit/fb67c2bf24f4399bb0347580324740409e1bb2d7
  Author: Taylor Simpson <tsimpson@quicinc.com>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/hexagon/decode.c
    M target/hexagon/gen_helper_funcs.py
    M target/hexagon/gen_helper_protos.py
    M target/hexagon/gen_tcg_funcs.py
    M target/hexagon/hex_common.py
    M target/hexagon/insn.h
    M target/hexagon/macros.h
    M target/hexagon/op_helper.c
    M target/hexagon/translate.c

  Log Message:
  -----------
  Hexagon (target/hexagon) Only use branch_taken when packet has multi cof

When a packet has more than one change-of-flow instruction, only the first
one to branch is considered.  We use the branch_taken variable to keep
track of this.

However, when there is a single cof instruction, we don't need the same
amount of bookkeeping.

We add the pkt_has_multi_cof member to the Packet structure, and pass this
information to the needed functions.

When there is a generated helper function with cof, the generator will
pass this pkt_has_multi_cof as a runtime value.

Acked-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <20221108162906.3166-5-tsimpson@quicinc.com>


  Commit: 40085901dbe339bdcd16ecf1bb70b63a5f119b4f
      
https://github.com/qemu/qemu/commit/40085901dbe339bdcd16ecf1bb70b63a5f119b4f
  Author: Taylor Simpson <tsimpson@quicinc.com>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/hexagon/gen_helper_funcs.py
    M target/hexagon/gen_helper_protos.py
    M target/hexagon/gen_tcg.h
    M target/hexagon/gen_tcg_funcs.py
    M target/hexagon/hex_common.py
    M target/hexagon/insn.h
    M target/hexagon/macros.h
    M target/hexagon/translate.c

  Log Message:
  -----------
  Hexagon (target/hexagon) Remove PC from the runtime state

Add pc field to Packet structure
For helpers that need PC, pass an extra argument
Remove slot arg from conditional jump helpers
On a trap0, copy pkt->pc into hex_gpr[HEX_REG_PC]

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <20221108162906.3166-6-tsimpson@quicinc.com>


  Commit: 613653e500c0d482784f09aaa71f1297565b6815
      
https://github.com/qemu/qemu/commit/613653e500c0d482784f09aaa71f1297565b6815
  Author: Taylor Simpson <tsimpson@quicinc.com>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/hexagon/cpu.h
    M target/hexagon/gen_helper_funcs.py
    M target/hexagon/gen_helper_protos.py
    M target/hexagon/gen_tcg.h
    M target/hexagon/gen_tcg_funcs.py
    M target/hexagon/hex_common.py
    M target/hexagon/macros.h
    M target/hexagon/op_helper.c
    M target/hexagon/translate.c
    M target/hexagon/translate.h

  Log Message:
  -----------
  Hexagon (target/hexagon) Remove next_PC from runtime state

The imported files don't properly mark all CONDEXEC instructions, so
we add some logic to hex_common.py to add the attribute.

Acked-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <20221108162906.3166-7-tsimpson@quicinc.com>


  Commit: 61c6c06e5df7ea960f814f4527f354823181247e
      
https://github.com/qemu/qemu/commit/61c6c06e5df7ea960f814f4527f354823181247e
  Author: Taylor Simpson <tsimpson@quicinc.com>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/hexagon/gen_tcg.h
    M target/hexagon/genptr.c

  Log Message:
  -----------
  Hexagon (target/hexagon) Add overrides for direct call instructions

Add overrides for
    J2_call
    J2_callt
    J2_callf

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <20221108162906.3166-8-tsimpson@quicinc.com>


  Commit: 11b577ff33267ef91e4a08cee2eca3848837f5bf
      
https://github.com/qemu/qemu/commit/11b577ff33267ef91e4a08cee2eca3848837f5bf
  Author: Taylor Simpson <tsimpson@quicinc.com>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/hexagon/gen_tcg.h
    M target/hexagon/genptr.c

  Log Message:
  -----------
  Hexagon (target/hexagon) Add overrides for compound compare and jump

Acked-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <20221108162906.3166-9-tsimpson@quicinc.com>


  Commit: 97b16faf82c463a58c68d7221c1330c84878f48a
      
https://github.com/qemu/qemu/commit/97b16faf82c463a58c68d7221c1330c84878f48a
  Author: Taylor Simpson <tsimpson@quicinc.com>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/hexagon/gen_tcg.h
    M target/hexagon/genptr.c

  Log Message:
  -----------
  Hexagon (target/hexagon) Add overrides for various forms of jump

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <20221108162906.3166-10-tsimpson@quicinc.com>


  Commit: 1b9a7f2a1384d14dbb82862a612188797d398fe0
      
https://github.com/qemu/qemu/commit/1b9a7f2a1384d14dbb82862a612188797d398fe0
  Author: Taylor Simpson <tsimpson@quicinc.com>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/hexagon/genptr.c
    M target/hexagon/translate.c
    M target/hexagon/translate.h

  Log Message:
  -----------
  Hexagon (target/hexagon) Use direct block chaining for direct jump/branch

Direct block chaining is documented here
https://qemu.readthedocs.io/en/latest/devel/tcg.html#direct-block-chaining

Recall that Hexagon allows packets with multiple jumps where only the
first one with a true predicate will actually jump.  We can  use
tcg_gen_goto_tb/tcg_gen_exit_tb when the packet contains a single
PC-relative branch or jump.  If not, we use tcg_gen_lookup_and_goto_ptr.

We add the following to DisasContext in order to delay the branching
until the end of packet commit (in gen_end_tb)
    branch_cond
        The TCGCond condition under which the branch is taken
        When branch_cond == TCG_COND_NEVER, there isn't a single
        direct branch in this packet.
        When branch_cond != TCG_COND_ALWAYS, the value is in
        hex_branch_taken
    branch_dest
        The destination of the branch

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <20221108162906.3166-11-tsimpson@quicinc.com>


  Commit: 564b2040a683bfc7169f14f75ac7a753378fbd8f
      
https://github.com/qemu/qemu/commit/564b2040a683bfc7169f14f75ac7a753378fbd8f
  Author: Taylor Simpson <tsimpson@quicinc.com>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/hexagon/cpu.h
    M target/hexagon/gen_tcg.h
    M target/hexagon/genptr.c
    M target/hexagon/translate.c
    M target/hexagon/translate.h

  Log Message:
  -----------
  Hexagon (target/hexagon) Use direct block chaining for tight loops

Direct block chaining is documented here
https://qemu.readthedocs.io/en/latest/devel/tcg.html#direct-block-chaining

Hexagon inner loops end with the endloop0 instruction
To go back to the beginning of the loop, this instructions writes to PC
from register SA0 (start address 0).  To use direct block chaining, we
have to assign PC with a constant value.  So, we specialize the code
generation when the start of the translation block is equal to SA0.

When this is the case, we defer the compare/branch from endloop0 to
gen_end_tb.  When this is done, we can assign the start address of the TB
to PC.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <20221108162906.3166-12-tsimpson@quicinc.com>


  Commit: 647357d69e8ad6c277f7fe2094fafd8ee379d3ba
      
https://github.com/qemu/qemu/commit/647357d69e8ad6c277f7fe2094fafd8ee379d3ba
  Author: Alessandro Di Federico <ale@rev.ng>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  target/hexagon: update MAINTAINERS for idef-parser

Signed-off-by: Alessandro Di Federico <ale@rev.ng>
Signed-off-by: Anton Johansson <anjo@rev.ng>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <20220923173831.227551-2-anjo@rev.ng>


  Commit: 95e1150500924a02d37ac73db223be671d69172e
      
https://github.com/qemu/qemu/commit/95e1150500924a02d37ac73db223be671d69172e
  Author: Alessandro Di Federico <ale@rev.ng>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/hexagon/README
    A target/hexagon/idef-parser/README.rst

  Log Message:
  -----------
  target/hexagon: import README for idef-parser

Signed-off-by: Alessandro Di Federico <ale@rev.ng>
Signed-off-by: Anton Johansson <anjo@rev.ng>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <20220923173831.227551-3-anjo@rev.ng>


  Commit: d909808ec002abee64209a967d636878afe280b5
      
https://github.com/qemu/qemu/commit/d909808ec002abee64209a967d636878afe280b5
  Author: Paolo Montesel <babush@rev.ng>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/hexagon/genptr.c
    M target/hexagon/macros.h

  Log Message:
  -----------
  target/hexagon: make slot number an unsigned

Signed-off-by: Alessandro Di Federico <ale@rev.ng>
Signed-off-by: Paolo Montesel <babush@rev.ng>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <20220923173831.227551-4-anjo@rev.ng>


  Commit: 7e8b3b395fc39218d5a0b5122167d9249f4658f9
      
https://github.com/qemu/qemu/commit/7e8b3b395fc39218d5a0b5122167d9249f4658f9
  Author: Paolo Montesel <babush@rev.ng>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/hexagon/genptr.c
    M target/hexagon/genptr.h
    M target/hexagon/op_helper.c
    A target/hexagon/op_helper.h

  Log Message:
  -----------
  target/hexagon: make helper functions non-static

Make certain helper functions non-static, making them available outside
genptr.c. These functions are required by code generated by the
idef-parser.

This commit also makes some functions in op_helper.c non-static in order
to avoid having them marked as unused when using the idef-parser
generated code.

Signed-off-by: Alessandro Di Federico <ale@rev.ng>
Signed-off-by: Paolo Montesel <babush@rev.ng>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <20220923173831.227551-5-anjo@rev.ng>


  Commit: 42659e046fb74a9cdbf2663a5d990df2507bccfa
      
https://github.com/qemu/qemu/commit/42659e046fb74a9cdbf2663a5d990df2507bccfa
  Author: Niccolò Izzo <nizzo@rev.ng>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/hexagon/genptr.c
    M target/hexagon/genptr.h
    M target/hexagon/macros.h

  Log Message:
  -----------
  target/hexagon: introduce new helper functions

These helpers will be employed by the idef-parser generated code, to
correctly implement instruction semantics. "Helper" functions, in the
context of this patch, refers to functions which provide a manual TCG
implementation of certain features.

Signed-off-by: Alessandro Di Federico <ale@rev.ng>
Signed-off-by: Niccolò Izzo <nizzo@rev.ng>
Signed-off-by: Anton Johansson <anjo@rev.ng>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <20220923173831.227551-6-anjo@rev.ng>


  Commit: 7c19dcc5646aef8ef31d453adf81becdcfb43c19
      
https://github.com/qemu/qemu/commit/7c19dcc5646aef8ef31d453adf81becdcfb43c19
  Author: Alessandro Di Federico <ale@rev.ng>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M meson_options.txt
    A target/hexagon/gen_idef_parser_funcs.py
    A target/hexagon/idef-parser/macros.inc
    A target/hexagon/idef-parser/prepare
    M target/hexagon/meson.build

  Log Message:
  -----------
  target/hexagon: prepare input for the idef-parser

Introduce infrastructure necessary to produce a file suitable for being
parsed by the idef-parser. A build option is also added to fully disable
the output of idef-parser, which is useful for debugging.

Signed-off-by: Alessandro Di Federico <ale@rev.ng>
Signed-off-by: Anton Johansson <anjo@rev.ng>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <20220923173831.227551-8-anjo@rev.ng>


  Commit: fd8171fe52b5e56b2052e51b3f9e82acab58d87f
      
https://github.com/qemu/qemu/commit/fd8171fe52b5e56b2052e51b3f9e82acab58d87f
  Author: Paolo Montesel <babush@rev.ng>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    A target/hexagon/idef-parser/idef-parser.h
    A target/hexagon/idef-parser/idef-parser.lex
    M target/hexagon/meson.build

  Log Message:
  -----------
  target/hexagon: import lexer for idef-parser

Signed-off-by: Alessandro Di Federico <ale@rev.ng>
Signed-off-by: Paolo Montesel <babush@rev.ng>
Signed-off-by: Anton Johansson <anjo@rev.ng>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <20220923173831.227551-9-anjo@rev.ng>


  Commit: c0a41ee631a146722a0d1365a788cbf503287570
      
https://github.com/qemu/qemu/commit/c0a41ee631a146722a0d1365a788cbf503287570
  Author: Anton Johansson <anjo@rev.ng>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    A target/hexagon/idef-parser/idef-parser.y
    A target/hexagon/idef-parser/parser-helpers.c
    A target/hexagon/idef-parser/parser-helpers.h
    M target/hexagon/meson.build

  Log Message:
  -----------
  target/hexagon: import parser for idef-parser

Signed-off-by: Alessandro Di Federico <ale@rev.ng>
Signed-off-by: Paolo Montesel <babush@rev.ng>
Signed-off-by: Anton Johansson <anjo@rev.ng>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <20220923173831.227551-10-anjo@rev.ng>


  Commit: e71fdc4f1bd5632f2d152a08cbecd82b5aa9e954
      
https://github.com/qemu/qemu/commit/e71fdc4f1bd5632f2d152a08cbecd82b5aa9e954
  Author: Alessandro Di Federico <ale@rev.ng>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/hexagon/gen_helper_funcs.py
    M target/hexagon/gen_helper_protos.py
    M target/hexagon/gen_tcg_funcs.py
    M target/hexagon/hex_common.py
    M target/hexagon/meson.build

  Log Message:
  -----------
  target/hexagon: call idef-parser functions

Extend gen_tcg_funcs.py in order to emit calls to the functions emitted
by the idef-parser, if available.

Signed-off-by: Alessandro Di Federico <ale@rev.ng>
Signed-off-by: Anton Johansson <anjo@rev.ng>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <20220923173831.227551-11-anjo@rev.ng>


  Commit: 585a86b1041a45c3b4074440c7f1b54944570867
      
https://github.com/qemu/qemu/commit/585a86b1041a45c3b4074440c7f1b54944570867
  Author: Niccolò Izzo <nizzo@rev.ng>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M tests/tcg/hexagon/Makefile.target
    A tests/tcg/hexagon/crt.S
    A tests/tcg/hexagon/test_abs.S
    A tests/tcg/hexagon/test_bitcnt.S
    A tests/tcg/hexagon/test_bitsplit.S
    A tests/tcg/hexagon/test_call.S
    A tests/tcg/hexagon/test_clobber.S
    A tests/tcg/hexagon/test_cmp.S
    A tests/tcg/hexagon/test_dotnew.S
    A tests/tcg/hexagon/test_ext.S
    A tests/tcg/hexagon/test_fibonacci.S
    A tests/tcg/hexagon/test_hl.S
    A tests/tcg/hexagon/test_hwloops.S
    A tests/tcg/hexagon/test_jmp.S
    A tests/tcg/hexagon/test_lsr.S
    A tests/tcg/hexagon/test_mpyi.S
    A tests/tcg/hexagon/test_packet.S
    A tests/tcg/hexagon/test_reorder.S
    A tests/tcg/hexagon/test_round.S
    A tests/tcg/hexagon/test_vavgw.S
    A tests/tcg/hexagon/test_vcmpb.S
    A tests/tcg/hexagon/test_vcmpw.S
    A tests/tcg/hexagon/test_vlsrw.S
    A tests/tcg/hexagon/test_vmaxh.S
    A tests/tcg/hexagon/test_vminh.S
    A tests/tcg/hexagon/test_vpmpyh.S
    A tests/tcg/hexagon/test_vspliceb.S

  Log Message:
  -----------
  target/hexagon: import additional tests

Signed-off-by: Alessandro Di Federico <ale@rev.ng>
Signed-off-by: Niccolò Izzo <nizzo@rev.ng>
Signed-off-by: Anton Johansson <anjo@rev.ng>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <20220923173831.227551-12-anjo@rev.ng>


  Commit: 4f9a4cd37eb2f0c4e6be83640fcc5c31d4bf99e3
      
https://github.com/qemu/qemu/commit/4f9a4cd37eb2f0c4e6be83640fcc5c31d4bf99e3
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-18 (Sun, 18 Dec 2022)

  Changed paths:
    M MAINTAINERS
    M meson_options.txt
    M target/hexagon/README
    M target/hexagon/cpu.h
    M target/hexagon/decode.c
    M target/hexagon/gen_helper_funcs.py
    M target/hexagon/gen_helper_protos.py
    A target/hexagon/gen_idef_parser_funcs.py
    M target/hexagon/gen_tcg.h
    M target/hexagon/gen_tcg_funcs.py
    M target/hexagon/gen_tcg_hvx.h
    M target/hexagon/genptr.c
    M target/hexagon/genptr.h
    M target/hexagon/hex_common.py
    A target/hexagon/idef-parser/README.rst
    A target/hexagon/idef-parser/idef-parser.h
    A target/hexagon/idef-parser/idef-parser.lex
    A target/hexagon/idef-parser/idef-parser.y
    A target/hexagon/idef-parser/macros.inc
    A target/hexagon/idef-parser/parser-helpers.c
    A target/hexagon/idef-parser/parser-helpers.h
    A target/hexagon/idef-parser/prepare
    M target/hexagon/insn.h
    M target/hexagon/macros.h
    M target/hexagon/meson.build
    M target/hexagon/mmvec/macros.h
    M target/hexagon/op_helper.c
    A target/hexagon/op_helper.h
    M target/hexagon/translate.c
    M target/hexagon/translate.h
    M tests/tcg/hexagon/Makefile.target
    A tests/tcg/hexagon/crt.S
    M tests/tcg/hexagon/hvx_misc.c
    A tests/tcg/hexagon/test_abs.S
    A tests/tcg/hexagon/test_bitcnt.S
    A tests/tcg/hexagon/test_bitsplit.S
    A tests/tcg/hexagon/test_call.S
    A tests/tcg/hexagon/test_clobber.S
    A tests/tcg/hexagon/test_cmp.S
    A tests/tcg/hexagon/test_dotnew.S
    A tests/tcg/hexagon/test_ext.S
    A tests/tcg/hexagon/test_fibonacci.S
    A tests/tcg/hexagon/test_hl.S
    A tests/tcg/hexagon/test_hwloops.S
    A tests/tcg/hexagon/test_jmp.S
    A tests/tcg/hexagon/test_lsr.S
    A tests/tcg/hexagon/test_mpyi.S
    A tests/tcg/hexagon/test_packet.S
    A tests/tcg/hexagon/test_reorder.S
    A tests/tcg/hexagon/test_round.S
    A tests/tcg/hexagon/test_vavgw.S
    A tests/tcg/hexagon/test_vcmpb.S
    A tests/tcg/hexagon/test_vcmpw.S
    A tests/tcg/hexagon/test_vlsrw.S
    A tests/tcg/hexagon/test_vmaxh.S
    A tests/tcg/hexagon/test_vminh.S
    A tests/tcg/hexagon/test_vpmpyh.S
    A tests/tcg/hexagon/test_vspliceb.S
    M tests/tcg/hexagon/usr.c

  Log Message:
  -----------
  Merge tag 'pull-hex-20221216-1' of https://github.com/quic/qemu into staging

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

# gpg: Signature made Fri 16 Dec 2022 20:41:53 GMT
# gpg:                using RSA key 3635C788CE62B91FD4C59AB47B0244FB12DE4422
# gpg: Good signature from "Taylor Simpson (Rock on) <tsimpson@quicinc.com>" 
[undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 3635 C788 CE62 B91F D4C5  9AB4 7B02 44FB 12DE 4422

* tag 'pull-hex-20221216-1' of https://github.com/quic/qemu: (21 commits)
  target/hexagon: import additional tests
  target/hexagon: call idef-parser functions
  target/hexagon: import parser for idef-parser
  target/hexagon: import lexer for idef-parser
  target/hexagon: prepare input for the idef-parser
  target/hexagon: introduce new helper functions
  target/hexagon: make helper functions non-static
  target/hexagon: make slot number an unsigned
  target/hexagon: import README for idef-parser
  target/hexagon: update MAINTAINERS for idef-parser
  Hexagon (target/hexagon) Use direct block chaining for tight loops
  Hexagon (target/hexagon) Use direct block chaining for direct jump/branch
  Hexagon (target/hexagon) Add overrides for various forms of jump
  Hexagon (target/hexagon) Add overrides for compound compare and jump
  Hexagon (target/hexagon) Add overrides for direct call instructions
  Hexagon (target/hexagon) Remove next_PC from runtime state
  Hexagon (target/hexagon) Remove PC from the runtime state
  Hexagon (target/hexagon) Only use branch_taken when packet has multi cof
  Hexagon (target/hexagon) Add overrides for S2_asr_r_r_sat/S2_asl_r_r_sat
  Hexagon (target/hexagon) Fix predicated assignment to .tmp and .cur
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/562d4af32ec2...4f9a4cd37eb2



reply via email to

[Prev in Thread] Current Thread [Next in Thread]