summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/RISCV
diff options
context:
space:
mode:
authorAlex Bradbury <asb@lowrisc.org>2018-08-08 14:53:45 +0000
committerAlex Bradbury <asb@lowrisc.org>2018-08-08 14:53:45 +0000
commit07224dfb475a95c6e8dd1e931cf8a33213d79f34 (patch)
tree27a7213b2c0c5d583959d669aaa5eb8bca9500a8 /llvm/lib/Target/RISCV
parent164e8b0b5cbbcd31dcc78d422e8e564cd1b356b1 (diff)
downloadbcm5719-llvm-07224dfb475a95c6e8dd1e931cf8a33213d79f34.tar.gz
bcm5719-llvm-07224dfb475a95c6e8dd1e931cf8a33213d79f34.zip
[RISCV] Add mnemonic alias: move, sbreak and scall.
Further improve compatibility with the GNU assembler. Differential Revision: https://reviews.llvm.org/D50217 Patch by Kito Cheng. llvm-svn: 339255
Diffstat (limited to 'llvm/lib/Target/RISCV')
-rw-r--r--llvm/lib/Target/RISCV/RISCVInstrInfo.td8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfo.td b/llvm/lib/Target/RISCV/RISCVInstrInfo.td
index 7327d42138e..dd19e31d7ca 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfo.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfo.td
@@ -581,6 +581,14 @@ def : InstAlias<"sltu $rd, $rs1, $imm12",
(SLTIU GPR:$rd, GPR:$rs1, simm12:$imm12)>;
}
+def : MnemonicAlias<"move", "mv">;
+
+// The SCALL and SBREAK instructions wererenamed to ECALL and EBREAK in
+// version 2.1 of the user-level ISA. Like the GNU toolchain, we still accept
+// the old name for backwards compatibility.
+def : MnemonicAlias<"scall", "ecall">;
+def : MnemonicAlias<"sbreak", "ebreak">;
+
//===----------------------------------------------------------------------===//
// Pseudo-instructions and codegen patterns
//
OpenPOWER on IntegriCloud