tcg/loongarch64: Add direct jump support
authorQi Hu <huqi@loongson.cn>
Sat, 15 Oct 2022 09:27:54 +0000 (17:27 +0800)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 25 Oct 2022 12:01:14 +0000 (22:01 +1000)
commitf072a1ae7fb47db75eb3c6b960759c908884f585
tree7fa17e262853d28740798596b4434362d0db02c8
parent0585105c806d3bf301eebc33115a0790fcfc1d9c
tcg/loongarch64: Add direct jump support

Similar to the ARM64, LoongArch has PC-relative instructions such as
PCADDU18I. These instructions can be used to support direct jump for
LoongArch. Additionally, if instruction "B offset" can cover the target
address(target is within ±128MB range), a single "B offset" plus a nop
will be used by "tb_target_set_jump_target".

Signed-off-by: Qi Hu <huqi@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: WANG Xuerui <git@xen0n.name>
Message-Id: <20221015092754.91971-1-huqi@loongson.cn>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
tcg/loongarch64/tcg-target.c.inc
tcg/loongarch64/tcg-target.h