mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[ARC] Add tablegen definition for the Find Leading Set (FLS) instruction
Differential Revision: https://reviews.llvm.org/D106602
This commit is contained in:
parent
4e540995b1
commit
4866aceb76
@ -241,6 +241,8 @@ multiclass ArcBinaryEXT5Inst<bits<6> mincode, string opasm> :
|
|||||||
|
|
||||||
multiclass ArcUnaryGEN4Inst<bits<6> mincode, string opasm> :
|
multiclass ArcUnaryGEN4Inst<bits<6> mincode, string opasm> :
|
||||||
ArcUnaryInst<0b00100, mincode, opasm>;
|
ArcUnaryInst<0b00100, mincode, opasm>;
|
||||||
|
multiclass ArcUnaryEXT5Inst<bits<6> mincode, string opasm> :
|
||||||
|
ArcUnaryInst<0b00101, mincode, opasm>;
|
||||||
|
|
||||||
// Pattern generation for different instruction variants.
|
// Pattern generation for different instruction variants.
|
||||||
multiclass MultiPat<SDPatternOperator InFrag,
|
multiclass MultiPat<SDPatternOperator InFrag,
|
||||||
@ -298,6 +300,9 @@ defm : MultiPat<mulhu, MPYMU_rrr, MPYMU_rru6, MPYMU_rrlimm>;
|
|||||||
defm SEXB : ArcUnaryGEN4Inst<0b000101, "sexb">;
|
defm SEXB : ArcUnaryGEN4Inst<0b000101, "sexb">;
|
||||||
defm SEXH : ArcUnaryGEN4Inst<0b000110, "sexh">;
|
defm SEXH : ArcUnaryGEN4Inst<0b000110, "sexh">;
|
||||||
|
|
||||||
|
// Extension unary instruction definitions.
|
||||||
|
defm FLS : ArcUnaryEXT5Inst<0b010011, "fls">;
|
||||||
|
|
||||||
// General Unary Instruction fragments.
|
// General Unary Instruction fragments.
|
||||||
def : Pat<(sext_inreg i32:$a, i8), (SEXB_rr i32:$a)>;
|
def : Pat<(sext_inreg i32:$a, i8), (SEXB_rr i32:$a)>;
|
||||||
def : Pat<(sext_inreg i32:$a, i16), (SEXH_rr i32:$a)>;
|
def : Pat<(sext_inreg i32:$a, i16), (SEXH_rr i32:$a)>;
|
||||||
|
@ -60,3 +60,9 @@
|
|||||||
|
|
||||||
# CHECK: seteq %fp, %fp, -1
|
# CHECK: seteq %fp, %fp, -1
|
||||||
0xb8 0x23 0xff 0x3f
|
0xb8 0x23 0xff 0x3f
|
||||||
|
|
||||||
|
# CHECK: fls %r0, %r0
|
||||||
|
0x2f 0x28 0x13 0x00
|
||||||
|
|
||||||
|
# CHECK: fls.f %r0, %r0
|
||||||
|
0x2f 0x28 0x13 0x80
|
||||||
|
Loading…
Reference in New Issue
Block a user