[PATCH] D123988: [LoongArch] Add basic floating-point instructions definition

Lu Weining via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 20 20:56:55 PDT 2022


SixWeining added a comment.

In D123988#3463732 <https://reviews.llvm.org/D123988#3463732>, @xen0n wrote:

> Welp I'm 1 hour late, quick hands... we could use some cleanups later though.

Sorry, I should wait for a while.



================
Comment at: llvm/test/MC/LoongArch/Basic/Float/d-invalid.s:3
+
+# CHECK: :[[#@LINE+1]]:1: error: instruction requires the following: LA64 Basic Integer and Privilege Instruction Set
+movgr2fr.d $fa0, $a0
----------------
xen0n wrote:
> `movgr2fr.d` is not part of the D extension?
Yes, movgr2fr.d is part of the D extension. But this test checks it is not available on LA32 as [[ https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#_movgr2fr_wd_movgr2frh_w | the document ]] says:

```
MOVGR2FR.D writes the 64-bit value of general register rj into floating-point register fd.
```

On LA32, general register is 32-bit but not 64-bit. So `MOVGR2FR.D` is not available.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123988/new/

https://reviews.llvm.org/D123988



More information about the llvm-commits mailing list