[PATCH] D50217: [RISCV] Add mnemonic alias: move, sbreak and scall.
Kito Cheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 2 20:12:01 PDT 2018
kito-cheng updated this revision to Diff 158902.
kito-cheng added a comment.
Rearrange order for testcase.
https://reviews.llvm.org/D50217
Files:
lib/Target/RISCV/RISCVInstrInfo.td
test/MC/RISCV/rvi-aliases-valid.s
Index: test/MC/RISCV/rvi-aliases-valid.s
===================================================================
--- test/MC/RISCV/rvi-aliases-valid.s
+++ 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
Index: lib/Target/RISCV/RISCVInstrInfo.td
===================================================================
--- lib/Target/RISCV/RISCVInstrInfo.td
+++ 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 have been renamed to ECALL and EBREAK
+// User-Level ISA 2.1.
+// We still accpet the old name for backward compatibility like GNU toolchain.
+def : MnemonicAlias<"scall", "ecall">;
+def : MnemonicAlias<"sbreak", "ebreak">;
+
//===----------------------------------------------------------------------===//
// Pseudo-instructions and codegen patterns
//
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50217.158902.patch
Type: text/x-patch
Size: 1329 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180803/fa8c7077/attachment.bin>
More information about the llvm-commits
mailing list