Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
173 changes: 171 additions & 2 deletions arch/armv7/arch_armv7.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1521,6 +1521,8 @@ class Armv7Architecture: public ArmCommonArchitecture
return "__vmax";
case ARMV7_INTRIN_VMIN:
return "__vmin";
case ARMV7_INTRIN_VPADD:
return "__vpadd";
case ARMV7_INTRIN_VPMAX:
return "__vpmax";
case ARMV7_INTRIN_VPMIN:
Expand All @@ -1535,6 +1537,16 @@ class Armv7Architecture: public ArmCommonArchitecture
return "__vext";
case ARMV7_INTRIN_VCGT:
return "__vcgt";
case ARMV7_INTRIN_VCGT_Q:
return "__vcgt_q";
case ARMV7_INTRIN_VCLT:
return "__vclt";
case ARMV7_INTRIN_VCLT_Q:
return "__vclt_q";
case ARMV7_INTRIN_VCGE:
return "__vcge";
case ARMV7_INTRIN_VCGE_Q:
return "__vcge_q";
case ARMV7_INTRIN_VCEQ:
return "__vceq";
case ARMV7_INTRIN_VTBL:
Expand Down Expand Up @@ -1581,12 +1593,42 @@ class Armv7Architecture: public ArmCommonArchitecture
return "__vst2";
case ARMV7_INTRIN_VST4:
return "__vst4";
case ARMV7_INTRIN_VSHL_Q:
return "__vshl_q";
case ARMV7_INTRIN_VSHL_IMM:
return "__vshl_imm";
case ARMV7_INTRIN_VSHL_IMM_Q:
return "__vshl_imm_q";
case ARMV7_INTRIN_VSHR_Q:
return "__vshr_q";
case ARMV7_INTRIN_VSHRN:
return "__vshrn";
case ARMV7_INTRIN_VTRN:
return "__vtrn";
case ARMV7_INTRIN_VTRN_Q:
return "__vtrn_q";
case ARMV7_INTRIN_VUZP:
return "__vuzp";
case ARMV7_INTRIN_VUZP_Q:
return "__vuzp_q";
case ARMV7_INTRIN_VZIP:
return "__vzip";
case ARMV7_INTRIN_VZIP_Q:
return "__vzip_q";
case ARMV7_INTRIN_VTST:
return "__vtst";
case ARMV7_INTRIN_VTST_Q:
return "__vtst_q";
case ARMV7_INTRIN_VSHL:
return "__vshl";
case ARMV7_INTRIN_VSHR:
return "__vshr";
case ARMV7_INTRIN_VSHLL:
return "__vshll";
case ARMV7_INTRIN_VMOVL:
return "__vmovl";
case ARMV7_INTRIN_VMOVN:
return "__vmovn";
case ARMV7_INTRIN_VBIF:
return "__vbif";
case ARMV7_INTRIN_VBIT:
Expand All @@ -1603,6 +1645,10 @@ class Armv7Architecture: public ArmCommonArchitecture
return "__vrecpe";
case ARMV7_INTRIN_VABS:
return "__vabs";
case ARMV7_INTRIN_VNEG:
return "__vneg";
case ARMV7_INTRIN_VNEG_Q:
return "__vneg_q";
case ARMV7_INTRIN_VCVT_FIXED:
return "__vcvt_fixed";
case ARMV7_INTRIN_VABS_Q:
Expand Down Expand Up @@ -1635,6 +1681,8 @@ class Armv7Architecture: public ArmCommonArchitecture
return "__vmlsl";
case ARMV7_INTRIN_VMUL:
return "__vmul";
case ARMV7_INTRIN_VMULL:
return "__vmull";
case ARMV7_INTRIN_VQDMULL:
return "__vqdmull";
case ARMV7_INTRIN_SSAT:
Expand Down Expand Up @@ -1836,13 +1884,19 @@ class Armv7Architecture: public ArmCommonArchitecture
ARMV7_INTRIN_VMINNM,
ARMV7_INTRIN_VMAX,
ARMV7_INTRIN_VMIN,
ARMV7_INTRIN_VPADD,
ARMV7_INTRIN_VPMAX,
ARMV7_INTRIN_VPMIN,
ARMV7_INTRIN_VREV16,
ARMV7_INTRIN_VREV32,
ARMV7_INTRIN_VREV64,
ARMV7_INTRIN_VEXT,
ARMV7_INTRIN_VCGT,
ARMV7_INTRIN_VCGT_Q,
ARMV7_INTRIN_VCLT,
ARMV7_INTRIN_VCLT_Q,
ARMV7_INTRIN_VCGE,
ARMV7_INTRIN_VCGE_Q,
ARMV7_INTRIN_VCEQ,
ARMV7_INTRIN_VTBL,
ARMV7_INTRIN_VTBX,
Expand All @@ -1865,8 +1919,23 @@ class Armv7Architecture: public ArmCommonArchitecture
ARMV7_INTRIN_VST2,
ARMV7_INTRIN_VST4,
ARMV7_INTRIN_VSHL,
ARMV7_INTRIN_VSHL_Q,
ARMV7_INTRIN_VSHL_IMM,
ARMV7_INTRIN_VSHL_IMM_Q,
ARMV7_INTRIN_VSHR_Q,
ARMV7_INTRIN_VSHRN,
ARMV7_INTRIN_VTRN,
ARMV7_INTRIN_VTRN_Q,
ARMV7_INTRIN_VUZP,
ARMV7_INTRIN_VUZP_Q,
ARMV7_INTRIN_VZIP,
ARMV7_INTRIN_VZIP_Q,
ARMV7_INTRIN_VTST,
ARMV7_INTRIN_VTST_Q,
ARMV7_INTRIN_VSHR,
ARMV7_INTRIN_VSHLL,
ARMV7_INTRIN_VMOVL,
ARMV7_INTRIN_VMOVN,
ARMV7_INTRIN_VBIF,
ARMV7_INTRIN_VBIT,
ARMV7_INTRIN_VBSL,
Expand All @@ -1875,6 +1944,8 @@ class Armv7Architecture: public ArmCommonArchitecture
ARMV7_INTRIN_VRHADD,
ARMV7_INTRIN_VRECPE,
ARMV7_INTRIN_VABS,
ARMV7_INTRIN_VNEG,
ARMV7_INTRIN_VNEG_Q,
ARMV7_INTRIN_VCVT_FIXED,
ARMV7_INTRIN_VABS_Q,
ARMV7_INTRIN_VCVT_FIXED_Q,
Expand All @@ -1891,6 +1962,7 @@ class Armv7Architecture: public ArmCommonArchitecture
ARMV7_INTRIN_VMLAL,
ARMV7_INTRIN_VMLSL,
ARMV7_INTRIN_VMUL,
ARMV7_INTRIN_VMULL,
ARMV7_INTRIN_VQDMULL,
ARMV7_INTRIN_SSAT,
ARMV7_INTRIN_SSAT16,
Expand Down Expand Up @@ -2191,7 +2263,6 @@ class Armv7Architecture: public ArmCommonArchitecture
case ARMV7_INTRIN_VMIN:
case ARMV7_INTRIN_VPMAX:
case ARMV7_INTRIN_VPMIN:
case ARMV7_INTRIN_VCGT:
case ARMV7_INTRIN_VHADD:
case ARMV7_INTRIN_VRHADD:
return {
Expand All @@ -2200,6 +2271,24 @@ class Armv7Architecture: public ArmCommonArchitecture
NameAndType("source1", Type::IntegerType(8, false)),
NameAndType("source2", Type::IntegerType(8, false)),
};
case ARMV7_INTRIN_VCGT:
case ARMV7_INTRIN_VCGT_Q:
case ARMV7_INTRIN_VCGE:
case ARMV7_INTRIN_VCGE_Q:
case ARMV7_INTRIN_VCLT:
case ARMV7_INTRIN_VCLT_Q:
{
size_t vectorSize = intrinsic == ARMV7_INTRIN_VCGE_Q || intrinsic == ARMV7_INTRIN_VCGT_Q
|| intrinsic == ARMV7_INTRIN_VCLT_Q ? 16 : 8;
return {
NameAndType("size", Type::IntegerType(1, false)),
NameAndType("is_unsigned", Type::BoolType()),
NameAndType("is_float", Type::BoolType()),
NameAndType("source1", Type::IntegerType(vectorSize, false)),
NameAndType("source2", Type::IntegerType(vectorSize, false)),
};
}
case ARMV7_INTRIN_VPADD:
case ARMV7_INTRIN_VCEQ:
return {
NameAndType("size", Type::IntegerType(1, false)),
Expand All @@ -2208,13 +2297,15 @@ class Armv7Architecture: public ArmCommonArchitecture
NameAndType("source2", Type::IntegerType(8, false)),
};
case ARMV7_INTRIN_VRECPE:
case ARMV7_INTRIN_VNEG:
case ARMV7_INTRIN_VABS:
case ARMV7_INTRIN_VABS_Q:
case ARMV7_INTRIN_VNEG_Q:
return {
NameAndType("size", Type::IntegerType(1, false)),
NameAndType("is_float", Type::BoolType()),
NameAndType("source", Type::IntegerType(
intrinsic == ARMV7_INTRIN_VABS_Q ? 16 : 8, false)),
(intrinsic == ARMV7_INTRIN_VABS_Q || intrinsic == ARMV7_INTRIN_VNEG_Q) ? 16 : 8, false)),
};
case ARMV7_INTRIN_VCVT_FIXED:
case ARMV7_INTRIN_VCVT_FIXED_Q:
Expand Down Expand Up @@ -2319,6 +2410,39 @@ class Armv7Architecture: public ArmCommonArchitecture
NameAndType("source1", Type::IntegerType(16, false)),
NameAndType("source2", Type::IntegerType(16, false)),
};
case ARMV7_INTRIN_VSHL_Q:
case ARMV7_INTRIN_VSHR_Q:
return {
NameAndType("size", Type::IntegerType(1, false)),
NameAndType("is_unsigned", Type::BoolType()),
NameAndType("source", Type::IntegerType(16, false)),
NameAndType("shift", Type::IntegerType(intrinsic == ARMV7_INTRIN_VSHL_Q ? 16 : 8, false)),
};
case ARMV7_INTRIN_VTST:
case ARMV7_INTRIN_VTST_Q:
case ARMV7_INTRIN_VZIP:
case ARMV7_INTRIN_VZIP_Q:
case ARMV7_INTRIN_VUZP:
case ARMV7_INTRIN_VUZP_Q:
case ARMV7_INTRIN_VTRN:
case ARMV7_INTRIN_VTRN_Q:
{
size_t size = (intrinsic == ARMV7_INTRIN_VTRN_Q || intrinsic == ARMV7_INTRIN_VTST_Q
|| intrinsic == ARMV7_INTRIN_VUZP_Q || intrinsic == ARMV7_INTRIN_VZIP_Q) ? 16 : 8;
return {
NameAndType("size", Type::IntegerType(1, false)),
NameAndType("source1", Type::IntegerType(size, false)),
NameAndType("source2", Type::IntegerType(size, false)),
};
}
case ARMV7_INTRIN_VSHL_IMM:
case ARMV7_INTRIN_VSHL_IMM_Q:
case ARMV7_INTRIN_VSHRN:
return {
NameAndType("size", Type::IntegerType(1, false)),
NameAndType("source", Type::IntegerType(intrinsic == ARMV7_INTRIN_VSHL_IMM ? 8 : 16, false)),
NameAndType("shift", Type::IntegerType(1, false)),
};
case ARMV7_INTRIN_VRSHR:
case ARMV7_INTRIN_VRSHL:
case ARMV7_INTRIN_VSHL:
Expand All @@ -2330,6 +2454,17 @@ class Armv7Architecture: public ArmCommonArchitecture
NameAndType("source", Type::IntegerType(8, false)),
NameAndType("shift", Type::IntegerType(8, false)),
};
case ARMV7_INTRIN_VMOVL:
return {
NameAndType("size", Type::IntegerType(1, false)),
NameAndType("is_unsigned", Type::BoolType()),
NameAndType("source", Type::IntegerType(8, false)),
};
case ARMV7_INTRIN_VMOVN:
return {
NameAndType("size", Type::IntegerType(1, false)),
NameAndType("source", Type::IntegerType(16, false)),
};
case ARMV7_INTRIN_VBIF:
case ARMV7_INTRIN_VBIT:
case ARMV7_INTRIN_VBSL:
Expand Down Expand Up @@ -2424,6 +2559,15 @@ class Armv7Architecture: public ArmCommonArchitecture
NameAndType("scalar", Type::IntegerType(8, false)),
NameAndType("index", Type::IntegerType(1, false)),
};
case ARMV7_INTRIN_VMULL:
return {
NameAndType("size", Type::IntegerType(1, false)),
NameAndType("is_unsigned", Type::BoolType()),
NameAndType("is_polynomial", Type::BoolType()),
NameAndType("source1", Type::IntegerType(8, false)),
NameAndType("source2", Type::IntegerType(8, false)),
NameAndType("index", Type::IntegerType(1, false)),
};
case ARMV7_INTRIN_VMUL:
case ARMV7_INTRIN_VQDMULL:
return {
Expand Down Expand Up @@ -2541,6 +2685,13 @@ class Armv7Architecture: public ArmCommonArchitecture
case ARMV7_INTRIN_SMLALD:
case ARMV7_INTRIN_SMLALDX:
return { Type::IntegerType(4, false), Type::IntegerType(4, false) };
case ARMV7_INTRIN_VZIP_Q:
case ARMV7_INTRIN_VUZP_Q:
case ARMV7_INTRIN_VTRN_Q:
return { Type::IntegerType(16, false), Type::IntegerType(16, false) };
case ARMV7_INTRIN_VZIP:
case ARMV7_INTRIN_VUZP:
case ARMV7_INTRIN_VTRN:
case ARMV7_INTRIN_VLD2:
return { Type::IntegerType(8, false), Type::IntegerType(8, false) };
case ARMV7_INTRIN_VLD4:
Expand All @@ -2557,24 +2708,31 @@ class Armv7Architecture: public ArmCommonArchitecture
case ARMV7_INTRIN_VSRI:
case ARMV7_INTRIN_VSLI:
case ARMV7_INTRIN_VRADDHN:
case ARMV7_INTRIN_VTST:
case ARMV7_INTRIN_VSHL_IMM:
case ARMV7_INTRIN_VSHRN:
case ARMV7_INTRIN_VSHL:
case ARMV7_INTRIN_VSHR:
case ARMV7_INTRIN_VMAX:
case ARMV7_INTRIN_VMIN:
case ARMV7_INTRIN_VPADD:
case ARMV7_INTRIN_VPMAX:
case ARMV7_INTRIN_VPMIN:
case ARMV7_INTRIN_VREV16:
case ARMV7_INTRIN_VREV32:
case ARMV7_INTRIN_VREV64:
case ARMV7_INTRIN_VEXT:
case ARMV7_INTRIN_VCGT:
case ARMV7_INTRIN_VCGE:
case ARMV7_INTRIN_VCLT:
case ARMV7_INTRIN_VCEQ:
case ARMV7_INTRIN_VADD:
case ARMV7_INTRIN_VSUB:
case ARMV7_INTRIN_VQADD:
case ARMV7_INTRIN_VHADD:
case ARMV7_INTRIN_VRHADD:
case ARMV7_INTRIN_VRECPE:
case ARMV7_INTRIN_VNEG:
case ARMV7_INTRIN_VABS:
case ARMV7_INTRIN_VCVT_FIXED:
case ARMV7_INTRIN_VQSHL:
Expand All @@ -2585,15 +2743,24 @@ class Armv7Architecture: public ArmCommonArchitecture
case ARMV7_INTRIN_VQRSHRUN:
case ARMV7_INTRIN_VQMOVN:
case ARMV7_INTRIN_VQMOVUN:
case ARMV7_INTRIN_VMOVN:
case ARMV7_INTRIN_VMLA:
case ARMV7_INTRIN_VMLS:
case ARMV7_INTRIN_VMUL:
case ARMV7_INTRIN_VBIF:
case ARMV7_INTRIN_VBIT:
case ARMV7_INTRIN_VBSL:
return { Type::IntegerType(8, false) };
case ARMV7_INTRIN_VTST_Q:
case ARMV7_INTRIN_VSHL_Q:
case ARMV7_INTRIN_VSHL_IMM_Q:
case ARMV7_INTRIN_VSHR_Q:
case ARMV7_INTRIN_VABS_Q:
case ARMV7_INTRIN_VNEG_Q:
case ARMV7_INTRIN_VCVT_FIXED_Q:
case ARMV7_INTRIN_VCGE_Q:
case ARMV7_INTRIN_VCGT_Q:
case ARMV7_INTRIN_VCLT_Q:
return { Type::IntegerType(16, false) };
case ARMV7_INTRIN_VABAL:
case ARMV7_INTRIN_VABDL:
Expand All @@ -2603,6 +2770,8 @@ class Armv7Architecture: public ArmCommonArchitecture
case ARMV7_INTRIN_VMLAL:
case ARMV7_INTRIN_VMLSL:
case ARMV7_INTRIN_VQDMULL:
case ARMV7_INTRIN_VMOVL:
case ARMV7_INTRIN_VMULL:
return { Type::IntegerType(16, false) };
default:
return vector<Confidence<Ref<Type>>>();
Expand Down
Loading
Loading