blob: 842ed9f3865a0cc8bddaa8c702b54e86baf7d905 [file] [log] [blame]
Thomas Tsou7e4e5362013-10-30 21:18:55 -04001/*
2 * NEON type conversions
3 * Copyright (C) 2012, 2013 Thomas Tsou <tom@tsou.cc>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20 .syntax unified
21 .text
22 .align 2
23 .global neon_convert_ps_si16_4n
24 .type neon_convert_ps_si16_4n, %function
25neon_convert_ps_si16_4n:
26 vld1.32 {q1}, [r2]
27.loop_fltint:
28 vld1.64 {d0-d1}, [r1]!
29 vmul.f32 q0, q1
30 vcvt.s32.f32 q2, q0
31 vqmovn.s32 d0, q2
32 vst1.64 {d0}, [r0]!
33 subs r3, #1
34 bne .loop_fltint
35 bx lr
36 .size neon_convert_ps_si16_4n, .-neon_convert_ps_si16_4n
37 .text
38 .align 2
39 .global neon_convert_si16_ps_4n
40 .type neon_convert_si16_ps_4n, %function
41neon_convert_si16_ps_4n:
42.loop_intflt:
43 vld1.64 {d0}, [r1]!
44 vmovl.s16 q1, d0
45 vcvt.f32.s32 q0, q1
46 vst1.64 {q0}, [r0]!
47 subs r2, #1
48 bne .loop_intflt
49 bx lr
50 .size neon_convert_si16_ps_4n, .-neon_convert_si16_ps_4n
51 .section .note.GNU-stack,"",%progbits