|
From: | Richard Henderson |
Subject: | Re: [PATCH] disas/riscv: Further correction to LUI disassembly |
Date: | Mon, 31 Jul 2023 13:37:21 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 |
On 7/31/23 11:33, Richard Bagley wrote:
The recent commit 36df75a0a9 corrected one aspect of LUI disassembly by recovering the immediate argument from the result of LUI with a shift right by 12. However, the shift right will left-fill with the sign. By applying a mask we recover an unsigned representation of the 20-bit field (which includes a sign bit).
Why would you want that? Surely lui r1, -1 is more accurate than lui r1, 0xfffff r~
[Prev in Thread] | Current Thread | [Next in Thread] |