|
From: | WANG Xuerui |
Subject: | Re: [PATCH v3 09/30] tcg/loongarch64: Implement tcg_out_mov and tcg_out_movi |
Date: | Thu, 23 Sep 2021 03:02:14 +0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:94.0) Gecko/20100101 Thunderbird/94.0a1 |
Hi Richard, On 9/23/21 02:39, Richard Henderson wrote:
Hmm, I think I'll have to look into this, but not now (it's again 3 am here)... I'll try to come up with something tomorrow.On 9/22/21 11:09 AM, WANG Xuerui wrote:+ if (pc_offset == (int32_t)pc_offset) { + tcg_target_long lo = sextreg(pc_offset, 0, 12); + tcg_target_long hi = pc_offset - lo; + tcg_out_opc_pcaddu12i(s, rd, hi >> 12); + tcg_out_opc_addi_d(s, rd, rd, lo);pc_offset = 0x7ffff800 will fail: lo = 0xfffffffffffff800 hi = 0x0000000080000000 but hi will be interpreted as negative by pcaddu12i.This is the same problem I pointed out with tcg_out_call, but with different constants.
r~
[Prev in Thread] | Current Thread | [Next in Thread] |