Debian Codegraph @

src/libmpg123/synth_neon64_float.S

raw
1 /*
2 synth_neon64_float: NEON optimized synth for AArch64 (float output version)
3
4 copyright 1995-2014 by the mpg123 project - free software under the terms of the LGPL 2.1
5 see COPYING and AUTHORS files in distribution or http://mpg123.org
6 initially written by Taihei Monma
7 */
8
9 #include "aarch64_defs.h"
10 #include "mangle.h"
11
12 RODATA
13 ALIGN16
14 scale:
15 .word 939524096
16 .text
17 ALIGN4
18 .globl ASM_NAME(INT123_synth_1to1_real_neon64_asm)
19 #ifdef __ELF__
20 .type ASM_NAME(INT123_synth_1to1_real_neon64_asm), %function
21 #endif
22 ASM_NAME(INT123_synth_1to1_real_neon64_asm):
23 add x0, x0, #64
24 sub x0, x0, x3, lsl #2
25 adrp x5, AARCH64_PCREL_HI(scale)
26 add x5, x5, AARCH64_PCREL_LO(scale)
27 ld1r {v28.4s}, [x5]
28
29 mov w4, #4
30 mov x5, #128
31 1:
32 ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5
33 ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5
34 ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], #64
35 ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x1], #64
36
37 fmul v24.4s, v0.4s, v16.4s
38 fmul v25.4s, v4.4s, v20.4s
39 fmla v24.4s, v1.4s, v17.4s
40 fmla v25.4s, v5.4s, v21.4s
41 fmla v24.4s, v2.4s, v18.4s
42 fmla v25.4s, v6.4s, v22.4s
43 fmla v24.4s, v3.4s, v19.4s
44 fmla v25.4s, v7.4s, v23.4s
45
46 ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5
47 ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5
48 ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], #64
49 ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x1], #64
50
51 fmul v26.4s, v0.4s, v16.4s
52 fmul v27.4s, v4.4s, v20.4s
53 fmla v26.4s, v1.4s, v17.4s
54 fmla v27.4s, v5.4s, v21.4s
55 fmla v26.4s, v2.4s, v18.4s
56 fmla v27.4s, v6.4s, v22.4s
57 fmla v26.4s, v3.4s, v19.4s
58 fmla v27.4s, v7.4s, v23.4s
59
60 faddp v0.4s, v24.4s, v25.4s
61 faddp v1.4s, v26.4s, v27.4s
62 faddp v0.4s, v0.4s, v1.4s
63 ld2 {v4.4s,v5.4s}, [x2]
64 fmul v4.4s, v0.4s, v28.4s
65 st2 {v4.4s,v5.4s}, [x2], #32
66
67 subs w4, w4, #1
68 b.ne 1b
69
70 mov w4, #4
71 mov x6, #-64
72 2:
73 ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5
74 ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5
75 ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], x6
76 ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x1], x6
77
78 fmul v24.4s, v0.4s, v16.4s
79 fmul v25.4s, v4.4s, v20.4s
80 fmla v24.4s, v1.4s, v17.4s
81 fmla v25.4s, v5.4s, v21.4s
82 fmla v24.4s, v2.4s, v18.4s
83 fmla v25.4s, v6.4s, v22.4s
84 fmla v24.4s, v3.4s, v19.4s
85 fmla v25.4s, v7.4s, v23.4s
86
87 ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x0], x5
88 ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x0], x5
89 ld1 {v16.4s,v17.4s,v18.4s,v19.4s}, [x1], x6
90 ld1 {v20.4s,v21.4s,v22.4s,v23.4s}, [x1], x6
91
92 fmul v26.4s, v0.4s, v16.4s
93 fmul v27.4s, v4.4s, v20.4s
94 fmla v26.4s, v1.4s, v17.4s
95 fmla v27.4s, v5.4s, v21.4s
96 fmla v26.4s, v2.4s, v18.4s
97 fmla v27.4s, v6.4s, v22.4s
98 fmla v26.4s, v3.4s, v19.4s
99 fmla v27.4s, v7.4s, v23.4s
100
101 faddp v0.4s, v24.4s, v25.4s
102 faddp v1.4s, v26.4s, v27.4s
103 faddp v0.4s, v0.4s, v1.4s
104 ld2 {v4.4s,v5.4s}, [x2]
105 fmul v4.4s, v0.4s, v28.4s
106 st2 {v4.4s,v5.4s}, [x2], #32
107
108 subs w4, w4, #1
109 b.ne 2b
110
111 eor w0, w0, w0
112
113 ret
114
115 NONEXEC_STACK