|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [PATCH v5 09/30] tcg/loongarch64: Implement tcg_out_mov and tcg_out_movi |
Date: | Sat, 25 Sep 2021 19:05:51 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 |
On 9/25/21 16:04, Richard Henderson wrote:
On 9/25/21 5:54 AM, Philippe Mathieu-Daudé wrote:+ /* High bits must be set; load with lu12i.w + optional ori. */ + tcg_target_long hi12 = sextreg(val, 12, 20);
+ tcg_out_opc_lu12i_w(s, rd, hi12); + if (lo != 0) { + tcg_out_opc_ori(s, rd, rd, lo & 0xfff);Isn't lo already 12-bit? Why the mask?lo was extracted signed, for addi; ori wants the value unsigned. The value range asserts in tcg_out_opc_* will notice the difference.
I indeed missed tcg_target_long, thanks.
[Prev in Thread] | Current Thread | [Next in Thread] |