[PATCH] D50217: [RISCV] Add mnemonic alias: move, sbreak and scall.
Alex Bradbury via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 8 07:54:23 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL339255: [RISCV] Add mnemonic alias: move, sbreak and scall. (authored by asb, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D50217?vs=158902&id=159723#toc
Repository:
rL LLVM
https://reviews.llvm.org/D50217
Files:
llvm/trunk/lib/Target/RISCV/RISCVInstrInfo.td
llvm/trunk/test/MC/RISCV/rvi-aliases-valid.s
Index: llvm/trunk/lib/Target/RISCV/RISCVInstrInfo.td
===================================================================
--- llvm/trunk/lib/Target/RISCV/RISCVInstrInfo.td
+++ llvm/trunk/lib/Target/RISCV/RISCVInstrInfo.td
@@ -581,6 +581,14 @@
(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
//
Index: llvm/trunk/test/MC/RISCV/rvi-aliases-valid.s
===================================================================
--- llvm/trunk/test/MC/RISCV/rvi-aliases-valid.s
+++ llvm/trunk/test/MC/RISCV/rvi-aliases-valid.s
@@ -35,6 +35,9 @@
# CHECK-INST: addi t6, zero, 0
# CHECK-ALIAS: mv t6, zero
mv x31, zero
+# CHECK-INST: addi a2, a3, 0
+# CHECK-ALIAS: mv a2, a3
+move a2,a3
# CHECK-INST: xori t6, ra, -1
# CHECK-ALIAS: not t6, ra
not x31, x1
@@ -193,3 +196,11 @@
# CHECK-INST: sltiu a2, a3, 4
# CHECK-ALIAS: sltiu a2, a3, 4
sltu a2,a3,4
+
+# CHECK-INST: ebreak
+# CHECK-ALIAS: ebreak
+sbreak
+
+# CHECK-INST: ecall
+# CHECK-ALIAS: ecall
+scall
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50217.159723.patch
Type: text/x-patch
Size: 1413 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180808/e719fe38/attachment.bin>
More information about the llvm-commits
mailing list