Hexagon (target/hexagon) Only use branch_taken when packet has multi cof
authorTaylor Simpson <tsimpson@quicinc.com>
Tue, 8 Nov 2022 16:28:59 +0000 (08:28 -0800)
committerTaylor Simpson <tsimpson@quicinc.com>
Fri, 16 Dec 2022 18:10:28 +0000 (10:10 -0800)
commitfb67c2bf24f4399bb0347580324740409e1bb2d7
tree6ecc49dca5f7520bd2ebe8d804f732e107565eb0
parent8e8a85c14eed845346f64431da6417869f88c470
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>
target/hexagon/decode.c
target/hexagon/gen_helper_funcs.py
target/hexagon/gen_helper_protos.py
target/hexagon/gen_tcg_funcs.py
target/hexagon/hex_common.py
target/hexagon/insn.h
target/hexagon/macros.h
target/hexagon/op_helper.c
target/hexagon/translate.c