Add NVExtFrm to represent NEON Vector Extract Instructions, that uses Inst{11-8}

to encode the byte location of the extracted result in the concatenation of the
operands, from the least significant end.

Modify VEXTd and VEXTq classes to use the format.

llvm-svn: 99659
This commit is contained in:
Johnny Chen 2010-03-26 22:28:56 +00:00
parent 574907ed88
commit 0b57de3c4c
2 changed files with 11 additions and 10 deletions

View File

@ -68,6 +68,7 @@ def N2RegVShLFrm : Format<36>;
def N2RegVShRFrm : Format<37>; def N2RegVShRFrm : Format<37>;
def N3RegFrm : Format<38>; def N3RegFrm : Format<38>;
def N3RegVShFrm : Format<39>; def N3RegVShFrm : Format<39>;
def NVExtFrm : Format<40>;
// Misc flags. // Misc flags.

View File

@ -3253,16 +3253,16 @@ def VREV16q8 : VREV16Q<0b00, "vrev16", "8", v16i8>;
// VEXT : Vector Extract // VEXT : Vector Extract
class VEXTd<string OpcodeStr, string Dt, ValueType Ty> class VEXTd<string OpcodeStr, string Dt, ValueType Ty>
: N3V<0,1,0b11,{?,?,?,?},0,0, (outs DPR:$dst), : N3Vf<0,1,0b11,{?,?,?,?},0,0, (outs DPR:$dst),
(ins DPR:$lhs, DPR:$rhs, i32imm:$index), IIC_VEXTD, (ins DPR:$lhs, DPR:$rhs, i32imm:$index), NVExtFrm,
OpcodeStr, Dt, "$dst, $lhs, $rhs, $index", "", IIC_VEXTD, OpcodeStr, Dt, "$dst, $lhs, $rhs, $index", "",
[(set DPR:$dst, (Ty (NEONvext (Ty DPR:$lhs), [(set DPR:$dst, (Ty (NEONvext (Ty DPR:$lhs),
(Ty DPR:$rhs), imm:$index)))]>; (Ty DPR:$rhs), imm:$index)))]>;
class VEXTq<string OpcodeStr, string Dt, ValueType Ty> class VEXTq<string OpcodeStr, string Dt, ValueType Ty>
: N3V<0,1,0b11,{?,?,?,?},1,0, (outs QPR:$dst), : N3Vf<0,1,0b11,{?,?,?,?},1,0, (outs QPR:$dst),
(ins QPR:$lhs, QPR:$rhs, i32imm:$index), IIC_VEXTQ, (ins QPR:$lhs, QPR:$rhs, i32imm:$index), NVExtFrm,
OpcodeStr, Dt, "$dst, $lhs, $rhs, $index", "", IIC_VEXTQ, OpcodeStr, Dt, "$dst, $lhs, $rhs, $index", "",
[(set QPR:$dst, (Ty (NEONvext (Ty QPR:$lhs), [(set QPR:$dst, (Ty (NEONvext (Ty QPR:$lhs),
(Ty QPR:$rhs), imm:$index)))]>; (Ty QPR:$rhs), imm:$index)))]>;