On 9/20/21 1:04 AM, WANG Xuerui wrote:
+ } else if (TCG_TARGET_REG_BITS == 32 || offset == (int32_t)offset) { + /* long jump: +/- 2GiB */ + tcg_out_opc_pcaddu12i(s, TCG_REG_TMP0, 0); + tcg_out_opc_jirl(s, link, TCG_REG_TMP0, 0); + ret = reloc_call(s->code_ptr - 2, arg); + tcg_debug_assert(ret == true);
Just inline reloc_call here, so that you can provide the correct offsets to the pcadd and jirl instructions directly. The assert will vanish, because you've already done the range check with "offset == (int32_t)offset".
r~