[PATCH] D106602: Add tablegen definition for the Find Leading Set (FLS) instruction for the ARC backend

Mark Schimmel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 22 17:45:19 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG51d8e67e88d1: [ARC] Add tablegen definition for the Find Leading Set (FLS) instruction (authored by thomasjohns, committed by marksl).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106602/new/

https://reviews.llvm.org/D106602

Files:
  llvm/lib/Target/ARC/ARCInstrInfo.td
  llvm/test/MC/Disassembler/ARC/misc.txt


Index: llvm/test/MC/Disassembler/ARC/misc.txt
===================================================================
--- llvm/test/MC/Disassembler/ARC/misc.txt
+++ llvm/test/MC/Disassembler/ARC/misc.txt
@@ -60,3 +60,9 @@
 
 # CHECK: seteq %fp, %fp, -1
 0xb8 0x23 0xff 0x3f 
+
+# CHECK: fls %r0, %r0
+0x2f 0x28 0x13 0x00
+
+# CHECK: fls.f %r0, %r0
+0x2f 0x28 0x13 0x80
Index: llvm/lib/Target/ARC/ARCInstrInfo.td
===================================================================
--- llvm/lib/Target/ARC/ARCInstrInfo.td
+++ llvm/lib/Target/ARC/ARCInstrInfo.td
@@ -241,6 +241,8 @@
 
 multiclass ArcUnaryGEN4Inst<bits<6> mincode, string opasm> :
   ArcUnaryInst<0b00100, mincode, opasm>;
+multiclass ArcUnaryEXT5Inst<bits<6> mincode, string opasm> :
+  ArcUnaryInst<0b00101, mincode, opasm>;
 
 // Pattern generation for different instruction variants.
 multiclass MultiPat<SDPatternOperator InFrag,
@@ -298,6 +300,9 @@
 defm SEXB : ArcUnaryGEN4Inst<0b000101, "sexb">;
 defm SEXH : ArcUnaryGEN4Inst<0b000110, "sexh">;
 
+// Extension unary instruction definitions.
+defm FLS : ArcUnaryEXT5Inst<0b010011, "fls">;
+
 // General Unary Instruction fragments.
 def : Pat<(sext_inreg i32:$a, i8), (SEXB_rr i32:$a)>;
 def : Pat<(sext_inreg i32:$a, i16), (SEXH_rr i32:$a)>;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106602.361047.patch
Type: text/x-patch
Size: 1260 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210723/a6d3ea58/attachment.bin>


More information about the llvm-commits mailing list