diff options
| author | Alex Bradbury <asb@lowrisc.org> | 2018-06-20 18:42:25 +0000 |
|---|---|---|
| committer | Alex Bradbury <asb@lowrisc.org> | 2018-06-20 18:42:25 +0000 |
| commit | fafdebcfcb621e213edefadb84766e196b0c14b6 (patch) | |
| tree | cf0b66fc4ad3eb531130eb69996c77d8756a7b6f /llvm | |
| parent | 6f78be66e6182268d44ec44304abfbbd79d96d13 (diff) | |
| download | bcm5719-llvm-fafdebcfcb621e213edefadb84766e196b0c14b6.tar.gz bcm5719-llvm-fafdebcfcb621e213edefadb84766e196b0c14b6.zip | |
[RISCV] Accept fmv.s.x and fmv.x.s as mnemonic aliases for fmv.w.x and fmv.x.w
These instructions were renamed in version 2.2 of the user-level ISA spec, but
the old name should also be accepted by standard tools.
llvm-svn: 335154
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/Target/RISCV/RISCVInstrInfoF.td | 5 | ||||
| -rw-r--r-- | llvm/test/MC/RISCV/rvf-aliases-valid.s | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoF.td b/llvm/lib/Target/RISCV/RISCVInstrInfoF.td index 12b1d9a857f..6d7c59becf2 100644 --- a/llvm/lib/Target/RISCV/RISCVInstrInfoF.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfoF.td @@ -226,6 +226,11 @@ def : InstAlias<"fsflags $rd, $rs", (CSRRW GPR:$rd, 0x001, GPR:$rs)>; def : InstAlias<"fsflags $rs", (CSRRW X0, 0x001, GPR:$rs), 2>; def : InstAlias<"fsflagsi $rd, $imm", (CSRRWI GPR:$rd, 0x001, uimm5:$imm)>; def : InstAlias<"fsflagsi $imm", (CSRRWI X0, 0x001, uimm5:$imm), 2>; + +// fmv.w.x and fmv.x.w were previously known as fmv.s.x and fmv.x.s. Both +// spellings should be supported by standard tools. +def : MnemonicAlias<"fmv.s.x", "fmv.w.x">; +def : MnemonicAlias<"fmv.x.s", "fmv.x.w">; } // Predicates = [HasStdExtF] //===----------------------------------------------------------------------===// diff --git a/llvm/test/MC/RISCV/rvf-aliases-valid.s b/llvm/test/MC/RISCV/rvf-aliases-valid.s index c6da9b39909..f22b3cc7274 100644 --- a/llvm/test/MC/RISCV/rvf-aliases-valid.s +++ b/llvm/test/MC/RISCV/rvf-aliases-valid.s @@ -87,6 +87,13 @@ fsflagsi x14, 0x1d # CHECK-ALIAS: fsflagsi 28 fsflagsi 0x1c +# CHECK-INST: fmv.x.w a2, fs7 +# CHECK-ALIAS: fmv.x.w a2, fs7 +fmv.x.s a2, fs7 +# CHECK-INST: fmv.w.x ft1, a6 +# CHECK-ALIAS: fmv.w.x ft1, a6 +fmv.s.x ft1, a6 + ##===----------------------------------------------------------------------===## ## Aliases which omit the rounding mode. ##===----------------------------------------------------------------------===## |

