]> git.proxmox.com Git - mirror_qemu.git/commit - target/hexagon/gen_tcg.h
Hexagon (target/hexagon) Use direct block chaining for tight loops
authorTaylor Simpson <tsimpson@quicinc.com>
Thu, 10 Nov 2022 17:49:35 +0000 (09:49 -0800)
committerTaylor Simpson <tsimpson@quicinc.com>
Fri, 16 Dec 2022 18:10:28 +0000 (10:10 -0800)
commit564b2040a683bfc7169f14f75ac7a753378fbd8f
treef5f3204eadc26fedb59bfa5571618667b34615b8
parent1b9a7f2a1384d14dbb82862a612188797d398fe0
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>
target/hexagon/cpu.h
target/hexagon/gen_tcg.h
target/hexagon/genptr.c
target/hexagon/translate.c
target/hexagon/translate.h