blob: b4cd229c617e2b3db3e3e602c3eae52438c3b958 [file] [log] [blame]
Thomas Tsou0a3dc4c2013-11-09 02:29:55 -05001/*
Pau Espin Pedrolbdb970e2019-07-22 12:03:39 +02002 * NEON complex multiplication
Thomas Tsou0a3dc4c2013-11-09 02:29:55 -05003 * Copyright (C) 2012,2013 Thomas Tsou <tom@tsou.cc>
4 *
Pau Espin Pedrol21d03d32019-07-22 12:05:52 +02005 * SPDX-License-Identifier: LGPL-2.1+
6 *
Thomas Tsou0a3dc4c2013-11-09 02:29:55 -05007 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
Thomas Tsou0a3dc4c2013-11-09 02:29:55 -050016 */
17
18 .syntax unified
19 .text
20 .align 2
21 .global neon_cmplx_mul_4n
22 .type neon_cmplx_mul_4n, %function
23neon_cmplx_mul_4n:
24 vpush {q4-q7}
25.loop_mul:
26 vld2.32 {q0-q1}, [r1]!
27 vld2.32 {q2-q3}, [r2]!
28 vmul.f32 q4, q0, q2
29 vmul.f32 q5, q1, q3
30 vmul.f32 q6, q0, q3
31 vmul.f32 q7, q2, q1
32 vsub.f32 q8, q4, q5
33 vadd.f32 q9, q6, q7
34 vst2.32 {q8-q9}, [r0]!
35 subs r3, #1
36 bne .loop_mul
37 vpop {q4-q7}
38 bx lr
39 .size neon_cmplx_mul_4n, .-neon_cmplx_mul_4n
40 .section .note.GNU-stack,"",%progbits