Thomas Tsou | 7e4e536 | 2013-10-30 21:18:55 -0400 | [diff] [blame] | 1 | /* |
| 2 | * NEON type conversions |
| 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 | 7e4e536 | 2013-10-30 21:18:55 -0400 | [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 | 7e4e536 | 2013-10-30 21:18:55 -0400 | [diff] [blame] | 16 | */ |
| 17 | |
| 18 | .syntax unified |
| 19 | .text |
| 20 | .align 2 |
| 21 | .global neon_convert_ps_si16_4n |
| 22 | .type neon_convert_ps_si16_4n, %function |
| 23 | neon_convert_ps_si16_4n: |
| 24 | vld1.32 {q1}, [r2] |
| 25 | .loop_fltint: |
| 26 | vld1.64 {d0-d1}, [r1]! |
| 27 | vmul.f32 q0, q1 |
| 28 | vcvt.s32.f32 q2, q0 |
| 29 | vqmovn.s32 d0, q2 |
| 30 | vst1.64 {d0}, [r0]! |
| 31 | subs r3, #1 |
| 32 | bne .loop_fltint |
| 33 | bx lr |
| 34 | .size neon_convert_ps_si16_4n, .-neon_convert_ps_si16_4n |
| 35 | .text |
| 36 | .align 2 |
| 37 | .global neon_convert_si16_ps_4n |
| 38 | .type neon_convert_si16_ps_4n, %function |
| 39 | neon_convert_si16_ps_4n: |
| 40 | .loop_intflt: |
| 41 | vld1.64 {d0}, [r1]! |
| 42 | vmovl.s16 q1, d0 |
| 43 | vcvt.f32.s32 q0, q1 |
| 44 | vst1.64 {q0}, [r0]! |
| 45 | subs r2, #1 |
| 46 | bne .loop_intflt |
| 47 | bx lr |
| 48 | .size neon_convert_si16_ps_4n, .-neon_convert_si16_ps_4n |
| 49 | .section .note.GNU-stack,"",%progbits |