Thomas Tsou | 0a3dc4c | 2013-11-09 02:29:55 -0500 | [diff] [blame] | 1 | /* |
Pau Espin Pedrol | bdb970e | 2019-07-22 12:03:39 +0200 | [diff] [blame] | 2 | * NEON complex multiplication |
Thomas Tsou | 0a3dc4c | 2013-11-09 02:29:55 -0500 | [diff] [blame] | 3 | * Copyright (C) 2012,2013 Thomas Tsou <tom@tsou.cc> |
| 4 | * |
Pau Espin Pedrol | 21d03d3 | 2019-07-22 12:05:52 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: LGPL-2.1+ |
| 6 | * |
Thomas Tsou | 0a3dc4c | 2013-11-09 02:29:55 -0500 | [diff] [blame] | 7 | * 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 Tsou | 0a3dc4c | 2013-11-09 02:29:55 -0500 | [diff] [blame] | 16 | */ |
| 17 | |
| 18 | .syntax unified |
| 19 | .text |
| 20 | .align 2 |
| 21 | .global neon_cmplx_mul_4n |
| 22 | .type neon_cmplx_mul_4n, %function |
| 23 | neon_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 |