Skip to content

Commit 5f855d9

Browse files
authored
Merge pull request #1475 from ashwinyes/develop_20180227_utest_dsdot_fixes
ARM64: Fix utest dsdot errors
2 parents 719b68f + fa9ca65 commit 5f855d9

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

kernel/arm64/dot.S

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7474
#if !defined(DSDOT)
7575
fmadd DOTF, TMPX, TMPY, DOTF
7676
#else // DSDOT
77-
fmul TMPX, TMPX, TMPY
77+
fcvt d3, TMPY
7878
fcvt d2, TMPX
79+
fmul d2, d2, d3
7980
fadd DOTF, DOTF, d2
8081
#endif
8182
.endm
@@ -87,12 +88,14 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8788
#if !defined(DSDOT)
8889
fmla v0.4s, v2.4s, v3.4s
8990
#else
90-
fmul v2.4s, v2.4s, v3.4s
91-
ext v3.16b, v2.16b, v2.16b, #8
92-
fcvtl v2.2d, v2.2s
91+
fcvtl2 v5.2d, v3.4s
92+
fcvtl2 v4.2d, v2.4s
9393
fcvtl v3.2d, v3.2s
94+
fcvtl v2.2d, v2.2s
95+
fmul v4.2d, v4.2d, v5.2d
96+
fmul v2.2d, v2.2d, v3.2d
97+
fadd v2.2d, v2.2d, v4.2d
9498
fadd v0.2d, v0.2d, v2.2d
95-
fadd v0.2d, v0.2d, v3.2d
9699
#endif
97100
#else //DOUBLE
98101
ld1 {v2.2d, v3.2d}, [X], #32
@@ -136,8 +139,9 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
136139
#if !defined(DSDOT)
137140
fmadd DOTF, TMPX, TMPY, DOTF
138141
#else // DSDOT
139-
fmul TMPX, TMPX, TMPY
142+
fcvt d3, TMPY
140143
fcvt d2, TMPX
144+
fmul d2, d2, d3
141145
fadd DOTF, DOTF, d2
142146
#endif
143147
.endm

0 commit comments

Comments
 (0)