[llvm] [Xtensa] Implement Code Density Option. (PR #119639)

Dániel Buga via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 12 15:02:07 PST 2024


================
@@ -0,0 +1,63 @@
+# RUN: llvm-mc %s -triple=xtensa -show-encoding --mattr=+density \
+# RUN:     | FileCheck -check-prefixes=CHECK,CHECK-INST %s
+
+.align	4
+LBL0:
+
+# Instruction format RRRN
+# CHECK-INST: add.n a2, a3, a4
+# CHECK: encoding: [0x4a,0x23]
+add.n a2, a3, a4
+
+# Instruction format RRRN
+# CHECK-INST: addi.n a2, a3, 3
+# CHECK: encoding: [0x3b,0x23]
+addi.n a2, a3, 3
----------------
bugadani wrote:

Would you please add a test case for imm=-1?

https://github.com/llvm/llvm-project/pull/119639


More information about the llvm-commits mailing list