[PATCH] D140685: [LoongArch] Add intrinsics for MOVFCSR2GR and MOVGR2FCSR instructions
WÁNG Xuěruì via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 3 02:37:30 PST 2023
xen0n accepted this revision.
xen0n added a comment.
In D140685#4017381 <https://reviews.llvm.org/D140685#4017381>, @xen0n wrote:
>> MOVGR2FCSR modifies the value of the software writable field
>> corresponding to the FCSR (floating-point control and status
>> register) fcsr according to the value of the lower 32 bits of
>> the GR (general purpose register) rj.
>
> The description of `movgr2fcsr` is incorrect, it implies `GPR[rj]`is read, but in fact it's only the //`ui5` immediate in `rj` slot//, i.e. `FCSR[rj]`. I didn't look very closely but the test case changes seem good.
On a closer look it turns out the description is correct after all, the description is very much non-intuitive (uses just `fcsr` without any position marker) so I've mistaken the GPR operand for the FCSR slot. This is very unfortunate but luckily users of the intrinsics won't have to think about it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140685/new/
https://reviews.llvm.org/D140685
More information about the cfe-commits
mailing list