On 10/15/22 19:27, Qi Hu wrote:
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".

Cc: Richard Henderson<richard.hender...@linaro.org>
Signed-off-by: Qi Hu<h...@loongson.cn>
---
Changes since v3:
- Fix the offset check error which is pointed by WANG Xuerui.
- Use TMP0 instead of T0.
- Remove useless block due to direct jump support.
- Add some assertions.
---
  tcg/loongarch64/tcg-target.c.inc | 48 +++++++++++++++++++++++++++++---
  tcg/loongarch64/tcg-target.h     |  9 ++++--
  2 files changed, 50 insertions(+), 7 deletions(-)

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>

r~

Reply via email to