Ghidra is a software reverse engineering (SRE) framework
GT-3394: Fixed ARM instruction issues
ghidorahrex389387c9d3f1
diff --git a/Ghidra/Processors/ARM/data/languages/ARM6_be.slaspec b/Ghidra/Processors/ARM/data/languages/ARM6_be.slaspecindex 14eef6b1ac..02983a4c78 100644--- a/Ghidra/Processors/ARM/data/languages/ARM6_be.slaspec+++ b/Ghidra/Processors/ARM/data/languages/ARM6_be.slaspec@@ -6,7 +6,7 @@@define VERSION_6 ""@define VERSION_6K ""@define VERSION_6T2 ""-#@define VFPv2+@define VFPv2 ""@include "ARM.sinc"diff --git a/Ghidra/Processors/ARM/data/languages/ARM6_le.slaspec b/Ghidra/Processors/ARM/data/languages/ARM6_le.slaspecindex 5de29327a2..f45a510134 100644--- a/Ghidra/Processors/ARM/data/languages/ARM6_le.slaspec+++ b/Ghidra/Processors/ARM/data/languages/ARM6_le.slaspec@@ -6,7 +6,7 @@@define VERSION_6 ""@define VERSION_6K ""@define VERSION_6T2 ""-#@define VFPv2+@define VFPv2 ""@include "ARM.sinc"diff --git a/Ghidra/Processors/ARM/data/languages/ARMTHUMBinstructions.sinc b/Ghidra/Processors/ARM/data/languages/ARMTHUMBinstructions.sincindex ec24f94627..d4121a3df0 100644--- a/Ghidra/Processors/ARM/data/languages/ARMTHUMBinstructions.sinc+++ b/Ghidra/Processors/ARM/data/languages/ARMTHUMBinstructions.sinc@@ -1385,8 +1385,7 @@ macro th_set_carry_for_asr(op1,shift_count) {:hlt immed6 is TMode=1 & op6=0b1011101010 & immed6{- pc = software_hlt(immed6:4);- goto [pc];+ software_hlt(immed6:4);}:bkpt immed8 is TMode=1 & ItCond & op8=0xbe & immed8@@ -1412,16 +1411,14 @@ macro th_set_carry_for_asr(op1,shift_count) {:udf^ItCond "#"thc0007 is TMode=1 & ItCond & op8 = 0xde & thc0007{build ItCond;- pc = software_udf(thc0007:4);- goto [pc];+ software_udf(thc0007:4);}@endif:udf^ItCond "#"tmp is TMode=1 & ItCond & op4=0xf7f & thc0003; op12=0xa & thc0011 [tmp = thc0003 << 12 | thc0011;]{build ItCond;- pc = software_udf(tmp:4);- goto [pc];+ software_udf(tmp:4);}@endif # VERSION_5diff --git a/Ghidra/Processors/ARM/data/languages/ARMinstructions.sinc b/Ghidra/Processors/ARM/data/languages/ARMinstructions.sincindex e6a2210fe9..9b14a4236d 100644--- a/Ghidra/Processors/ARM/data/languages/ARMinstructions.sinc+++ b/Ghidra/Processors/ARM/data/languages/ARMinstructions.sinc@@ -2683,13 +2683,13 @@ ArmPCRelImmed12: reloff is U23=0 & immed & rotatecoprocessor_loadlong(t_cpn,CRd,addrmode5);}-:ldm^COND^mdir reglist is $(AMODE) & COND & c2527=4 & mdir & L20=1 & c1515=0 & reglist+:ldm^mdir^COND reglist is $(AMODE) & COND & c2527=4 & mdir & L20=1 & c1515=0 & reglist{build COND;build reglist;}-:ldm^COND^mdir reglist is $(AMODE) & COND & c2527=4 & mdir & L20=1 & c1515=1 & reglist+:ldm^mdir^COND reglist is $(AMODE) & COND & c2527=4 & mdir & L20=1 & c1515=1 & reglist{build COND;build reglist;@@ -5339,7 +5339,7 @@ armEndianNess: "BE" is c0031=0xf1010200 { export 1:1; }coprocessor_storelong(t_cpn,CRd,addrmode5);}-:stm^COND^mdir reglist is $(AMODE) & COND & c2527=4 & mdir & L20=0 & reglist+:stm^mdir^COND reglist is $(AMODE) & COND & c2527=4 & mdir & L20=0 & reglist{build COND;build reglist;@@ -5387,7 +5387,7 @@ armEndianNess: "BE" is c0031=0xf1010200 { export 1:1; }@if defined(VERSION_5E)-:strd^COND Rd,Rd2,addrmode3 is $(AMODE) & COND & c2527=0 & c0407=0xf & c1212=0 & L20=0 & Rd & Rd2 & addrmode3+:strd^COND Rd,Rd2,addrmode3 is $(AMODE) & COND & c2527=0 & c0407=0xf & L20=0 & Rd & Rd2 & addrmode3{build COND;build addrmode3;diff --git a/Ghidra/Processors/ARM/data/languages/ARMneon.sinc b/Ghidra/Processors/ARM/data/languages/ARMneon.sincindex 0b81791ac7..8f55812613 100644--- a/Ghidra/Processors/ARM/data/languages/ARMneon.sinc+++ b/Ghidra/Processors/ARM/data/languages/ARMneon.sinc@@ -269,12 +269,16 @@ udt: "u" is TMode=0 & c2424=1 { tmp:1 = 1; export tmp; }udt: "s" is TMode=1 & thv_c2828=0 { tmp:1 = 0; export tmp; }udt: "u" is TMode=1 & thv_c2828=1 { tmp:1 = 1; export tmp; }-udt7: "s" is TMode=0 & c0707=0 { tmp:1 = 0; export tmp; }udt7: "u" is TMode=0 & c0707=1 { tmp:1 = 1; export tmp; }udt7: "s" is TMode=1 & thv_c0707=0 { tmp:1 = 0; export tmp; }udt7: "u" is TMode=1 & thv_c0707=1 { tmp:1 = 1; export tmp; }+fdt: "u" is TMode=0 & c0808=0 { tmp:1 = 0; export tmp; }+fdt: "f" is TMode=0 & c0808=1 { tmp:1 = 1; export tmp; }+fdt: "u" is TMode=1 & thv_c0808=0 { tmp:1 = 0; export tmp; }+fdt: "f" is TMode=1 & thv_c0808=1 { tmp:1 = 1; export tmp; }+esize2021: "8" is TMode=0 & c2021=0 { tmp:4 = 1; export tmp; }esize2021: "16" is TMode=0 & c2021=1 { tmp:4 = 2; export tmp; }esize2021: "32" is TMode=0 & c2021=2 { tmp:4 = 4; export tmp; }@@ -718,7 +722,7 @@ define pcodeop VectorCountLeadingZeros;@if defined(SIMD):vaddhn.i^esize2021x2 Dd,Qn,Qm is ( ($(AMODE) & cond=15 & c2327=5 & c2021<3 & c0811=4 & c0606=0 & c0404=0) |- ($(TMODE_F) & thv_c2327=0x1f & thv_c2021<3 & thv_c0811=4 & thv_c0606=0 & thv_c0404=0) ) & esize2021x2 & Qn & Dd & Qm+ ($(TMODE_E) & thv_c2327=0x1f & thv_c2021<3 & thv_c0811=4 & thv_c0606=0 & thv_c0404=0) ) & esize2021x2 & Qn & Dd & Qm{Dd = VectorAddReturnHigh(Qn,Qm,esize2021x2);}@@ -952,32 +956,38 @@ define pcodeop VectorCountLeadingZeros;Qd = FloatVectorCompareGreaterThan(Qm,zero,2:1,32:1);}-:vcle.s^esize1819 Dd,Dm,zero is $(AMODE) & cond=15 & c2327=7 & c2021=3 & c1819<3 & esize1819 & c1617=1 & Dd & c0711=3 & Q6=0 & c0404=0 & Dm & zero+:vcle.s^esize1819 Dd,Dm,zero is ( ($(AMODE) & cond=15 & c2327=7 & c2021=3 & c1819<3 & c1617=1 & c0711=3 & Q6=0 & c0404=0) |+ ($(TMODE_F) &thv_c2327=0x1f & thv_c2021=3 & thv_c1819<3 & thv_c1617=1 & thv_c0711=3 & thv_Q6=0 & thv_c0404=0) ) & esize1819 & Dd & Dm & zero{Dd = VectorCompareGreaterThanOrEqual(zero,Dm,esize1819);}-:vcle.s^esize1819 Qd,Qm,zero is $(AMODE) & cond=15 & c2327=7 & c2021=3 & c1819<3 & esize1819 & c1617=1 & Qd & c0711=3 & Q6=1 & c0404=0 & Qm & zero+:vcle.s^esize1819 Qd,Qm,zero is ( ($(AMODE) & cond=15 & c2327=7 & c2021=3 & c1819<3 & c1617=1 & c0711=3 & Q6=1 & c0404=0) |+ ($(TMODE_F) &thv_c2327=0x1f & thv_c2021=3 & thv_c1819<3 & thv_c1617=1 & thv_c0711=3 & thv_Q6=1 & thv_c0404=0) ) & esize1819 & Qd & Qm & zero{Qd = VectorCompareGreaterThanOrEqual(zero,Qm,esize1819);}-:vcle.f32 Dd,Dm,zero is $(AMODE) & cond=15 & c2327=7 & c2021=3 & c1819<3 & esize1819 & c1617=1 & Dd & c0711=11 & Q6=0 & c0404=0 & Dm & zero+:vcle.f32 Dd,Dm,zero is ( ($(AMODE) & cond=15 & c2327=7 & c2021=3 & c1819<3 & c1617=1 & c0711=0xb & Q6=0 & c0404=0) |+ ($(TMODE_F) &thv_c2327=0x1f & thv_c2021=3 & thv_c1819<3 & thv_c1617=1 & thv_c0711=0xb & thv_Q6=0 & thv_c0404=0) ) & esize1819 & Dd & Dm & zero{Dd = FloatVectorCompareGreaterThanOrEqual(zero,Dm,2:1,32:1);}-:vcle.f32 Qd,Qm,zero is $(AMODE) & cond=15 & c2327=7 & c2021=3 & c1819<3 & esize1819 & c1617=1 & Qd & c0711=11 & Q6=1 & c0404=0 & Qm & zero+:vcle.f32 Qd,Qm,zero is ( ($(AMODE) & cond=15 & c2327=7 & c2021=3 & c1819<3 & c1617=1 & c0711=0xb & Q6=1 & c0404=0) |+ ($(TMODE_F) &thv_c2327=0x1f & thv_c2021=3 & thv_c1819<3 & thv_c1617=1 & thv_c0711=0xb & thv_Q6=1 & thv_c0404=0) ) & esize1819 & Qd & Qm & zero{Qd = FloatVectorCompareGreaterThanOrEqual(zero,Qm,2:1,32:1);}-:vcls.s^esize1819 Dd,Dm is $(AMODE) & cond=15 & c2327=7 & c2021=3 & c1819<3 & esize1819 & c1617=0 & Dd & c0711=8 & Q6=0 & c0404=0 & Dm+:vcls.s^esize1819 Dd,Dm is ( ($(AMODE) & cond=15 & c2327=7 & c2021=3 & c1819<3 & c1617=0 & c0711=8 & Q6=0 & c0404=0) |+ ($(TMODE_F) &thv_c2327=0x1f & thv_c2021=3 & thv_c1819<3 & thv_c1617=0 & thv_c0711=8 & thv_Q6=0 & thv_c0404=0) ) & esize1819 & Dd & Dm{Dd = VectorCountLeadingSignBits(Dm,esize1819);}-:vcls.s^esize1819 Qd,Qm is $(AMODE) & cond=15 & c2327=7 & c2021=3 & c1819<3 & esize1819 & c1617=0 & Qd & c0711=8 & Q6=1 & c0404=0 & Qm+:vcls.s^esize1819 Qd,Qm is ( ($(AMODE) & cond=15 & c2327=7 & c2021=3 & c1819<3 & c1617=0 & c0711=8 & Q6=1 & c0404=0) |+ ($(TMODE_F) &thv_c2327=0x1f & thv_c2021=3 & thv_c1819<3 & thv_c1617=0 & thv_c0711=8 & thv_Q6=1 & thv_c0404=0) ) & esize1819 & Qd & Qm{Qd = VectorCountLeadingSignBits(Qm,esize1819);}@@ -1074,7 +1084,7 @@ nanx: is c0707=0 { tmp:1 = 0; export tmp; }define pcodeop VectorCountOneBits;-@if defined(SIMD)+@ifndef VERSION_8#second arg to conversion function indicates rounding mode (see RMODE bits of FPSCR)define pcodeop VectorFloatToSigned;@@ -1083,16 +1093,19 @@ define pcodeop VectorSignedToFloat;define pcodeop VectorUnsignedToFloat;@endif # VERSION_8+@if defined(SIMD)######## VCVT (between floating-point and integer, Advanced SIMD)#-:vcnt.8 Dd,Dm is $(AMODE) & cond=15 & c2327=7 & c2021=3 & c1819=0 & c1617=0 & Dd & c0711=10 & Q6=0 & c0404=0 & Dm+:vcnt.8 Dd,Dm is ( ($(AMODE) & cond=15 & c2327=7 & c2021=3 & c1619=0 & c0711=10 & Q6=0 & c0404=0) |+ ($(TMODE_F) & thv_c2327=0x1f & thv_c2021=3 & thv_c1619=0 & thv_c0711=10 & thv_c0606=0 & thv_c0404=0) ) & Dd & Dm{Dd = VectorCountOneBits(Dm,8:1,8:1);}-:vcnt.8 Qd,Qm is $(AMODE) & cond=15 & c2327=7 & c2021=3 & c1819=0 & c1617=0 & Qd & c0711=10 & Q6=1 & c0404=0 & Qm+:vcnt.8 Qd,Qm is ( ($(AMODE) & cond=15 & c2327=7 & c2021=3 & c1819=0 & c1617=0 & c0711=10 & Q6=1 & c0404=0) |+ ($(TMODE_F) & thv_c2327=0x1f & thv_c2021=3 & thv_c1619=0 & thv_c0711=10 & thv_c0606=1 & thv_c0404=0) ) & Qd & Qm{Qd = VectorCountOneBits(Qm,8:1,8:1);}@@ -1599,6 +1612,7 @@ define pcodeop VectorFloatHalfToSingle;define pcodeop VectorHalvingAdd;define pcodeop VectorHalvingSubtract;define pcodeop VectorRoundHalvingAdd;+define pcodeop VectorRoundAddAndNarrow;@if defined(SIMD)@@ -1763,6 +1777,13 @@ extImm: "#"^thv_c0811 is TMode=1 & thv_c0811 { tmp:1 = thv_c0811; export tmp; }Qd = VectorHalvingAdd(Qn,Qm,esize2021,udt);}++:vraddhn.i^esize2021x2 Dd,Qn,Qm is (($(AMODE) & cond=15 & c2527=1 & c2323=0 & c2021<3 & c0811=4 & Q6=0 & c0404=0) |+ ($(TMODE_F) & thv_c2327=0x1f & thv_c2021<3 & thv_c0811=4 & thv_Q6=0 & thv_c0404=0) ) & Qm & esize2021x2 & Qn & Dd+{+ Dd = VectorRoundAddAndNarrow(Qn,Qm,esize2021x2);+}+:vrhadd.^udt^esize2021 Dd,Dn,Dm is (($(AMODE) & cond=15 & c2527=1 & c2323=0 & c2021<3 & c0811=1 & Q6=0 & c0404=0) |($(TMODE_EorF) & thv_c2327=0x1e & thv_c2021<3 & thv_c0811=1 & thv_Q6=0 & thv_c0404=0) ) & udt & Dm & esize2021 & Dn & Dd{@@ -1775,7 +1796,8 @@ extImm: "#"^thv_c0811 is TMode=1 & thv_c0811 { tmp:1 = thv_c0811; export tmp; }Qd = VectorRoundHalvingAdd(Qn,Qm,esize2021,udt);}-:vhsub.^udt^esize2021 Dd,Dn,Dm is $(AMODE) & cond=15 & c2527=1 & udt & c2323=0 & c2021<3 & esize2021 & Dn & Dd & c0811=2 & Q6=0 & c0404=0 & Dm+:vhsub.^udt^esize2021 Dd,Dn,Dm is ( ($(AMODE) & cond=15 & c2527=1 & c2323=0 & c2021<3 & c0811=2 & Q6=0 & c0404=0) |+ ($(TMODE_EorF) & thv_c2327=0x1e & thv_c2021<3 & thv_c0811=2 & thv_Q6=0 & thv_c0404=0) ) & udt & esize2021 & Dn & Dd & Dm{Dd = VectorHalvingSubtract(Dn,Dm,esize2021,udt);}@@ -2213,7 +2235,7 @@ vld2Align3: "@16" is TMode=1 & thv_c0404=1 & thv_c0607=0 { }vld2Align3: "@32" is TMode=1 & thv_c0404=1 & thv_c0607=1 { }vld2Align3: "@64" is TMode=1 & thv_c0404=1 & thv_c0607=2 { }-vld2RnAligned3: "["^Rn^vld2Align3^"]" is Rn & vld2Align3 { export Rn; }+vld2RnAligned3: "["^VRn^vld2Align3^"]" is VRn & vld2Align3 { export VRn; }buildVld2DdList3: is counter=0 { }buildVld2DdList3: Dreg^"[]" is counter=1 & Dreg [ counter=0; regNum=regNum+regInc; ] { }@@ -2240,31 +2262,38 @@ vld2DdList3: "{"^buildVld2DdList3^"}" is TMode=1 & thv_c0505=1 & thv_D22 & thv_# VLD3 (multiple 3-element structures)#-vld3Align: is c0404=0 { }-vld3Align: "@64" is c0404=1 { }+vld3Align: is TMode=0 & c0404=0 { }+vld3Align: "@64" is TMode=0 & c0404=1 { }+vld3Align: is TMode=1 & thv_c0404=0 { }+vld3Align: "@64" is TMode=1 & thv_c0404=1 { }-vld3RnAligned: "["^Rn^vld3Align^"]" is Rn & vld3Align { export Rn; }++vld3RnAligned: "["^VRn^vld3Align^"]" is VRn & vld3Align { export VRn; }buildVld3DdList: is counter=0 { }buildVld3DdList: Dreg is counter=1 & Dreg [ counter=0; regNum=regNum+regInc; ] { }buildVld3DdList: Dreg,buildVld3DdList is buildVld3DdList & Dreg [ counter=counter-1; regNum=regNum+regInc; ] { }-vld3DdList: "{"^buildVld3DdList^"}" is c0811=4 & D22 & c1215 & buildVld3DdList [ regNum=(D22<<4)+c1215-1; regInc=1; counter=3; ] { } # Single-vld3DdList: "{"^buildVld3DdList^"}" is c0811=5 & D22 & c1215 & buildVld3DdList [ regNum=(D22<<4)+c1215-2; regInc=2; counter=3; ] { } # Double--@define Vld3DdList "(c0811=4 | c0811=5) & vld3DdList"+vld3DdList: "{"^buildVld3DdList^"}" is TMode=0 & c0811=4 & D22 & c1215 & buildVld3DdList [ regNum=(D22<<4)+c1215-1; regInc=1; counter=3; ] { } # Single+vld3DdList: "{"^buildVld3DdList^"}" is TMode=0 & c0811=5 & D22 & c1215 & buildVld3DdList [ regNum=(D22<<4)+c1215-2; regInc=2; counter=3; ] { } # Double+vld3DdList: "{"^buildVld3DdList^"}" is TMode=1 & thv_c0811=4 & thv_D22 & thv_c1215 & buildVld3DdList [ regNum=(thv_D22<<4)+thv_c1215-1; regInc=1; counter=3; ] { } # Single+vld3DdList: "{"^buildVld3DdList^"}" is TMode=1 & thv_c0811=5 & thv_D22 & thv_c1215 & buildVld3DdList [ regNum=(thv_D22<<4)+thv_c1215-2; regInc=2; counter=3; ] { } # Double-:vld3.^esize0607 vld3DdList,vld3RnAligned is $(AMODE) & cond=15 & c2327=8 & c2021=2 & vld3RnAligned & c0607<3 & esize0607 & c0505=0 & c0003=15 & $(Vld3DdList) unimpl+:vld3.^esize0607 vld3DdList,vld3RnAligned is ( ( $(AMODE) & cond=15 & c2327=8 & c2021=2 & (c0811=4 | c0811=5) & c0607<3 & c0505=0 & c0003=15 ) |+ ( $(TMODE_F) & thv_c2327=0x12 & thv_c2021=2 & (thv_c0811=4 | thv_c0811=5) & thv_c0607<3 & thv_c0505=0 & thv_c0003=15) ) & vld3RnAligned & esize0607 & vld3DdList unimpl-:vld3.^esize0607 vld3DdList,vld3RnAligned^"!" is $(AMODE) & cond=15 & c2327=8 & c2021=2 & vld3RnAligned & c0607<3 & esize0607 & c0505=0 & c0003=13 & $(Vld3DdList) unimpl+:vld3.^esize0607 vld3DdList,vld3RnAligned^"!" is ( ( $(AMODE) & cond=15 & c2327=8 & c2021=2 & (c0811=4 | c0811=5) & c0607<3 & c0505=0 & c0003=13 ) |+ ( $(TMODE_F) & thv_c2327=0x12 & thv_c2021=2 & (thv_c0811=4 | thv_c0811=5) & thv_c0607<3 & thv_c0505=0 & thv_c0003=13) ) & vld3RnAligned & esize0607 & vld3DdList unimpl-:vld3.^esize0607 vld3DdList,vld3RnAligned,VRm is $(AMODE) & cond=15 & c2327=8 & c2021=2 & vld3RnAligned & c0607<3 & esize0607 & c0505=0 & VRm & $(Vld3DdList) unimpl+:vld3.^esize0607 vld3DdList,vld3RnAligned,VRm is ( ( $(AMODE) & cond=15 & c2327=8 & c2021=2 & (c0811=4 | c0811=5) & c0607<3 & c0505=0 ) |+ ( $(TMODE_F) & thv_c2327=0x12 & thv_c2021=2 & (thv_c0811=4 | thv_c0811=5) & thv_c0607<3 & thv_c0505=0 ) ) & VRm & vld3RnAligned & esize0607 & vld3DdList unimpl######## VLD3 (single 3-element structure to one lane)#-vld3Index: val is c0507 & c1011 [ val = c0507 >> c1011; ] { tmp:4 = val; export tmp; }+vld3Index: val is TMode=0 & c0507 & c1011 [ val = c0507 >> c1011; ] { tmp:4 = val; export tmp; }+vld3Index: val is TMode=1 & thv_c0507 & thv_c1011 [ val = thv_c0507 >> thv_c1011; ] { tmp:4 = val; export tmp; }vld3DdElement2: Dreg^"["^vld3Index^"]" is Dreg & vld3Index{@@ -2276,14 +2305,20 @@ buildVld3DdList2: is counter=0 { }buildVld3DdList2: vld3DdElement2 is counter=1 & vld3DdElement2 [ counter=0; regNum=regNum+regInc; ] { }buildVld3DdList2: vld3DdElement2,buildVld3DdList2 is vld3DdElement2 & buildVld3DdList2 [ counter=counter-1; regNum=regNum+regInc; ] { }-vld3DdList2: "{"^buildVld3DdList2^"}" is D22 & c1215 & buildVld3DdList2 [ regNum=(D22<<4)+c1215-1; regInc=1; counter=3; ] { } # Single-vld3DdList2: "{"^buildVld3DdList2^"}" is ((c1011=1 & c0405=2) | (c1011=2 & c0406=4)) & D22 & c1215 & buildVld3DdList2 [ regNum=(D22<<4)+c1215-2; regInc=2; counter=3; ] { } # Double+vld3DdList2: "{"^buildVld3DdList2^"}" is TMode=0 & D22 & c1215 & buildVld3DdList2 [ regNum=(D22<<4)+c1215-1; regInc=1; counter=3; ] { } # Single+vld3DdList2: "{"^buildVld3DdList2^"}" is TMode=0 & ((c1011=1 & c0405=2) | (c1011=2 & c0406=4)) & D22 & c1215 & buildVld3DdList2 [ regNum=(D22<<4)+c1215-2; regInc=2; counter=3; ] { } # Double+vld3DdList2: "{"^buildVld3DdList2^"}" is TMode=1 & thv_D22 & thv_c1215 & buildVld3DdList2 [ regNum=(thv_D22<<4)+thv_c1215-1; regInc=1; counter=3; ] { } # Single+vld3DdList2: "{"^buildVld3DdList2^"}" is TMode=1 & ((thv_c1011=1 & thv_c0405=2) | (thv_c1011=2 & thv_c0406=4)) & thv_D22 & thv_c1215 & buildVld3DdList2 [ regNum=(thv_D22<<4)+thv_c1215-2; regInc=2; counter=3; ] { } # Double-:vld3.^esize1011 vld3DdList2,vld3Rn is $(AMODE) & cond=15 & c2327=9 & c2021=2 & vld3Rn & c1011<3 & esize1011 & c0809=2 & c0003=15 & vld3DdList2 unimpl-:vld3.^esize1011 vld3DdList2,vld3Rn^"!" is $(AMODE) & cond=15 & c2327=9 & c2021=2 & vld3Rn & c1011<3 & esize1011 & c0809=2 & c0003=13 & vld3DdList2 unimpl+:vld3.^esize1011 vld3DdList2,vld3Rn is ( ( $(AMODE) & cond=15 & c2327=9 & c2021=2 & c1011<3 & c0809=2 & c0003=15) |+ ( $(TMODE_F) & thv_c2327=0x13 & thv_c2021=2 & thv_c1011<3 & thv_c0809=2 & thv_c0003=15) ) & vld3Rn & esize1011 & vld3DdList2 unimpl-:vld3.^esize1011 vld3DdList2,vld3Rn,VRm is $(AMODE) & cond=15 & c2327=9 & c2021=2 & vld3Rn & c1011<3 & esize1011 & c0809=2 & VRm & vld3DdList2 unimpl+:vld3.^esize1011 vld3DdList2,vld3Rn^"!" is ( ( $(AMODE) & cond=15 & c2327=9 & c2021=2 & c1011<3 & c0809=2 & c0003=13) |+ ( $(TMODE_F) & thv_c2327=0x13 & thv_c2021=2 & thv_c1011<3 & thv_c0809=2 & thv_c0003=13) ) & vld3Rn & esize1011 & vld3DdList2 unimpl++:vld3.^esize1011 vld3DdList2,vld3Rn,VRm is ( ( $(AMODE) & cond=15 & c2327=9 & c2021=2 & c1011<3 & c0809=2) |+ ( $(TMODE_F) & thv_c2327=0x13 & thv_c2021=2 & thv_c1011<3 & thv_c0809=2) ) & VRm & vld3Rn & esize1011 & vld3DdList2 unimpl######## VLD3 (single 3-element structure to all lanes)@@ -2293,14 +2328,19 @@ buildVld3DdList3: is counter=0 { }buildVld3DdList3: Dreg^"[]" is counter=1 & Dreg [ counter=0; regNum=regNum+regInc; ] { }buildVld3DdList3: Dreg^"[]",buildVld3DdList3 is Dreg & buildVld3DdList3 [ counter=counter-1; regNum=regNum+regInc; ] { }-vld3DdList3: "{"^buildVld3DdList3^"}" is c0505=0 & D22 & c1215 & buildVld3DdList3 [ regNum=(D22<<4)+c1215-1; regInc=1; counter=3; ] { } # Single-vld3DdList3: "{"^buildVld3DdList3^"}" is c0505=1 & D22 & c1215 & buildVld3DdList3 [ regNum=(D22<<4)+c1215-2; regInc=2; counter=3; ] { } # Double+vld3DdList3: "{"^buildVld3DdList3^"}" is TMode=0 & c0505=0 & D22 & c1215 & buildVld3DdList3 [ regNum=(D22<<4)+c1215-1; regInc=1; counter=3; ] { } # Single+vld3DdList3: "{"^buildVld3DdList3^"}" is TMode=0 & c0505=1 & D22 & c1215 & buildVld3DdList3 [ regNum=(D22<<4)+c1215-2; regInc=2; counter=3; ] { } # Double+vld3DdList3: "{"^buildVld3DdList3^"}" is TMode=1 & thv_c0505=0 & thv_D22 & thv_c1215 & buildVld3DdList3 [ regNum=(thv_D22<<4)+thv_c1215-1; regInc=1; counter=3; ] { } # Single+vld3DdList3: "{"^buildVld3DdList3^"}" is TMode=1 & thv_c0505=1 & thv_D22 & thv_c1215 & buildVld3DdList3 [ regNum=(thv_D22<<4)+thv_c1215-2; regInc=2; counter=3; ] { } # Double-:vld3.^esize0607 vld3DdList3,vld3Rn is $(AMODE) & cond=15 & c2327=9 & c2021=2 & vld3Rn & c0811=14 & c0607<3 & esize0607 & c0404=0 & c0003=15 & vld3DdList3 unimpl+:vld3.^esize0607 vld3DdList3,vld3Rn is ( ($(AMODE) & cond=15 & c2327=9 & c2021=2 & c0811=14 & c0607<3 & c0404=0 & c0003=15) |+ ( $(TMODE_F) & thv_c2327=0x13 & thv_c2021=2 & thv_c0811=14 & thv_c0404=0 & thv_c0003=15) ) & vld3Rn & esize0607 & vld3DdList3 unimpl-:vld3.^esize0607 vld3DdList3,vld3Rn^"!" is $(AMODE) & cond=15 & c2327=9 & c2021=2 & vld3Rn & c0811=14 & c0607<3 & esize0607 & c0404=0 & c0003=13 & vld3DdList3 unimpl+:vld3.^esize0607 vld3DdList3,vld3Rn^"!" is ( ($(AMODE) & cond=15 & c2327=9 & c2021=2 & c0811=14 & c0607<3 & c0404=0 & c0003=13) |+ ( $(TMODE_F) & thv_c2327=0x13 & thv_c2021=2 & thv_c0811=14 & thv_c0404=0 & thv_c0003=13) ) & vld3Rn & esize0607 & vld3DdList3 unimpl-:vld3.^esize0607 vld3DdList3,vld3Rn,VRm is $(AMODE) & cond=15 & c2327=9 & c2021=2 & vld3Rn & c0811=14 & c0607<3 & esize0607 & c0404=0 & VRm & vld3DdList3 unimpl+:vld3.^esize0607 vld3DdList3,vld3Rn,VRm is ( ($(AMODE) & cond=15 & c2327=9 & c2021=2 & c0811=14 & c0607<3 & c0404=0) |+ ( $(TMODE_F) & thv_c2327=0x13 & thv_c2021=2 & thv_c0811=14 & thv_c0404=0) ) & VRm & vld3Rn & esize0607 & vld3DdList3 unimpl#######@@ -2596,6 +2636,8 @@ define pcodeop VectorMultiplySubtractLong;define pcodeop VectorDoubleMultiplyHighHalf;define pcodeop VectorRoundDoubleMultiplyHighHalf;define pcodeop VectorDoubleMultiplyLong;+define pcodeop VectorDoubleMultiplyAccumulateLong;+define pcodeop VectorDoubleMultiplySubtractLong;define pcodeop FloatVectorMultiplyAccumulate;define pcodeop FloatVectorMultiplySubtract;define pcodeop VectorGetElement;@@ -2689,25 +2731,25 @@ define pcodeop VectorGetElement;}:vmla.f^fesize2021 Dd,Dn,Dm is ( ($(AMODE) & cond=15 & c2327=4 & c2121=0 & c0811=13 & Q6=0 & c0404=1) |- ($(TMODE_E) & thv_c2327=0x1c & thv_c2121=0 & thv_c0811=13 & thv_c0606=0 & thv_c0404=1)) & fesize2021 & Dn & Dd & Dm+ ($(TMODE_E) & thv_c2327=0x1e & thv_c2121=0 & thv_c0811=13 & thv_c0606=0 & thv_c0404=1)) & fesize2021 & Dn & Dd & Dm{Dd = FloatVectorMultiplyAccumulate(Dn,Dm,fesize2021,8:1);}:vmla.f^fesize2021 Qd,Qn,Qm is ( ($(AMODE) & cond=15 & c2327=4 & c2121=0 & c0811=13 & Q6=1 & c0404=1) |- ($(TMODE_E) & thv_c2327=0x1c & thv_c2121=0 & thv_c0811=13 & thv_c0606=1 & thv_c0404=1)) & fesize2021 & Qn & Qd & Qm+ ($(TMODE_E) & thv_c2327=0x1e & thv_c2121=0 & thv_c0811=13 & thv_c0606=1 & thv_c0404=1)) & fesize2021 & Qn & Qd & Qm{Qd = FloatVectorMultiplyAccumulate(Qn,Qm,fesize2021,16:1);}:vmls.f^fesize2021 Dd,Dn,Dm is ( ($(AMODE) & cond=15 & c2327=4 & c2121=1 & c0811=13 & Q6=0 & c0404=1) |- ($(TMODE_E) & thv_c2327=0x1c & thv_c2121=1 & thv_c0811=13 & thv_c0606=0 & thv_c0404=1)) & fesize2021 & Dn & Dd & Dm+ ($(TMODE_E) & thv_c2327=0x1e & thv_c2121=1 & thv_c0811=13 & thv_c0606=0 & thv_c0404=1)) & fesize2021 & Dn & Dd & Dm{Dd = FloatVectorMultiplySubtract(Dn,Dm,fesize2021,8:1);}:vmls.f^fesize2021 Qd,Qn,Qm is ( ($(AMODE) & cond=15 & c2327=4 & c2121=1 & c0811=13 & Q6=1 & c0404=1) |- ($(TMODE_E) & thv_c2327=0x1c & thv_c2121=1 & thv_c0811=13 & thv_c0606=1 & thv_c0404=1)) & fesize2021 & Qn & Qd & Qm+ ($(TMODE_E) & thv_c2327=0x1e & thv_c2121=1 & thv_c0811=13 & thv_c0606=1 & thv_c0404=1)) & fesize2021 & Qn & Qd & Qm{Qd = FloatVectorMultiplySubtract(Qn,Qm,fesize2021,16:1);}@@ -2766,34 +2808,38 @@ vmlDm: thv_Dm_4^"["^thv_M5^"]" is TMode=1 & thv_c2021=2 & thv_Dm_4 & thv_M5Qd = VectorMultiplyAccumulate(Qn,vmlDm,esize2021);}-:vmla.f^esize2021 Dd,Dn,vmlDm is ( ($(AMODE) & cond=15 & c2527=1 & c2424=0 & c2323=1 & (c2021=1 | c2021=2) & c0811=1 & c0606=1 & c0404=0) |- ($(TMODE_E) & thv_c2327=0x1f & (thv_c2021=1 | thv_c2021=2) & thv_c0811=1 & thv_c0606=1 & thv_c0404=0)) & esize2021 & Dn & Dd & vmlDm+:vmla.f32 Dd,Dn,vmlDm is ( ($(AMODE) & cond=15 & c2527=1 & c2424=0 & c2323=1 & c2021=2 & c0811=1 & c0606=1 & c0404=0) |+ ($(TMODE_E) & thv_c2327=0x1f & thv_c2021=2 & thv_c0811=1 & thv_c0606=1 & thv_c0404=0)) & Dn & Dd & vmlDm{- Dd = FloatVectorMultiplyAccumulate(Dn,vmlDm,2:4,esize2021);+ Dd = FloatVectorMultiplyAccumulate(Dn,vmlDm,2:4,32:1);}-:vmla.f^esize2021 Qd,Qn,vmlDm is ( ($(AMODE) & cond=15 & c2527=1 & c2424=1 & c2323=1 & (c2021=1 | c2021=2) & c0811=1 & c0606=1 & c0404=0) |- ($(TMODE_F) & thv_c2327=0x1f & (thv_c2021=1 | thv_c2021=2) & thv_c0811=1 & thv_c0606=1 & thv_c0404=0)) & esize2021 & Qn & Qd & vmlDm+:vmla.f32 Qd,Qn,vmlDm is ( ($(AMODE) & cond=15 & c2527=1 & c2424=1 & c2323=1 & c2021=2 & c0811=1 & c0606=1 & c0404=0) |+ ($(TMODE_F) & thv_c2327=0x1f & thv_c2021=2 & thv_c0811=1 & thv_c0606=1 & thv_c0404=0)) & Qn & Qd & vmlDm{- Qd = FloatVectorMultiplyAccumulate(Qn,vmlDm,2:4,esize2021);+ Qd = FloatVectorMultiplyAccumulate(Qn,vmlDm,2:4,32:1);}-:vmls.i^esize2021 Dd,Dn,vmlDm is $(AMODE) & cond=15 & c2527=1 & c2424=0 & c2323=1 & (c2021=1 | c2021=2) & esize2021 & Dn & Dd & c0811=4 & c0606=1 & c0404=0 & vmlDm+:vmls.i^esize2021 Dd,Dn,vmlDm is ( ($(AMODE) & cond=15 & c2527=1 & c2424=0 & c2323=1 & (c2021=1 | c2021=2) & c0811=4 & c0606=1 & c0404=0) |+ ($(TMODE_E) & thv_c2327=0x1f & (thv_c2021=1 | thv_c2021=2) & thv_c0811=4 & thv_c0606=1 & thv_c0404=0)) & esize2021 & Dn & Dd & vmlDm{Dd = VectorMultiplySubtract(Dn,vmlDm,esize2021);}-:vmls.i^esize2021 Qd,Qn,vmlDm is $(AMODE) & cond=15 & c2527=1 & c2424=1 & c2323=1 & (c2021=1 | c2021=2) & esize2021 & Qn & Qd & c0811=4 & c0606=1 & c0404=0 & vmlDm+:vmls.i^esize2021 Qd,Qn,vmlDm is ( ($(AMODE) & cond=15 & c2527=1 & c2424=1 & c2323=1 & (c2021=1 | c2021=2)& c0811=4 & c0606=1 & c0404=0) |+ ($(TMODE_F) & thv_c2327=0x1f & (thv_c2021=1 | thv_c2021=2) & thv_c0811=4 & thv_c0606=1 & thv_c0404=0)) & esize2021 & Qn & Qd & vmlDm{Qd = VectorMultiplySubtract(Qn,vmlDm,esize2021);}-:vmls.f32 Dd,Dn,vmlDm is $(AMODE) & cond=15 & c2527=1 & c2424=0 & c2323=1 & c2021=2 & Dn & Dd & c0811=5 & c0606=1 & c0404=0 & vmlDm+:vmls.f32 Dd,Dn,vmlDm is ( ($(AMODE) & cond=15 & c2527=1 & c2424=0 & c2323=1 & c2021=2 & c0811=5 & c0606=1 & c0404=0) |+ ($(TMODE_E) & thv_c2327=0x1f & thv_c2021=2 & thv_c0811=5 & thv_c0606=1 & thv_c0404=0)) & Dn & Dd & vmlDm{Dd = FloatVectorMultiplySubtract(Dn,vmlDm,2:4,32:1);}-:vmls.f32 Qd,Qn,vmlDm is $(AMODE) & cond=15 & c2527=1 & c2424=1 & c2323=1 & c2021=2 & Qn & Qd & c0811=5 & c0606=1 & c0404=0 & vmlDm+:vmls.f32 Qd,Qn,vmlDm is ( ($(AMODE) & cond=15 & c2527=1 & c2424=1 & c2323=1 & c2021=2 & c0811=5 & c0606=1 & c0404=0) |+ ($(TMODE_F) & thv_c2327=0x1f & thv_c2021=2 & thv_c0811=5 & thv_c0606=1 & thv_c0404=0)) & Qn & Qd & vmlDm{Qd = FloatVectorMultiplySubtract(Qn,vmlDm,2:4,32:1);}@@ -3379,6 +3425,10 @@ vpopSd64List: "{"^buildVpopSd64List^"}" is TMode=1 & thv_D22 & thv_c1215 & thv_cbuild vpopSdList;}+@endif # VFPv2 || VFPv3 || SIMD++@if defined(SIMD)+define pcodeop SatQ;define pcodeop SignedSatQ;@@ -3410,14 +3460,46 @@ define pcodeop SignedSatQ;Dd = SatQ(Dd, esize1819x2,0:1);}-:vqdmulh.S^esize2021 Qd, Dn, Dm is ( ( $(AMODE) & cond=15 & c2527=1 & c2324=0 & (c2021=1 | c2021=2) & c0811=0xb & Q6=0 & c0404=0 ) |- ( $(TMODE_E) & thv_c2327=0x1e & (thv_c2021=1 | thv_c2021=2) & thv_c0811=0xb & thv_c0606=0 & thv_c0404=0 ) ) & esize2021 & Dm & Dn & Qd+:vqdmlal.S^esize2021 Qd, Dn, Dm is ( ( $(AMODE) & cond=15 & c2327=5 & (c2021=1 | c2021=2) & c0811=0x9 & c0606=0 & c0404=0 ) |+ ( $(TMODE_E) & thv_c2327=0x1f & (thv_c2021=1 | thv_c2021=2) & thv_c0811=0x9 & thv_c0606=0 & thv_c0404=0 ) ) & esize2021 & Dm & Dn & Qd++{+ Qd = VectorDoubleMultiplyAccumulateLong(Dn,Dm,esize2021,0:1);+ Qd = SatQ(Qd, esize2021,0:1);+}++:vqdmlal.S^esize2021 Qd, Dn, vmlDmA is ( ( $(AMODE) & cond=15 & c2327=5 & (c2021=1 | c2021=2)& c0811=0x3 & c0606=1 & c0404=0) |+ ( $(TMODE_E) & thv_c2327=0x1f & (thv_c2021=1 | thv_c2021=2) & thv_c0811=0x3 & thv_c0606=1 & thv_c0404=0 ) ) & esize2021 & vmlDmA & Dn & Qd++{+ Qd = VectorDoubleMultiplyAccumulateLong(Dn,vmlDmA,esize2021,0:1);+ Qd = SatQ(Qd, esize2021,0:1);+}++:vqdmlsl.S^esize2021 Qd, Dn, Dm is ( ( $(AMODE) & cond=15 & c2327=5 & (c2021=1 | c2021=2) & c0811=0xb & c0606=0 & c0404=0 ) |+ ( $(TMODE_E) & thv_c2327=0x1f & (thv_c2021=1 | thv_c2021=2) & thv_c0811=0xb & thv_c0606=0 & thv_c0404=0 ) ) & esize2021 & Dm & Dn & Qd++{+ Qd = VectorDoubleMultiplySubtractLong(Dn,Dm,esize2021,0:1);+ Qd = SatQ(Qd, esize2021,0:1);+}++:vqdmlsl.S^esize2021 Qd, Dn, vmlDmA is ( ( $(AMODE) & cond=15 & c2327=5 & (c2021=1 | c2021=2)& c0811=0x7 & c0606=1 & c0404=0) |+ ( $(TMODE_E) & thv_c2327=0x1f & (thv_c2021=1 | thv_c2021=2) & thv_c0811=0x7 & thv_c0606=1 & thv_c0404=0 ) ) & esize2021 & vmlDmA & Dn & Qd{- Qd = VectorDoubleMultiplyHighHalf(Dn,Dm,esize2021,0:1);+ Qd = VectorDoubleMultiplySubtractLong(Dn,vmlDmA,esize2021,0:1);Qd = SatQ(Qd, esize2021,0:1);}+:vqdmulh.S^esize2021 Dd, Dn, Dm is ( ( $(AMODE) & cond=15 & c2527=1 & c2324=0 & (c2021=1 | c2021=2) & c0811=0xb & Q6=0 & c0404=0 ) |+ ( $(TMODE_E) & thv_c2327=0x1e & (thv_c2021=1 | thv_c2021=2) & thv_c0811=0xb & thv_c0606=0 & thv_c0404=0 ) ) & esize2021 & Dm & Dn & Dd++{+ Dd = VectorDoubleMultiplyHighHalf(Dn,Dm,esize2021,0:1);+ Dd = SatQ(Dd, esize2021,0:1);+}+:vqdmulh.S^esize2021 Qd, Qn, Qm is ( ( $(AMODE) & cond=15 & c2527=1 & c2324=0 & (c2021=1 | c2021=2) & c0811=0xb & Q6=1 & c0404=0 ) |( $(TMODE_E) & thv_c2327=0x1e & (thv_c2021=1 | thv_c2021=2) & thv_c0811=0xb & thv_c0606=1 & thv_c0404=0 ) ) & esize2021 & Qm & Qn & Qd@@ -3442,15 +3524,15 @@ define pcodeop SignedSatQ;Qd = SatQ(Qd, esize2021,0:1);}-:vqdmull.S^esize2021 Qd, Dn, Dm is ( ( $(AMODE) & cond=15 & c2527=1 & c2324=1 & c2021<3 & c0811=0xb & Q6=0 & c0404=0 ) |- ( $(TMODE_E) & thv_c2327=0x1f & thv_c2324=1 & thv_c2021<3 & thv_c0811=0xb & thv_Q6=0 & thv_c0404=0 ) ) & esize2021 & Dm & Dn & Qd+:vqdmull.S^esize2021 Qd, Dn, Dm is ( ( $(AMODE) & cond=15 & c2327=5 & c2021<3 & c0811=0xD & Q6=0 & c0404=0 ) |+ ( $(TMODE_E) & thv_c2327=0x1f & thv_c2324=1 & thv_c2021<3 & thv_c0811=0xD & thv_Q6=0 & thv_c0404=0 ) ) & esize2021 & Dm & Dn & Qd{Qd = VectorDoubleMultiplyLong(Dn,Dm,esize2021,0:1);Qd = SatQ(Qd, esize2021,0:1);}-:vqdmull.S^esize2021 Qd, Dn, vmlDmA is ( ( $(AMODE) & cond=15 & c2527=1 & c2324=1 & c2021<3 & c0811=0xb & Q6=1 & c0404=1 ) |+:vqdmull.S^esize2021 Qd, Dn, vmlDmA is ( ( $(AMODE) & cond=15 & c2327=5 & c2021<3 & c0811=0xb & Q6=1 & c0404=1 ) |( $(TMODE_E) & thv_c2327=0x1e & thv_c2324=1 & thv_c2021<3 & thv_c0811=0xb & thv_Q6=1 & thv_c0404=1 ) ) & esize2021 & vmlDmA & Dn & Qd{@@ -3458,12 +3540,12 @@ define pcodeop SignedSatQ;Qd = SatQ(Qd, esize2021,0:1);}-:vqrdmulh.S^esize2021 Qd, Dn, Dm is ( ( $(AMODE) & cond=15 & c2527=1 & c2324=2 & (c2021=1 | c2021=2) & c0811=0xb & Q6=0 & c0404=0 ) |- ( $(TMODE_F) & thv_c2327=0x1e & (thv_c2021=1 | thv_c2021=2) & thv_c0811=0xb & thv_Q6=0 & thv_c0404=0 ) ) & esize2021 & Dm & Dn & Qd+:vqrdmulh.S^esize2021 Dd, Dn, Dm is ( ( $(AMODE) & cond=15 & c2527=1 & c2324=2 & (c2021=1 | c2021=2) & c0811=0xb & Q6=0 & c0404=0 ) |+ ( $(TMODE_F) & thv_c2327=0x1e & (thv_c2021=1 | thv_c2021=2) & thv_c0811=0xb & thv_Q6=0 & thv_c0404=0 ) ) & esize2021 & Dm & Dn & Dd{- Qd = VectorRoundDoubleMultiplyHighHalf(Dn,Dm,esize2021,0:1);- Qd = SatQ(Qd, esize2021,0:1);+ Dd = VectorRoundDoubleMultiplyHighHalf(Dn,Dm,esize2021,0:1);+ Dd = SatQ(Dd, esize2021,0:1);}:vqrdmulh.S^esize2021 Qd, Qn, Qm is ( ( $(AMODE) & cond=15 & c2527=1 & c2324=2 & (c2021=1 | c2021=2) & c0811=0xb & Q6=1 & c0404=0 ) |@@ -3505,14 +3587,42 @@ define pcodeop SignedSatQ;Qd = SatQ(Qd, esize2021, udt);}-@endif # VFPv2 || VFPv3 || SIMD--@if defined(SIMD)-######## TODO: lots of missing stuff#+#######+# VRECPE+define pcodeop VectorReciprocalEstimate;++:vrecpe.^fdt^32 Qd,Qm is ( ($(AMODE) & cond=15 & c2327=0x7 & c2021=3 & c1619=0xb & c0911=2 & c0707=0 & Q6=1 & c0404=0) |+ ($(TMODE_F) & thv_c2327=0x1f & thv_c2021=3 & thv_c1619=0xb & thv_c0911=2 & thv_c0707=0 & thv_Q6=1 & thv_c0404=0) ) & fdt & Qm & Qd+{+ Qd = VectorReciprocalEstimate(Qm,fdt);+}++:vrecpe.^fdt^32 Dd,Dm is ( ($(AMODE) & cond=15 & c2327=0x7 & c2021=3 & c1619=0xb & c0911=2 & c0707=0 & Q6=0 & c0404=0) |+ ($(TMODE_F) & thv_c2327=0x1f & thv_c2021=3 & thv_c1619=0xb & thv_c0911=2 & thv_c0707=0 & thv_Q6=0 & thv_c0404=0) ) & fdt & Dm & Dd+{+ Dd = VectorReciprocalEstimate(Dm,fdt);+}++#######+# VRECPS+define pcodeop VectorReciprocalStep;++:vrecps.f32 Qd,Qn,Qm is ( ($(AMODE) & cond=15 & c2327=0x4 & c2021=0 & c0811=0xf & Q6=1 & c0404=1) |+ ($(TMODE_E) & thv_c2327=0x1e & thv_c2021=0 & thv_c0811=0xf & thv_Q6=1 & thv_c0404=1) ) & Qn & Qm & Qd+{+ Qd = VectorReciprocalStep(Qn,Qm);+}++:vrecps.f32 Dd,Dn,Dm is ( ($(AMODE) & cond=15 & c2327=0x4 & c2021=0 & c0811=0xf & Q6=0 & c0404=1) |+ ($(TMODE_E) & thv_c2327=0x1e & thv_c2021=0 & thv_c0811=0xf & thv_Q6=0 & thv_c0404=1) ) & Dn & Dm & Dd+{+ Dd = VectorReciprocalStep(Dn,Dm);+}+######## VREV#@@ -3716,14 +3826,14 @@ define pcodeop VectorShiftLongLeft;Dd = VectorRoundShiftLeft(Dm,esize2021,Dn);}-:vrshr.^ShiftSize Qd, Qm, ShiftImmRLI is ( ($(AMODE) & cond=15 & c2527=1 & c2323=1 & c0811=2 & c0606=1 & c0404=1) |- ($(TMODE_E) & thv_c2327=0x1f & thv_c0811=2 & thv_c0606=1 & thv_c0404=1) ) & ShiftSize & ShiftImmRLI & Qd & Qm+:vrshr.^udt^ShiftSize Qd, Qm, ShiftImmRLI is ( ($(AMODE) & cond=15 & c2527=1 & c2323=1 & c0811=2 & c0606=1 & c0404=1) |+ ($(TMODE_EorF) & thv_c2327=0x1f & thv_c0811=2 & thv_c0606=1 & thv_c0404=1) ) & udt & ShiftSize & ShiftImmRLI & Qd & Qm{Qd = VectorRoundShiftRight(Qm,ShiftImmRLI);}-:vrshr.^ShiftSize Dd, Dm, ShiftImmRLI is ( ($(AMODE) & cond=15 & c2527=1 & c2323=1 & c0811=2 & c0606=0 & c0404=1) |- ($(TMODE_E) & thv_c2327=0x1f & thv_c0811=2 & thv_c0606=0 & thv_c0404=1) ) & ShiftSize & ShiftImmRLI & Dd & Dm+:vrshr.^udt^ShiftSize Dd, Dm, ShiftImmRLI is ( ($(AMODE) & cond=15 & c2527=1 & c2323=1 & c0811=2 & c0606=0 & c0404=1) |+ ($(TMODE_EorF) & thv_c2327=0x1f & thv_c0811=2 & thv_c0606=0 & thv_c0404=1) ) & udt & ShiftSize & ShiftImmRLI & Dd & Dm{Dd = VectorRoundShiftRight(Dm,ShiftImmRLI);}@@ -3734,18 +3844,30 @@ define pcodeop VectorShiftLongLeft;Dd = VectorRoundShiftRightNarrow(Qm,ShiftImmRLI);}-:vrsra.^ShiftSize Qd, Qm, ShiftImmRLI is ( ($(AMODE) & cond=15 & c2527=1 & c2323=1 & c0811=3 & c0606=1 & c0404=1) |- ($(TMODE_EorF) & thv_c2327=0x1f & thv_c0811=3 & thv_c0606=1 & thv_c0404=1) ) & ShiftSize & ShiftImmRLI & Qd & Qm+:vrsra.^udt^ShiftSize Qd, Qm, ShiftImmRLI is ( ($(AMODE) & cond=15 & c2527=1 & c2323=1 & c0811=3 & c0606=1 & c0404=1) |+ ($(TMODE_EorF) & thv_c2327=0x1f & thv_c0811=3 & thv_c0606=1 & thv_c0404=1) ) & udt & ShiftSize & ShiftImmRLI & Qd & Qm{Qd = VectorRoundShiftRightAccumulate(Qd, Qm,ShiftImmRLI);}-:vrsra.^ShiftSize Dd, Dm, ShiftImmRLI is ( ($(AMODE) & cond=15 & c2527=1 & c2323=1 & c0811=3 & c0606=0 & c0404=1) |- ($(TMODE_EorF) & thv_c2327=0x1f & thv_c0811=3 & thv_c0606=0 & thv_c0404=1) ) & ShiftSize & ShiftImmRLI & Dd & Dm+:vrsra.^udt^ShiftSize Dd, Dm, ShiftImmRLI is ( ($(AMODE) & cond=15 & c2527=1 & c2323=1 & c0811=3 & c0606=0 & c0404=1) |+ ($(TMODE_EorF) & thv_c2327=0x1f & thv_c0811=3 & thv_c0606=0 & thv_c0404=1) ) & udt & ShiftSize & ShiftImmRLI & Dd & Dm{Dd = VectorRoundShiftRightAccumulate(Dd, Dm,ShiftImmRLI);}+:vsli.^ShiftSize Dd, Dm, ShiftImmLLI is ( ($(AMODE) & cond=15 & c2327=7 & c0811=5 & c0606=0 & c0404=1) |+ ($(TMODE_F) & thv_c2327=0x1f & thv_c0811=5 & thv_c0606=0 & thv_c0404=1) ) & ShiftSize & ShiftImmLLI & Dd & Dm+{+ Dd = VectorShiftLeftInsert(Dd, Dm,ShiftImmLLI);+}++:vsli.^ShiftSize Qd, Qm, ShiftImmLLI is ( ($(AMODE) & cond=15 & c2327=7 & c0811=5 & c0606=1 & c0404=1) |+ ($(TMODE_F) & thv_c2327=0x1f & thv_c0811=5 & thv_c0606=1 & thv_c0404=1) ) & ShiftSize & ShiftImmLLI & Qd & Qm+{+ Qd = VectorShiftLeftInsert(Qd, Qm,ShiftImmLLI);+}+:vsqrt^COND^".f32" Sd,Sm is COND & ( ($(AMODE) & c2327=0x1d & c2021=3 & c1619=1 & c0811=10 & c0607=3 & c0404=0) |($(TMODE_E) & thv_c2327=0x1d & thv_c2021=3 & thv_c1619=1 & thv_c0811=10 & thv_c0606=1 & thv_c0404=0) ) & Sm & Sd{@@ -3764,26 +3886,14 @@ define pcodeop VectorShiftLongLeft;Dd = sqrt(Dm);}-:vsli.^ShiftSize Qd, Qm, ShiftImmLLI is ( ($(AMODE) & cond=15 & c2527=1 & c2424=1 & c2323=1 & c0811=5 & c0606=1 & c0404=1) |- ($(TMODE_F) & thv_c2327=0x1f & thv_c0811=5 & thv_c0606=1 & thv_c0404=1) ) & ShiftSize & ShiftImmLLI & Qd & Qm-{- Qd = VectorShiftLeftInsert(Qd, Qm,ShiftImmLLI);-}--:vsli.^ShiftSize Dd, Dm, ShiftImmLLI is ( ($(AMODE) & cond=15 & c2527=1 & c2424=1 & c2323=1 & c0811=5 & c0606=0 & c0404=1) |- ($(TMODE_F) & thv_c2327=0x1f & thv_c0811=5 & thv_c0606=0 & thv_c0404=1) ) & ShiftSize & ShiftImmLLI & Dd & Dm-{- Dd = VectorShiftLeftInsert(Dd, Dm,ShiftImmLLI);-}--:vsra.^ShiftSize Qd, Qm, ShiftImmRLI is ( ($(AMODE) & cond=15 & c2527=1 & c2323=1 & c0811=1 & c0606=1 & c0404=1) |- ($(TMODE_EorF) & thv_c2327=0x1f & thv_c0811=1 & thv_c0606=1 & thv_c0404=1) ) & ShiftSize & ShiftImmRLI & Qd & Qm+:vsra.^udt^ShiftSize Qd, Qm, ShiftImmRLI is ( ($(AMODE) & cond=15 & c2527=1 & c2323=1 & c0811=1 & c0606=1 & c0404=1) |+ ($(TMODE_EorF) & thv_c2327=0x1f & thv_c0811=1 & thv_c0606=1 & thv_c0404=1) ) & udt & ShiftSize & ShiftImmRLI & Qd & Qm{Qd = VectorShiftRightAccumulate(Qd, Qm,ShiftImmRLI);}-:vsra.^ShiftSize Dd, Dm, ShiftImmRLI is ( ($(AMODE) & cond=15 & c2527=1 & c2323=1 & c0811=1 & c0606=0 & c0404=1) |- ($(TMODE_EorF) & thv_c2327=0x1f & thv_c0811=1 & thv_c0606=0 & thv_c0404=1) ) & ShiftSize & ShiftImmRLI & Dd & Dm+:vsra.^udt^ShiftSize Dd, Dm, ShiftImmRLI is ( ($(AMODE) & cond=15 & c2527=1 & c2323=1 & c0811=1 & c0606=0 & c0404=1) |+ ($(TMODE_EorF) & thv_c2327=0x1f & thv_c0811=1 & thv_c0606=0 & thv_c0404=1) ) & udt & ShiftSize & ShiftImmRLI & Dd & Dm{Dd = VectorShiftRightAccumulate(Dd, Dm,ShiftImmRLI);}@@ -3824,6 +3934,38 @@ define pcodeop VectorShiftNarrowRight;Dd = VectorShiftNarrowRight(Qm,ShiftImmRLI);}+#######+# VRSQRTE+define pcodeop VectorReciprocalSquareRootEstimate;++:vrsqrte.^fdt^32 Qd,Qm is ( ($(AMODE) & cond=15 & c2327=0x7 & c2021=3 & c1619=0xb & c0911=2 & c0707=1 & Q6=1 & c0404=0) |+ ($(TMODE_F) & thv_c2327=0x1f & thv_c2021=3 & thv_c1619=0xb & thv_c0911=2 & thv_c0707=1 & thv_Q6=1 & thv_c0404=0) ) & fdt & Qm & Qd+{+ Qd = VectorReciprocalSquareRootEstimate(Qm,fdt);+}++:vrsqrte.^fdt^32 Dd,Dm is ( ($(AMODE) & cond=15 & c2327=0x7 & c2021=3 & c1619=0xb & c0911=2 & c0707=1 & Q6=0 & c0404=0) |+ ($(TMODE_F) & thv_c2327=0x1f & thv_c2021=3 & thv_c1619=0xb & thv_c0911=2 & thv_c0707=1 & thv_Q6=0 & thv_c0404=0) ) & fdt & Dm & Dd+{+ Dd = VectorReciprocalSquareRootEstimate(Dm,fdt);+}++#######+# VRSQRTS+define pcodeop VectorReciprocalSquareRootStep;++:vrsqrts.f32 Qd,Qn,Qm is ( ($(AMODE) & cond=15 & c2327=0x4 & c2021=2 & c0811=0xf & Q6=1 & c0404=1) |+ ($(TMODE_E) & thv_c2327=0x1e & thv_c2021=2 & thv_c0811=0xf & thv_Q6=1 & thv_c0404=1) ) & Qn & Qm & Qd+{+ Qd = VectorReciprocalSquareRootStep(Qn,Qm);+}++:vrsqrts.f32 Dd,Dn,Dm is ( ($(AMODE) & cond=15 & c2327=0x4 & c2021=2 & c0811=0xf & Q6=0 & c0404=1) |+ ($(TMODE_E) & thv_c2327=0x1e & thv_c2021=2 & thv_c0811=0xf & thv_Q6=0 & thv_c0404=1) ) & Dn & Dm & Dd+{+ Dd = VectorReciprocalSquareRootStep(Dn,Dm);+}+######## VST1 (multiple single elements)@@ -4044,10 +4186,6 @@ thv_vst1DdElement2: Dd^"["^thv_vst1Index^"]" is Dd & thv_vst1Index & thv_c1011=2}-@endif # SIMD--@if defined(VFPv2) || defined(VFPv3) || defined(SIMD)-######## VST2#@@ -4194,15 +4332,15 @@ vst2DdList2: "{"^buildVst2DdList2^"}" is TMode=1 & thv_D22 & thv_c1215 & buildVvst2DdList2: "{"^buildVst2DdList2^"}" is TMode=1 & ((thv_c1011=1 & thv_c0505=1) | (thv_c1011=2 & thv_c0606=1)) & thv_D22 & thv_c1215 & buildVst2DdList2 [ regNum=(thv_D22<<4)+thv_c1215-2; regInc=2; counter=2; ] { } # Double:vst2.^esize1011 vst2DdList2,vst2RnAligned2 is ( ( $(AMODE) & cond=15 & c2327=9 & c2021=0 & c1011<3 & c0809=1 & c0003=15 ) |- ( $(TMODE_F) & thv_c2327=0x13 & thv_c2021=0 & thv_c1011<3 & thv_c0003=15 ) ) & vst2RnAligned2 & esize1011 & vst2DdList2+ ( $(TMODE_F) & thv_c2327=0x13 & thv_c2021=0 & thv_c1011<3 & thv_c0809=1 & thv_c0003=15 ) ) & vst2RnAligned2 & esize1011 & vst2DdList2unimpl:vst2.^esize1011 vst2DdList2,vst2RnAligned2^"!" is ( ( $(AMODE) & cond=15 & c2327=9 & c2021=0 & c1011<3 & c0809=1 & c0003=13 ) |- ( $(TMODE_F) & thv_c2327=0x13 & thv_c2021=0 & thv_c1011<3 & thv_c0003=13 ) ) & vst2RnAligned2 & esize1011 & vst2DdList2+ ( $(TMODE_F) & thv_c2327=0x13 & thv_c2021=0 & thv_c1011<3 & thv_c0809=1 & thv_c0003=13 ) ) & vst2RnAligned2 & esize1011 & vst2DdList2unimpl:vst2.^esize1011 vst2DdList2,vst2RnAligned2,VRm is ( ( $(AMODE) & cond=15 & c2327=9 & c2021=0 & c1011<3 & c0809=1 ) |- ( $(TMODE_F) & thv_c2327=0x13 & thv_c2021=0 & thv_c1011<3 ) ) & vst2RnAligned2 & esize1011 & vst2DdList2 & VRm+ ( $(TMODE_F) & thv_c2327=0x13 & thv_c2021=0 & thv_c1011<3 & thv_c0809=1 ) ) & vst2RnAligned2 & esize1011 & vst2DdList2 & VRmunimpl@@ -4210,85 +4348,175 @@ vst2DdList2: "{"^buildVst2DdList2^"}" is TMode=1 & ((thv_c1011=1 & thv_c0505=1)# VST3#+#######+# VST3 (multiple 3-element structures)+#+++vst3Align: is TMode=0 & c0404=0 { }+vst3Align: "@64" is TMode=0 & c0404=1 { }+vst3Align: is TMode=1 & thv_c0404=0 { }+vst3Align: "@64" is TMode=1 & thv_c0404=1 { }+++vst3RnAligned: "["^VRn^vst3Align^"]" is VRn & vst3Align { export VRn; }++buildvst3DdList: is counter=0 { }+buildvst3DdList: Dreg is counter=1 & Dreg [ counter=0; regNum=regNum+regInc; ] { }+buildvst3DdList: Dreg,buildvst3DdList is buildvst3DdList & Dreg [ counter=counter-1; regNum=regNum+regInc; ] { }++vst3DdList: "{"^buildvst3DdList^"}" is TMode=0 & c0811=4 & D22 & c1215 & buildvst3DdList [ regNum=(D22<<4)+c1215-1; regInc=1; counter=3; ] { } # Single+vst3DdList: "{"^buildvst3DdList^"}" is TMode=0 & c0811=5 & D22 & c1215 & buildvst3DdList [ regNum=(D22<<4)+c1215-2; regInc=2; counter=3; ] { } # Double+vst3DdList: "{"^buildvst3DdList^"}" is TMode=1 & thv_c0811=4 & thv_D22 & thv_c1215 & buildvst3DdList [ regNum=(thv_D22<<4)+thv_c1215-1; regInc=1; counter=3; ] { } # Single+vst3DdList: "{"^buildvst3DdList^"}" is TMode=1 & thv_c0811=5 & thv_D22 & thv_c1215 & buildvst3DdList [ regNum=(thv_D22<<4)+thv_c1215-2; regInc=2; counter=3; ] { } # Double+++:vst3.^esize0607 vst3DdList,vst3RnAligned is ( ( $(AMODE) & cond=15 & c2327=8 & c2021=0 & c0003=15 ) |+ ( $(TMODE_F) & thv_c2327=0x12 & thv_c2021=0 & thv_c0003=15 ) ) & vst3RnAligned & esize0607 & vst3DdList+ unimpl++:vst3.^esize0607 vst3DdList,vst3RnAligned^"!" is ( ( $(AMODE) & cond=15 & c2327=8 & c2021=0 & c0003=13 ) |+ ( $(TMODE_F) & thv_c2327=0x12 & thv_c2021=0 & thv_c0003=13 ) ) & vst3RnAligned & esize0607 & vst3DdList+ unimpl++:vst3.^esize0607 vst3DdList,vst3RnAligned,VRm is ( ( $(AMODE) & cond=15 & c2327=8 & c2021=0) |+ ( $(TMODE_F) & thv_c2327=0x12 & thv_c2021=0 ) ) & vst3RnAligned & esize0607 & vst3DdList & VRm+ unimpl+++#######+# VST3 (single 3-element structure to one lane)+#++vst3Rn: "["^VRn^"]" is VRn { export VRn; }++vst3DdList2: "{"^buildvst3DdList^"}" is TMode=0 & D22 & c1215 & buildvst3DdList [ regNum=(D22<<4)+c1215-1; regInc=1; counter=2; ] { } # Single+vst3DdList2: "{"^buildvst3DdList^"}" is TMode=0 & ((c1011=1 & c0505=1) | (c1011=2 & c0606=1)) & D22 & c1215 & buildvst3DdList [ regNum=(D22<<4)+c1215-2; regInc=2; counter=2; ] { } # Double+vst3DdList2: "{"^buildvst3DdList^"}" is TMode=1 & thv_D22 & thv_c1215 & buildvst3DdList [ regNum=(thv_D22<<4)+thv_c1215-1; regInc=1; counter=2; ] { } # Single+vst3DdList2: "{"^buildvst3DdList^"}" is TMode=1 & ((thv_c1011=1 & thv_c0505=1) | (thv_c1011=2 & thv_c0606=1)) & thv_D22 & thv_c1215 & buildvst3DdList [ regNum=(thv_D22<<4)+thv_c1215-2; regInc=2; counter=2; ] { } # Double++:vst3.^esize1011 vst3DdList2,vst3Rn is ( ( $(AMODE) & cond=15 & c2327=9 & c2021=0 & c1011<3 & c0809=2 & c0003=15 ) |+ ( $(TMODE_F) & thv_c2327=0x13 & thv_c2021=0 & thv_c1011<3 & thv_c0809=2 & thv_c0003=15 ) ) & vst3Rn & esize1011 & vst3DdList2+ unimpl++:vst3.^esize1011 vst3DdList2,vst3Rn^"!" is ( ( $(AMODE) & cond=15 & c2327=9 & c2021=0 & c1011<3 & c0809=2 & c0003=13 ) |+ ( $(TMODE_F) & thv_c2327=0x13 & thv_c2021=0 & thv_c1011<3 & thv_c0809=2 & thv_c0003=13 ) ) & vst3Rn & esize1011 & vst3DdList2+ unimpl++:vst3.^esize1011 vst3DdList2,vst3Rn,VRm is ( ( $(AMODE) & cond=15 & c2327=9 & c2021=0 & c1011<3 & c0809=2 ) |+ ( $(TMODE_F) & thv_c2327=0x13 & thv_c2021=0 & thv_c1011<3 & thv_c0809=2 ) ) & vst3Rn & esize1011 & vst3DdList2 & VRm+ unimpl+######## VST4 (multiple 4-element structures)#-vst4Align: is c0405=0 { }-vst4Align: "@64" is c0405=1 { }-vst4Align: "@128" is c0405=2 { }-vst4Align: "@256" is c0405=3 { }+vst4Align: is TMode=0 & c0405=0 { }+vst4Align: "@64" is TMode=0 & c0405=1 { }+vst4Align: "@128" is TMode=0 & c0405=2 { }+vst4Align: "@256" is TMode=0 & c0405=3 { }+vst4Align: is TMode=1 & thv_c0405=0 { }+vst4Align: "@64" is TMode=1 & thv_c0405=1 { }+vst4Align: "@128" is TMode=1 & thv_c0405=2 { }+vst4Align: "@256" is TMode=1 & thv_c0405=3 { }-vst4RnAligned: "["^Rn^vst4Align^"]" is Rn & vst4Align { export Rn; }+vst4RnAligned: "["^VRn^vst4Align^"]" is VRn & vst4Align { export VRn; }buildVst4DdList: is counter=0 { }buildVst4DdList: Dreg is counter=1 & Dreg [ counter=0; regNum=regNum+regInc; ] { }buildVst4DdList: Dreg,buildVst4DdList is buildVst4DdList & Dreg [ counter=counter-1; regNum=regNum+regInc; ] { }-vst4DdList: "{"^buildVst4DdList^"}" is c0808=0 & D22 & c1215 & buildVst4DdList [ regNum=(D22<<4)+c1215-1; regInc=1; counter=4; ] { } # Single-vst4DdList: "{"^buildVst4DdList^"}" is c0808=1 & D22 & c1215 & buildVst4DdList [ regNum=(D22<<4)+c1215-2; regInc=2; counter=4; ] { } # Double+vst4DdList: "{"^buildVst4DdList^"}" is TMode=0 & c0808=0 & D22 & c1215 & buildVst4DdList [ regNum=(D22<<4)+c1215-1; regInc=1; counter=4; ] { } # Single+vst4DdList: "{"^buildVst4DdList^"}" is TMode=0 & c0808=1 & D22 & c1215 & buildVst4DdList [ regNum=(D22<<4)+c1215-2; regInc=2; counter=4; ] { } # Double+vst4DdList: "{"^buildVst4DdList^"}" is TMode=1 & thv_c0808=0 & thv_D22 & thv_c1215 & buildVst4DdList [ regNum=(thv_D22<<4)+thv_c1215-1; regInc=1; counter=4; ] { } # Single+vst4DdList: "{"^buildVst4DdList^"}" is TMode=1 & thv_c0808=1 & thv_D22 & thv_c1215 & buildVst4DdList [ regNum=(thv_D22<<4)+thv_c1215-2; regInc=2; counter=4; ] { } # Double-:vst4.^esize0607 vst4DdList,vst4RnAligned is $(AMODE) & cond=15 & c2327=8 & c2021=0 & vst4RnAligned & c0911=0 & c0607<3 & esize0607 & c0003=15 & vst4DdList unimpl+:vst4.^esize0607 vst4DdList,vst4RnAligned is ( ($(AMODE) & cond=15 & c2327=8 & c2021=0 & c0911=0 & c0607<3 & c0003=15) |+ ($(TMODE_F) & thv_c2327=0x12 & thv_c2021=0 & thv_c0911=0 & thv_c0607<3 & thv_c0003=15) ) & vst4RnAligned & esize0607 & vst4DdList unimpl-:vst4.^esize0607 vst4DdList,vst4RnAligned^"!" is $(AMODE) & cond=15 & c2327=8 & c2021=0 & vst4RnAligned & c0911=0 & c0607<3 & esize0607 & c0003=13 & vst4DdList unimpl+:vst4.^esize0607 vst4DdList,vst4RnAligned^"!" is ( ($(AMODE) & cond=15 & c2327=8 & c2021=0 & c0911=0 & c0607<3 & c0003=13) |+ ($(TMODE_F) & thv_c2327=0x12 & thv_c2021=0 & thv_c0911=0 & thv_c0607<3 & thv_c0003=13) ) & vst4RnAligned & esize0607 & vst4DdList unimpl-:vst4.^esize0607 vst4DdList,vst4RnAligned,VRm is $(AMODE) & cond=15 & c2327=8 & c2021=0 & vst4RnAligned & c0911=0 & c0607<3 & esize0607 & VRm & vst4DdList unimpl+:vst4.^esize0607 vst4DdList,vst4RnAligned,VRm is ( ($(AMODE) & cond=15 & c2327=8 & c2021=0 & c0911=0 & c0607<3) |+ ($(TMODE_F) & thv_c2327=0x12 & thv_c2021=0 & thv_c0911=0 & thv_c0607<3) ) & VRm & vst4RnAligned & esize0607 & vst4DdList unimpl#######-# VST4 (single 4-element structure to one lane)+# VST4 (single 4-element structure from one lane)#-vst4Index: val is c0507 & c1011 [ val = c0507 >> c1011; ] { tmp:4 = val; export tmp; }+vst4Index: val is TMode=0 & c0507 & c1011 [ val = c0507 >> c1011; ] { tmp:4 = val; export tmp; }+vst4Index: val is TMode=1 & thv_c0507 & thv_c1011 [ val = thv_c0507 >> thv_c1011; ] { tmp:4 = val; export tmp; }+vst4DdElement2: Dreg^"["^vst4Index^"]" is Dreg & vst4Index{}-vst4Align2: is c0404=0 & (c1111=0 | c0505=0) { }-vst4Align2: "@32" is c1011=0 & c0404=1 { }-vst4Align2: "@64" is (c1011=1 & c0404=1) | (c1011=2 & c0405=1) { }-vst4Align2: "@128" is c1011=2 & c0405=2 { }+vst4Align2: is TMode=0 & c0404=0 & (c1111=0 | c0505=0) { }+vst4Align2: "@32" is TMode=0 & c1011=0 & c0404=1 { }+vst4Align2: "@64" is TMode=0 & ((c1011=1 & c0404=1) | (c1011=2 & c0405=1)) { }+vst4Align2: "@128" is TMode=0 & c1011=2 & c0405=2 { }+vst4Align2: is TMode=1 & thv_c0404=0 & (thv_c1111=0 | thv_c0505=0) { }+vst4Align2: "@32" is TMode=1 & thv_c1011=0 & thv_c0404=1 { }+vst4Align2: "@64" is TMode=1 & ((thv_c1011=1 & thv_c0404=1) | (thv_c1011=2 & thv_c0405=1)) { }+vst4Align2: "@128" is TMode=1 & thv_c1011=2 & thv_c0405=2 { }-vst4RnAligned2: "["^Rn^vst4Align2^"]" is Rn & vst4Align2 { export Rn; }+vst4RnAligned2: "["^VRn^vst4Align2^"]" is VRn & vst4Align2 { export VRn; }buildVst4DdList2: is counter=0 { }buildVst4DdList2: vst4DdElement2 is counter=1 & vst4DdElement2 [ counter=0; regNum=regNum+regInc; ] { }buildVst4DdList2: vst4DdElement2,buildVst4DdList2 is vst4DdElement2 & buildVst4DdList2 [ counter=counter-1; regNum=regNum+regInc; ] { }-vst4DdList2: "{"^buildVst4DdList2^"}" is D22 & c1215 & buildVst4DdList2 [ regNum=(D22<<4)+c1215-1; regInc=1; counter=4; ] { } # Single-vst4DdList2: "{"^buildVst4DdList2^"}" is ((c1011=1 & c0505=1) | (c1011=2 & c0606=1)) & D22 & c1215 & buildVst4DdList2 [ regNum=(D22<<4)+c1215-2; regInc=2; counter=4; ] { } # Double+vst4DdList2: "{"^buildVst4DdList2^"}" is TMode=0 & D22 & c1215 & buildVst4DdList2 [ regNum=(D22<<4)+c1215-1; regInc=1; counter=4; ] { } # Single+vst4DdList2: "{"^buildVst4DdList2^"}" is TMode=0 & ((c1011=1 & c0505=1) | (c1011=2 & c0606=1)) & D22 & c1215 & buildVst4DdList2 [ regNum=(D22<<4)+c1215-2; regInc=2; counter=4; ] { } # Double+vst4DdList2: "{"^buildVst4DdList2^"}" is TMode=1 & thv_D22 & thv_c1215 & buildVst4DdList2 [ regNum=(thv_D22<<4)+thv_c1215-1; regInc=1; counter=4; ] { } # Single+vst4DdList2: "{"^buildVst4DdList2^"}" is TMode=1 & ((thv_c1011=1 & thv_c0505=1) | (thv_c1011=2 & thv_c0606=1)) & thv_D22 & thv_c1215 & buildVst4DdList2 [ regNum=(thv_D22<<4)+thv_c1215-2; regInc=2; counter=4; ] { } # Double-:vst4.^esize1011 vst4DdList2,vst4RnAligned2 is $(AMODE) & cond=15 & c2327=9 & c2021=0 & vst4RnAligned2 & c1011<3 & esize1011 & c0809=3 & c0003=15 & vst4DdList2 unimpl+:vst4.^esize1011 vst4DdList2,vst4RnAligned2 is ( ($(AMODE) & cond=15 & c2327=9 & c2021=0 & c1011<3 & c0809=3 & c0003=15) |+ ($(TMODE_F) & thv_c2327=0x13 & thv_c2021=0 & thv_c1011<3 & thv_c0809=3 & thv_c0003=15) ) & vst4RnAligned2 & esize1011 & vst4DdList2 unimpl-:vst4.^esize1011 vst4DdList2,vst4RnAligned2^"!" is $(AMODE) & cond=15 & c2327=9 & c2021=0 & vst4RnAligned2 & c1011<3 & esize1011 & c0809=3 & c0003=13 & vst4DdList2 unimpl+:vst4.^esize1011 vst4DdList2,vst4RnAligned2^"!" is ( ($(AMODE) & cond=15 & c2327=9 & c2021=0 & c1011<3 & c0809=3 & c0003=13) |+ ($(TMODE_F) & thv_c2327=0x13 & thv_c2021=0 & thv_c1011<3 & thv_c0809=3 & thv_c0003=13) ) & vst4RnAligned2 & esize1011 & vst4DdList2 unimpl-:vst4.^esize1011 vst4DdList2,vst4RnAligned2,VRm is $(AMODE) & cond=15 & c2327=9 & c2021=0 & vst4RnAligned2 & c1011<3 & esize1011 & c0809=3 & VRm & vst4DdList2 unimpl+:vst4.^esize1011 vst4DdList2,vst4RnAligned2,VRm is ( ($(AMODE) & cond=15 & c2327=9 & c2021=0 & c1011<3 & c0809=3) |+ ($(TMODE_F) & thv_c2327=0x13 & thv_c2021=0 & thv_c1011<3 & thv_c0809=3) ) & VRm & vst4RnAligned2 & esize1011 & vst4DdList2 unimpl######## VST4 (single 4-element structure to all lanes)#-vst4Align3: is c0404=0 { }-vst4Align3: "@32" is c0404=1 & c0607=0 { }-vst4Align3: "@64" is c0404=1 & (c0607=1 | c0607=2) { }-vst4Align3: "@128" is c0404=1 & c0607=3 { }+vst4Align3: is TMode=0 & c0404=0 { }+vst4Align3: "@32" is TMode=0 & c0404=1 & c0607=0 { }+vst4Align3: "@64" is TMode=0 & c0404=1 & (c0607=1 | c0607=2) { }+vst4Align3: "@128" is TMode=0 & c0404=1 & c0607=3 { }+vst4Align3: is TMode=1 & thv_c0404=0 { }+vst4Align3: "@32" is TMode=1 & thv_c0404=1 & thv_c0607=0 { }+vst4Align3: "@64" is TMode=1 & thv_c0404=1 & (thv_c0607=1 | thv_c0607=2) { }+vst4Align3: "@128" is TMode=1 & thv_c0404=1 & thv_c0607=3 { }-vst4RnAligned3: "["^Rn^vst4Align3^"]" is Rn & vst4Align3 { export Rn; }+vst4RnAligned3: "["^VRn^vst4Align3^"]" is VRn & vst4Align3 { export VRn; }buildVst4DdList3: is counter=0 { }buildVst4DdList3: Dreg^"[]" is counter=1 & Dreg [ counter=0; regNum=regNum+regInc; ] { }buildVst4DdList3: Dreg^"[]",buildVst4DdList3 is Dreg & buildVst4DdList3 [ counter=counter-1; regNum=regNum+regInc; ] { }-vst4DdList3: "{"^buildVst4DdList3^"}" is c0505=0 & D22 & c1215 & buildVst4DdList3 [ regNum=(D22<<4)+c1215-1; regInc=1; counter=4; ] { } # Single-vst4DdList3: "{"^buildVst4DdList3^"}" is c0505=1 & D22 & c1215 & buildVst4DdList3 [ regNum=(D22<<4)+c1215-2; regInc=2; counter=4; ] { } # Double+vst4DdList3: "{"^buildVst4DdList3^"}" is TMode=0 & c0505=0 & D22 & c1215 & buildVst4DdList3 [ regNum=(D22<<4)+c1215-1; regInc=1; counter=4; ] { } # Single+vst4DdList3: "{"^buildVst4DdList3^"}" is TMode=0 & c0505=1 & D22 & c1215 & buildVst4DdList3 [ regNum=(D22<<4)+c1215-2; regInc=2; counter=4; ] { } # Double+vst4DdList3: "{"^buildVst4DdList3^"}" is TMode=1 & thv_c0505=0 & thv_D22 & thv_c1215 & buildVst4DdList3 [ regNum=(thv_D22<<4)+thv_c1215-1; regInc=1; counter=4; ] { } # Single+vst4DdList3: "{"^buildVst4DdList3^"}" is TMode=1 & thv_c0505=1 & thv_D22 & thv_c1215 & buildVst4DdList3 [ regNum=(thv_D22<<4)+thv_c1215-2; regInc=2; counter=4; ] { } # Double-:vst4.^esize0607 vst4DdList3,vst4RnAligned3 is $(AMODE) & cond=15 & c2327=9 & c2021=0 & vst4RnAligned3 & c0811=15 & esize0607 & c0003=15 & vst4DdList3 unimpl+:vst4.^esize0607 vst4DdList3,vst4RnAligned3 is ( ($(AMODE) & cond=15 & c2327=9 & c2021=0 & c0811=15 & c0003=15) |+ ($(TMODE_F) & thv_c2327=9 & thv_c2021=0 & thv_c0811=15 & thv_c0003=15) ) & vst4RnAligned3 & esize0607 & vst4DdList3 unimpl-:vst4.^esize0607 vst4DdList3,vst4RnAligned3^"!" is $(AMODE) & cond=15 & c2327=9 & c2021=0 & vst4RnAligned3 & c0811=15 & esize0607 & c0003=13 & vst4DdList3 unimpl+:vst4.^esize0607 vst4DdList3,vst4RnAligned3^"!" is ( ($(AMODE) & cond=15 & c2327=9 & c2021=0 & c0811=15 & c0003=13) |+ ($(TMODE_F) & thv_c2327=9 & thv_c2021=0 & thv_c0811=15 & thv_c0003=13) ) & vst4RnAligned3 & esize0607 & vst4DdList3 unimpl-:vst4.^esize0607 vst4DdList3,vst4RnAligned3,VRm is $(AMODE) & cond=15 & c2327=9 & c2021=0 & vst4RnAligned3 & c0811=15 & esize0607 & VRm & vst4DdList3 unimpl+:vst4.^esize0607 vst4DdList3,vst4RnAligned3,VRm is ( ($(AMODE) & cond=15 & c2327=9 & c2021=0 & c0811=15) |+ ($(TMODE_F) & thv_c2327=9 & thv_c2021=0 & thv_c0811=15) ) & VRm & vst4RnAligned3 & esize0607 & vst4DdList3 unimpl+@endif # SIMD+@if defined(VFPv2) || defined(VFPv3) || defined(SIMD)######## VSTM (A1)@@ -4368,7 +4596,6 @@ vstmSdList: "{"^buildVstmSdList^"}" is TMode=1 & thv_D22 & thv_c1215 & thv_c0007}-######## VSTR#@@ -4385,6 +4612,7 @@ vstmSdList: "{"^buildVstmSdList^"}" is TMode=1 & thv_D22 & thv_c1215 & thv_c0007@endif # VFPv2 || VFPv3 || SIMD+######## VSUB#@@ -4392,6 +4620,7 @@ vstmSdList: "{"^buildVstmSdList^"}" is TMode=1 & thv_D22 & thv_c1215 & thv_c0007@if defined(SIMD)define pcodeop FloatVectorSub;+define pcodeop VectorSubAndNarrow;:vsub.i^esize2021 Dd,Dn,Dm is ( ($(AMODE) & cond=15 & c2327=6 & c0811=8 & Q6=0 & c0404=0) |($(TMODE_F) & thv_c2327=0x1e & thv_c0811=8 & thv_Q6=0 & thv_c0404=0)) & esize2021 & Dn & Dd & Dm@@ -4417,6 +4646,24 @@ define pcodeop FloatVectorSub;Qd = FloatVectorSub(Qn,Qm,2:1,32:1);}+:vsubhn.i^esize2021x2 Dd,Qn,Qm is ( ($(AMODE) & cond=15 & c2327=5 & c0811=6 & Q6=0 & c0404=0) |+ ($(TMODE_E) & thv_c2327=0x1f & thv_c0811=6 & thv_Q6=0 & thv_c0404=0)) & esize2021x2 & Dd & Qn & Qm+{+ Dd = VectorSubAndNarrow(Qn,Qm,esize2021x2);+}++:vsubl.^udt^esize2021 Qd,Dn,Dm is ( ($(AMODE) & cond=15 & c2527=1 & c2323=1 & c2021<3 & c0811=2 & c0606=0 & c0404=0) |+ ($(TMODE_EorF) & thv_c2327=0x1f & thv_c2021<3 & thv_c0811=2 & thv_c0606=0 & thv_c0404=0) ) & esize2021 & udt & Dn & Qd & Dm+{+ Qd = VectorSub(Dn,Dm,esize2021,udt);+}++:vsubw.^udt^esize2021 Qd,Qn,Dm is ( ($(AMODE) & cond=15 & c2527=1 & c2323=1 & c2021<3 & c0811=3 & c0606=0 & c0404=0) |+ ($(TMODE_EorF) & thv_c2327=0x1f & thv_c2021<3 & thv_c0811=3 & thv_c0606=0 & thv_c0404=0) ) & esize2021 & udt & Qn & Qd & Dm+{+ Qd = VectorSub(Qn,Dm,esize2021,udt);+}+@endif # SIMD@if defined(VFPv2) || defined(VFPv3)@@ -4441,54 +4688,10 @@ define pcodeop FloatVectorSub;Dd = Dn f- Dm;}-:vsubl.^udt^esize2021 Qd,Dn,Dm is ( ($(AMODE) & cond=15 & c2527=1 & c2323=1 & c2021<3 & c0811=2 & c0606=0 & c0404=0) |- ($(TMODE_EorF) & thv_c2327=0x1f & thv_c2021<3 & thv_c0811=2 & thv_c0606=0 & thv_c0404=0) ) & esize2021 & udt & Dn & Qd & Dm-{- Qd = VectorSub(Dn,Dm,esize2021,udt);-}--:vsubw.^udt^esize2021 Qd,Qn,Dm is ( ($(AMODE) & cond=15 & c2527=1 & c2323=1 & c2021<3 & c0811=3 & c0606=0 & c0404=0) |- ($(TMODE_EorF) & thv_c2327=0x1f & thv_c2021<3 & thv_c0811=3 & thv_c0606=0 & thv_c0404=0) ) & esize2021 & udt & Qn & Qd & Dm-{- Qd = VectorSub(Qn,Dm,esize2021,udt);-}--######-# VTST-#--define pcodeop VectorTest;--:vtst.^esize2021 Qd, Qn, Qm is ( ($(AMODE) & cond=15 & c2327=4 & c0811=8 & c0606=1 & c0404=1) |- ($(TMODE_E) & thv_c2327=0x1e & thv_c0811=8 & thv_c0606=1 & thv_c0404=1) ) & esize2021 & Qm & Qn & Qd-{- Qd = VectorTest(Qn, Qm);-}--:vtst.^esize2021 Dd, Dn, Dm is ( ($(AMODE) & cond=15 & c2327=4 & c0811=8 & c0606=0 & c0404=1) |- ($(TMODE_E) & thv_c2327=0x1e & thv_c0811=8 & thv_c0606=0 & thv_c0404=1) ) & esize2021 & Dm & Dn & Dd-{- Dd = VectorTest(Dn, Dm);-}--@endif # VFPv2 || VFPv3@if defined(SIMD)-define pcodeop VectorTranspose;--:vtrn^COND^"."^esize1819 Dd,Dm is COND & ( ($(AMODE) & cond=15 & c2327=7 & c2021=3 & c1617=2 & c0811=0 & c0707=1 & Q6=0 & c0404=0) |- ($(TMODE_F) & thv_c2327=0x1f & thv_c2021=3 & thv_c1617=2 & thv_c0811=0 & thv_c0707=1 & thv_Q6=0 & thv_c0404=0)) & esize1819 & Dd & Dm-{- Dd = VectorTranspose(Dm,esize1819);-}--:vtrn^COND^"."^esize1819 Qd,Qm is COND & ( ($(AMODE) & cond=15 & c2327=7 & c2021=3 & c1617=2 & c0811=0 & c0707=1 & Q6=1 & c0404=0) |- ($(TMODE_F) & thv_c2327=0x1f & thv_c2021=3 & thv_c1617=2 & thv_c0811=0 & thv_c0707=1 & thv_Q6=1 & thv_c0404=0) ) & esize1819 & Qm & Qd-{- Qd = VectorTranspose(Qm,esize1819);-}######## VSWP@@ -4511,6 +4714,10 @@ define pcodeop VectorTranspose;}+###########+# VTBL/VTBX+#+define pcodeop VectorTableLookup;buildVtblDdList: is counter=0 { }@@ -4536,12 +4743,46 @@ vtblDdList: "{"^buildVtblDdList^"}" is TMode=1 & thv_c0809=3 & thv_N7 & thv_c161VRd = VectorTableLookup(VRm,VRn,vtblDdList);}-:vtblx.8 VRd,vtblDdList,VRm is ( ($(AMODE) & cond=15 & c2327=7 & c2021=3 & c1011=2 & c0606=1 & c0404=0) |+:vtbx.8 VRd,vtblDdList,VRm is ( ($(AMODE) & cond=15 & c2327=7 & c2021=3 & c1011=2 & c0606=1 & c0404=0) |($(TMODE_F) & thv_c2327=0x1f & thv_c2021=3 & thv_c1011=2 & thv_c0606=1 & thv_c0404=0 ) ) & VRm & VRd & VRn & vtblDdList{VRd = VectorTableLookup(VRm,VRn,vtblDdList);}++######+# VTST+#++define pcodeop VectorTest;++:vtst.^esize2021 Qd, Qn, Qm is ( ($(AMODE) & cond=15 & c2327=4 & c0811=8 & c0606=1 & c0404=1) |+ ($(TMODE_E) & thv_c2327=0x1e & thv_c0811=8 & thv_c0606=1 & thv_c0404=1) ) & esize2021 & Qm & Qn & Qd+{+ Qd = VectorTest(Qn, Qm);+}++:vtst.^esize2021 Dd, Dn, Dm is ( ($(AMODE) & cond=15 & c2327=4 & c0811=8 & c0606=0 & c0404=1) |+ ($(TMODE_E) & thv_c2327=0x1e & thv_c0811=8 & thv_c0606=0 & thv_c0404=1) ) & esize2021 & Dm & Dn & Dd+{+ Dd = VectorTest(Dn, Dm);+}++define pcodeop VectorTranspose;++:vtrn^COND^"."^esize1819 Dd,Dm is COND & ( ($(AMODE) & cond=15 & c2327=7 & c2021=3 & c1617=2 & c0811=0 & c0707=1 & Q6=0 & c0404=0) |+ ($(TMODE_F) & thv_c2327=0x1f & thv_c2021=3 & thv_c1617=2 & thv_c0811=0 & thv_c0707=1 & thv_Q6=0 & thv_c0404=0)) & esize1819 & Dd & Dm+{+ Dd = VectorTranspose(Dm,esize1819);+}++:vtrn^COND^"."^esize1819 Qd,Qm is COND & ( ($(AMODE) & cond=15 & c2327=7 & c2021=3 & c1617=2 & c0811=0 & c0707=1 & Q6=1 & c0404=0) |+ ($(TMODE_F) & thv_c2327=0x1f & thv_c2021=3 & thv_c1617=2 & thv_c0811=0 & thv_c0707=1 & thv_Q6=1 & thv_c0404=0) ) & esize1819 & Qm & Qd+{+ Qd = VectorTranspose(Qm,esize1819);+}++######## VUZP#