macOS vout: fix forgotten ';'
[vlc.git] / modules / arm_neon / amplify.S
blob59c945445b7636642ede5bed461987047a9aaa72
1  @*****************************************************************************
2  @ amplify.S : ARM NEON software amplification
3  @*****************************************************************************
4  @ Copyright (C) 2012 RĂ©mi Denis-Courmont
5  @
6  @ This program is free software; you can redistribute it and/or modify
7  @ it under the terms of the GNU Lesser General Public License as published by
8  @ the Free Software Foundation; either version 2.1 of the License, or
9  @ (at your option) any later version.
10  @
11  @ This program is distributed in the hope that it will be useful,
12  @ but WITHOUT ANY WARRANTY; without even the implied warranty of
13  @ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  @ GNU Lesser General Public License for more details.
15  @
16  @ You should have received a copy of the GNU Lesser General Public License
17  @ along with this program; if not, write to the Free Software Foundation,
18  @ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
19  @****************************************************************************/
21 #include "asm.S"
23         .syntax unified
24 #if HAVE_AS_FPU_DIRECTIVE
25         .fpu    neon
26 #endif
27         .text
29 #define DST     r0
30 #define SRC     r1
31 #define SIZE    r2
32         .align 2
33 function amplify_float_arm_neon
34         cmp             SIZE,   #0
35         it              eq
36         bxeq            lr
37 #ifdef __ARM_PCS
38         vmov            s0,     r3      @ softfp
39 #endif
40         pld             [SRC,   #64]
41         vld1.f32        {d16-d17},      [SRC,:128]!
42         subs            SIZE,   SIZE,   #16
43         vmul.f32        d16,    d16,    d0[0]
44         vmul.f32        d17,    d17,    d0[0]
45         blo             5f
46         pld             [SRC,   #64]
47         vld1.f32        {d18-d19},      [SRC,:128]!
48         subs            SIZE,   SIZE,   #16
49         vmul.f32        d18,    d18,    d0[0]
50         vmul.f32        d19,    d19,    d0[0]
51         blo             2f
52 1:      @ main loop starts
53         pld             [SRC,   #64]
54         vld1.f32        {d20-d21},      [SRC,:128]!
55         subs            SIZE,   SIZE,   #16
56         vmul.f32        d20,    d20,    d0[0]
57         vmul.f32        d21,    d21,    d0[0]
58         vst1.f32        {d16-d17},      [DST,:128]!
59         blo             3f
60         pld             [SRC,   #64]
61         vld1.f32        {d16-d17},      [SRC,:128]!
62         subs            SIZE,   SIZE,   #16
63         vmul.f32        d16,    d16,    d0[0]
64         vmul.f32        d17,    d17,    d0[0]
65         vst1.f32        {d18-d19},      [DST,:128]!
66         blo             4f
67         pld             [SRC,   #64]
68         vld1.f32        {d18-d19},      [SRC,:128]!
69         subs            SIZE,   SIZE,   #16
70         vmul.f32        d18,    d18,    d0[0]
71         vmul.f32        d19,    d19,    d0[0]
72         vst1.f32        {d20-d21},      [DST,:128]!
73         bhi             1b
74         @ main loop ends
75 2:      vst1.f32        {d16-d17},      [DST,:128]!
76         vst1.f32        {d18-d19},      [DST,:128]!
77         bx              lr
78 3:      vst1.f32        {d18-d19},      [DST,:128]!
79         vst1.f32        {d20-d21},      [DST,:128]!
80         bx              lr
81 4:      vst1.f32        {d20-d21},      [DST,:128]!
82 5:      vst1.f32        {d16-d17},      [DST,:128]!
83         bx              lr