199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//
299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//  Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//
499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//  Use of this source code is governed by a BSD-style license
599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//  that can be found in the LICENSE file in the root of the source
699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//  tree. An additional intellectual property rights grant can be found
799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//  in the file PATENTS.  All contributing project authors may
899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//  be found in the AUTHORS file in the root of the source tree.
999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//
1099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//  This file was originally licensed as follows. It has been
1199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//  relicensed with permission from the copyright holders.
1299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//
1399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
1499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//
1599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// File Name:  armSP_FFT_CToC_SC32_Radix8_fs_unsafe_s.s
1699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// OpenMAX DL: v1.0.2
1799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// Last Modified Revision:   7770
1899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// Last Modified Date:       Thu, 27 Sep 2007
1999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//
2099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// (c) Copyright 2007-2008 ARM Limited. All Rights Reserved.
2199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//
2299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//
2399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//
2499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// Description:
2599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// Compute a first stage Radix 8 FFT stage for a N point complex signal
2699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//
2799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
2899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
2999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
3099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
3199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// Include standard headers
3299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
33bdf981cb383b7ec472ee86d2fedb53937285f894rtoy@google.com#include "dl/api/arm/armCOMM_s.h"
34bdf981cb383b7ec472ee86d2fedb53937285f894rtoy@google.com#include "dl/api/arm/omxtypes_s.h"
3599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
3699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// Import symbols required from other files
3799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// (For example tables)
3899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
3999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
4099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// Set debugging level
4199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//DEBUG_ON    SETL {TRUE}
4299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
4399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
4499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
4599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// Guarding implementation by the processor name
4699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
4799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
4899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
4999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
5099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// Guarding implementation by the processor name
5199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
5299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//Input Registers
5399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
5499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define pSrc		r0
5599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define pDst		r2
5699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define pTwiddle	r1
5799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define subFFTNum	r6
5899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define subFFTSize	r7
5999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// dest buffer for the next stage (not pSrc for first stage)
6099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define pPingPongBuf	r5
6199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
6299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
6399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//Output Registers
6499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
6599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
6699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@//Local Scratch Registers
6799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
6899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define grpSize		r3
6999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// Reuse grpSize as setCount
7099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define setCount	r3
7199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define pointStep	r4
7299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define outPointStep	r4
7399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define setStep		r8
7499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define step1		r9
7599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define step2		r10
7699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define t0		r11
7799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
7899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
7999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// Neon Registers
8099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
8199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dXr0	D0.S32
8299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dXi0	D1.S32
8399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dXr1	D2.S32
8499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dXi1	D3.S32
8599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dXr2	D4.S32
8699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dXi2	D5.S32
8799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dXr3	D6.S32
8899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dXi3	D7.S32
8999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dXr4	D8.S32
9099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dXi4	D9.S32
9199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dXr5	D10.S32
9299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dXi5	D11.S32
9399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dXr6	D12.S32
9499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dXi6	D13.S32
9599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dXr7	D14.S32
9699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dXi7	D15.S32
9799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qX0	Q0.S32
9899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qX1	Q1.S32
9999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qX2	Q2.S32
10099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qX3	Q3.S32
10199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qX4	Q4.S32
10299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qX5	Q5.S32
10399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qX6	Q6.S32
10499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qX7	Q7.S32
10599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
10699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dUr0	D16.S32
10799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dUi0	D17.S32
10899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dUr2	D18.S32
10999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dUi2	D19.S32
11099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dUr4	D20.S32
11199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dUi4	D21.S32
11299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dUr6	D22.S32
11399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dUi6	D23.S32
11499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dUr1	D24.S32
11599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dUi1	D25.S32
11699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dUr3	D26.S32
11799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dUi3	D27.S32
11899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dUr5	D28.S32
11999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dUi5	D29.S32
12099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com@// reuse dXr7 and dXi7
12199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dUr7	D30.S32
12299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dUi7	D31.S32
12399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qU0	Q8.S32
12499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qU1	Q12.S32
12599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qU2	Q9.S32
12699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qU3	Q13.S32
12799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qU4	Q10.S32
12899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qU5	Q14.S32
12999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qU6	Q11.S32
13099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qU7	Q15.S32
13199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
13299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
13399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
13499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dVr0	D24.S32
13599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dVi0	D25.S32
13699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dVr2	D26.S32
13799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dVi2	D27.S32
13899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dVr4	D28.S32
13999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dVi4	D29.S32
14099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dVr6	D30.S32
14199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dVi6	D31.S32
14299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dVr1	D16.S32
14399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dVi1	D17.S32
14499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dVr3	D18.S32
14599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dVi3	D19.S32
14699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dVr5	D20.S32
14799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dVi5	D21.S32
14899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dVr7	D22.S32
14999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dVi7	D23.S32
15099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qV0	Q12.S32
15199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qV1	Q8.S32
15299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qV2	Q13.S32
15399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qV3	Q9.S32
15499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qV4	Q14.S32
15599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qV5	Q10.S32
15699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qV6	Q15.S32
15799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qV7	Q11.S32
15899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
15999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
16099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
16199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dYr0	D16.S32
16299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dYi0	D17.S32
16399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dYr2	D18.S32
16499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dYi2	D19.S32
16599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dYr4	D20.S32
16699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dYi4	D21.S32
16799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dYr6	D22.S32
16899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dYi6	D23.S32
16999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dYr1	D24.S32
17099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dYi1	D25.S32
17199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dYr3	D26.S32
17299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dYi3	D27.S32
17399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dYr5	D28.S32
17499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dYi5	D29.S32
17599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dYr7	D30.S32
17699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dYi7	D31.S32
17799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qY0	Q8.S32
17899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qY1	Q12.S32
17999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qY2	Q9.S32
18099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qY3	Q13.S32
18199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qY4	Q10.S32
18299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qY5	Q14.S32
18399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qY6	Q11.S32
18499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define qY7	Q15.S32
18599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
18699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
18799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dT0	D14.S32
18899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com#define dT1	D15.S32
18999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
19099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        .MACRO FFTSTAGE scaled, inverse, name
19199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
19299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        @// Define stack arguments
19399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
19499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        @// Update pSubFFTSize and pSubFFTNum regs
1956b2bf4b577035e2be7e5b096a7148171e5ffadd2kma@webrtc.org        MOVW    t0, 0x799A               @// Low half word of 1/sqrt(2) in Q31.
1966b2bf4b577035e2be7e5b096a7148171e5ffadd2kma@webrtc.org        MOV     subFFTSize,#8
1976b2bf4b577035e2be7e5b096a7148171e5ffadd2kma@webrtc.org        MOVT    t0, 0x5A82               @// High half word of 1/sqrt(2) in Q31.
1986b2bf4b577035e2be7e5b096a7148171e5ffadd2kma@webrtc.org
1996b2bf4b577035e2be7e5b096a7148171e5ffadd2kma@webrtc.org
20099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        @// Note: setCount = subFFTNum/8 (reuse the grpSize reg for setCount)
20199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        LSR     grpSize,subFFTNum,#3
20299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        MOV     subFFTNum,grpSize
20399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
20499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
20599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        @// pT0+1 increments pT0 by 8 bytes
20699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        @// pT0+pointStep = increment of 8*pointStep bytes = grpSize bytes
20799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        @// Note: outPointStep = pointStep for firststage
20899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
20999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        MOV     pointStep,grpSize,LSL #3
21099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
21199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
21299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        @// Calculate the step of input data for the next set
21399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        @//MOV     step1,pointStep,LSL #1                      @// step1 = 2*pointStep
21499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        VLD2    {dXr0,dXi0},[pSrc :128],pointStep          @//  data[0]
21599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        MOV     step1,grpSize,LSL #4
21699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
21799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        MOV     step2,pointStep,LSL #3
21899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        VLD2    {dXr1,dXi1},[pSrc :128],pointStep          @//  data[1]
21999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        SUB     step2,step2,pointStep                          @// step2 = 7*pointStep
22099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        RSB     setStep,step2,#16                              @// setStep = - 7*pointStep+16
22199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
22299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        VLD2    {dXr2,dXi2},[pSrc :128],pointStep          @//  data[2]
22399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        VLD2    {dXr3,dXi3},[pSrc :128],pointStep          @//  data[3]
22499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        VLD2    {dXr4,dXi4},[pSrc :128],pointStep          @//  data[4]
22599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        VLD2    {dXr5,dXi5},[pSrc :128],pointStep          @//  data[5]
22699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        VLD2    {dXr6,dXi6},[pSrc :128],pointStep          @//  data[6]
22799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        VLD2    {dXr7,dXi7},[pSrc :128],setStep            @//  data[7] & update pSrc for the next set
22899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                                                      @//  setStep = -7*pointStep + 16
22999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        @// grp = 0 a special case since all the twiddle factors are 1
23099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        @// Loop on the sets
23199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
23299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.comgrpZeroSetLoop\name :
23399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
23499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        @// Decrement setcount
23599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        SUBS    setCount,setCount,#2                    @// decrement the set loop counter
23699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
23799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
23899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        .ifeqs	"\scaled", "TRUE"
23999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            @// finish first stage of 8 point FFT
24099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
24199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VHADD    qU0,qX0,qX4
24299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VHADD    qU2,qX1,qX5
24399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VHADD    qU4,qX2,qX6
24499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VHADD    qU6,qX3,qX7
24599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
24699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            @// finish second stage of 8 point FFT
24799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
24899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VHADD    qV0,qU0,qU4
24999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VHSUB    qV2,qU0,qU4
25099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VHADD    qV4,qU2,qU6
25199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VHSUB    qV6,qU2,qU6
25299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
25399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            @// finish third stage of 8 point FFT
25499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
25599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VHADD    qY0,qV0,qV4
25699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VHSUB    qY4,qV0,qV4
25799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VST2    {dYr0,dYi0},[pDst :128],step1                    @// store y0
25899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
25999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            .ifeqs	"\inverse", "TRUE"
26099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
26199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHSUB    dYr2,dVr2,dVi6
26299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHADD    dYi2,dVi2,dVr6
26399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
26499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHADD    dYr6,dVr2,dVi6
26599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr2,dYi2},[pDst :128],step1                    @// store y2
26699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHSUB    dYi6,dVi2,dVr6
26799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
26899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHSUB    qU1,qX0,qX4
26999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr4,dYi4},[pDst :128],step1                    @// store y4
27099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
27199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHSUB    qU3,qX1,qX5
27299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHSUB    qU5,qX2,qX6
27399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr6,dYi6},[pDst :128],step1                    @// store y6
27499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
27599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            .ELSE
27699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
27799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHADD    dYr6,dVr2,dVi6
27899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHSUB    dYi6,dVi2,dVr6
27999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
28099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHSUB    dYr2,dVr2,dVi6
28199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr6,dYi6},[pDst :128],step1                    @// store y2
28299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHADD    dYi2,dVi2,dVr6
28399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
28499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
28599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHSUB    qU1,qX0,qX4
28699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr4,dYi4},[pDst :128],step1                    @// store y4
28799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHSUB    qU3,qX1,qX5
28899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHSUB    qU5,qX2,qX6
28999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr2,dYi2},[pDst :128],step1                    @// store y6
29099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
29199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
29299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            .ENDIF
29399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
29499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            @// finish first stage of 8 point FFT
29599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
29699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VHSUB    qU7,qX3,qX7
29799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VMOV    dT0[0],t0
29899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
29999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            @// finish second stage of 8 point FFT
30099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
30199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VHSUB    dVr1,dUr1,dUi5
30299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VLD2    {dXr0,dXi0},[pSrc :128],pointStep          @//  data[0] for next iteration
30399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VHADD    dVi1,dUi1,dUr5
30499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VHADD    dVr3,dUr1,dUi5
30599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VLD2    {dXr1,dXi1},[pSrc :128],pointStep          @//  data[1]
30699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VHSUB    dVi3,dUi1,dUr5
30799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
30899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VHSUB    dVr5,dUr3,dUi7
30999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VLD2    {dXr2,dXi2},[pSrc :128],pointStep          @//  data[2]
31099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VHADD    dVi5,dUi3,dUr7
31199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VHADD    dVr7,dUr3,dUi7
31299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VLD2    {dXr3,dXi3},[pSrc :128],pointStep          @//  data[3]
31399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VHSUB    dVi7,dUi3,dUr7
31499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
31599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            @// finish third stage of 8 point FFT
31699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
31799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            .ifeqs	"\inverse", "TRUE"
31899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
31999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                @// calculate a*v5
32099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VQRDMULH    dT1,dVr5,dT0[0]                         @// use dVi0 for dT1
32199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VLD2    {dXr4,dXi4},[pSrc :128],pointStep          @//  data[4]
32299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VQRDMULH    dVi5,dVi5,dT0[0]
32399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
32499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VLD2    {dXr5,dXi5},[pSrc :128],pointStep          @//  data[5]
32599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VSUB    dVr5,dT1,dVi5                               @// a * V5
32699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VADD    dVi5,dT1,dVi5
32799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
32899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VLD2    {dXr6,dXi6},[pSrc :128],pointStep          @//  data[6]
32999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
33099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                @// calculate  b*v7
33199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VQRDMULH    dT1,dVr7,dT0[0]
33299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VQRDMULH    dVi7,dVi7,dT0[0]
33399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
33499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHADD    qY1,qV1,qV5
33599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHSUB    qY5,qV1,qV5
33699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
33799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
33899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VADD    dVr7,dT1,dVi7                               @// b * V7
33999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VSUB    dVi7,dVi7,dT1
34099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                SUB     pDst, pDst, step2                           @// set pDst to y1
34199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
34299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VLD2    {dXr7,dXi7},[pSrc :128],setStep            @//  data[7]
34399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
34499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
34599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHSUB    dYr3,dVr3,dVr7
34699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHSUB    dYi3,dVi3,dVi7
34799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr1,dYi1},[pDst :128],step1                    @// store y1
34899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHADD    dYr7,dVr3,dVr7
34999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHADD    dYi7,dVi3,dVi7
35099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
35199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
35299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr3,dYi3},[pDst :128],step1                    @// store y3
35399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr5,dYi5},[pDst :128],step1                    @// store y5
35499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr7,dYi7},[pDst :128]!                      @// store y7
35599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
35699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            .ELSE
35799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
35899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                @// calculate  b*v7
35999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VQRDMULH    dT1,dVr7,dT0[0]
36099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VLD2    {dXr4,dXi4},[pSrc :128],pointStep          @//  data[4]
36199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VQRDMULH    dVi7,dVi7,dT0[0]
36299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
36399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VLD2    {dXr5,dXi5},[pSrc :128],pointStep          @//  data[5]
36499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VADD    dVr7,dT1,dVi7                               @// b * V7
36599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VSUB    dVi7,dVi7,dT1
36699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
36799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VLD2    {dXr6,dXi6},[pSrc :128],pointStep          @//  data[6]
36899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
36999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                @// calculate a*v5
37099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VQRDMULH    dT1,dVr5,dT0[0]                         @// use dVi0 for dT1
37199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VQRDMULH    dVi5,dVi5,dT0[0]
37299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
37399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHADD    dYr7,dVr3,dVr7
37499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHADD    dYi7,dVi3,dVi7
37599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                SUB     pDst, pDst, step2                           @// set pDst to y1
37699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
37799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VSUB    dVr5,dT1,dVi5                               @// a * V5
37899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VADD    dVi5,dT1,dVi5
37999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VLD2    {dXr7,dXi7},[pSrc :128],setStep            @//  data[7]
38099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
38199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHSUB    qY5,qV1,qV5
38299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
38399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHSUB    dYr3,dVr3,dVr7
38499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr7,dYi7},[pDst :128],step1                    @// store y1
38599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHSUB    dYi3,dVi3,dVi7
38699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VHADD    qY1,qV1,qV5
38799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
38899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
38999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr5,dYi5},[pDst :128],step1                    @// store y3
39099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr3,dYi3},[pDst :128],step1                    @// store y5
39199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr1,dYi1},[pDst :128]!                      @// store y7
39299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
39399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            .ENDIF
39499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
39599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
39699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
39799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        .ELSE
39899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            @// finish first stage of 8 point FFT
39999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
40099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VADD    qU0,qX0,qX4
40199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VADD    qU2,qX1,qX5
40299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VADD    qU4,qX2,qX6
40399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VADD    qU6,qX3,qX7
40499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
40599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            @// finish second stage of 8 point FFT
40699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
40799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VADD    qV0,qU0,qU4
40899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VSUB    qV2,qU0,qU4
40999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VADD    qV4,qU2,qU6
41099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VSUB    qV6,qU2,qU6
41199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
41299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            @// finish third stage of 8 point FFT
41399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
41499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VADD    qY0,qV0,qV4
41599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VSUB    qY4,qV0,qV4
41699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VST2    {dYr0,dYi0},[pDst :128],step1                    @// store y0
41799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
41899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            .ifeqs	"\inverse", "TRUE"
41999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
42099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VSUB    dYr2,dVr2,dVi6
42199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VADD    dYi2,dVi2,dVr6
42299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
42399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VADD    dYr6,dVr2,dVi6
42499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr2,dYi2},[pDst :128],step1                    @// store y2
42599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VSUB    dYi6,dVi2,dVr6
42699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
42799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VSUB    qU1,qX0,qX4
42899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr4,dYi4},[pDst :128],step1                    @// store y4
42999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
43099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VSUB    qU3,qX1,qX5
43199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VSUB    qU5,qX2,qX6
43299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr6,dYi6},[pDst :128],step1                    @// store y6
43399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
43499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            .ELSE
43599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
43699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VADD    dYr6,dVr2,dVi6
43799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VSUB    dYi6,dVi2,dVr6
43899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
43999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VSUB    dYr2,dVr2,dVi6
44099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr6,dYi6},[pDst :128],step1                    @// store y2
44199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VADD    dYi2,dVi2,dVr6
44299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
44399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
44499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VSUB    qU1,qX0,qX4
44599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr4,dYi4},[pDst :128],step1                    @// store y4
44699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VSUB    qU3,qX1,qX5
44799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VSUB    qU5,qX2,qX6
44899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr2,dYi2},[pDst :128],step1                    @// store y6
44999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
45099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
45199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            .ENDIF
45299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
45399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            @// finish first stage of 8 point FFT
45499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
45599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VSUB    qU7,qX3,qX7
45699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VMOV    dT0[0],t0
45799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
45899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            @// finish second stage of 8 point FFT
45999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
46099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VSUB    dVr1,dUr1,dUi5
46199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VLD2    {dXr0,dXi0},[pSrc :128],pointStep          @//  data[0] for next iteration
46299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VADD    dVi1,dUi1,dUr5
46399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VADD    dVr3,dUr1,dUi5
46499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VLD2    {dXr1,dXi1},[pSrc :128],pointStep          @//  data[1]
46599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VSUB    dVi3,dUi1,dUr5
46699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
46799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VSUB    dVr5,dUr3,dUi7
46899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VLD2    {dXr2,dXi2},[pSrc :128],pointStep          @//  data[2]
46999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VADD    dVi5,dUi3,dUr7
47099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VADD    dVr7,dUr3,dUi7
47199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VLD2    {dXr3,dXi3},[pSrc :128],pointStep          @//  data[3]
47299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            VSUB    dVi7,dUi3,dUr7
47399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
47499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            @// finish third stage of 8 point FFT
47599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
47699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            .ifeqs	"\inverse", "TRUE"
47799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
47899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                @// calculate a*v5
47999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VQRDMULH    dT1,dVr5,dT0[0]                         @// use dVi0 for dT1
48099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VLD2    {dXr4,dXi4},[pSrc :128],pointStep          @//  data[4]
48199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VQRDMULH    dVi5,dVi5,dT0[0]
48299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
48399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VLD2    {dXr5,dXi5},[pSrc :128],pointStep          @//  data[5]
48499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VSUB    dVr5,dT1,dVi5                               @// a * V5
48599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VADD    dVi5,dT1,dVi5
48699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
48799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VLD2    {dXr6,dXi6},[pSrc :128],pointStep          @//  data[6]
48899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
48999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                @// calculate  b*v7
49099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VQRDMULH    dT1,dVr7,dT0[0]
49199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VQRDMULH    dVi7,dVi7,dT0[0]
49299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
49399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VADD    qY1,qV1,qV5
49499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VSUB    qY5,qV1,qV5
49599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
49699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
49799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VADD    dVr7,dT1,dVi7                               @// b * V7
49899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VSUB    dVi7,dVi7,dT1
49999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                SUB     pDst, pDst, step2                           @// set pDst to y1
50099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
50199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VLD2    {dXr7,dXi7},[pSrc :128],setStep            @//  data[7]
50299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
50399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
50499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VSUB    dYr3,dVr3,dVr7
50599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VSUB    dYi3,dVi3,dVi7
50699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr1,dYi1},[pDst :128],step1                    @// store y1
50799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VADD    dYr7,dVr3,dVr7
50899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VADD    dYi7,dVi3,dVi7
50999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
51099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
51199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr3,dYi3},[pDst :128],step1                    @// store y3
51299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr5,dYi5},[pDst :128],step1                    @// store y5
51399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr7,dYi7},[pDst :128]!                      @// store y7
51499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
51599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            .ELSE
51699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
51799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                @// calculate  b*v7
51899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VQRDMULH    dT1,dVr7,dT0[0]
51999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VLD2    {dXr4,dXi4},[pSrc :128],pointStep          @//  data[4]
52099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VQRDMULH    dVi7,dVi7,dT0[0]
52199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
52299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VLD2    {dXr5,dXi5},[pSrc :128],pointStep          @//  data[5]
52399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VADD    dVr7,dT1,dVi7                               @// b * V7
52499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VSUB    dVi7,dVi7,dT1
52599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
52699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VLD2    {dXr6,dXi6},[pSrc :128],pointStep          @//  data[6]
52799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
52899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                @// calculate a*v5
52999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VQRDMULH    dT1,dVr5,dT0[0]                         @// use dVi0 for dT1
53099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VQRDMULH    dVi5,dVi5,dT0[0]
53199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
53299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VADD    dYr7,dVr3,dVr7
53399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VADD    dYi7,dVi3,dVi7
53499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                SUB     pDst, pDst, step2                           @// set pDst to y1
53599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
53699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VSUB    dVr5,dT1,dVi5                               @// a * V5
53799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VADD    dVi5,dT1,dVi5
53899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VLD2    {dXr7,dXi7},[pSrc :128],setStep            @//  data[7]
53999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
54099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VSUB    qY5,qV1,qV5
54199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
54299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VSUB    dYr3,dVr3,dVr7
54399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr7,dYi7},[pDst :128],step1                    @// store y1
54499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VSUB    dYi3,dVi3,dVi7
54599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VADD    qY1,qV1,qV5
54699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
54799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
54899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr5,dYi5},[pDst :128],step1                    @// store y3
54999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr3,dYi3},[pDst :128],step1                    @// store y5
55099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com                VST2    {dYr1,dYi1},[pDst :128]!                      @// store y7
55199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
55299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            .ENDIF
55399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
55499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
55599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        .ENDIF
55699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
55799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        SUB     pDst, pDst, step2                               @// update pDst for the next set
55899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        BGT     grpZeroSetLoop\name
55999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
56099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
56199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        @// reset pSrc to pDst for the next stage
56299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        SUB     pSrc,pDst,pointStep                             @// pDst -= 2*grpSize
56399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        MOV     pDst,pPingPongBuf
56499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
56599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
56699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
56799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        .endm
56899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
56999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
57099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        @// Allocate stack memory required by the function
57199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
57299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
57399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        M_START armSP_FFTFwd_CToC_SC32_Radix8_fs_OutOfPlace_unsafe,r4
57499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            FFTSTAGE "FALSE","FALSE",FWD
57599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        M_END
57699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
57799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
57899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        M_START armSP_FFTInv_CToC_SC32_Radix8_fs_OutOfPlace_unsafe,r4
57999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            FFTSTAGE "FALSE","TRUE",INV
58099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        M_END
58199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
58299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
58399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        M_START armSP_FFTFwd_CToC_SC32_Sfs_Radix8_fs_OutOfPlace_unsafe,r4
58499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            FFTSTAGE "TRUE","FALSE",FWDSFS
58599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        M_END
58699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
58799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
58899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        M_START armSP_FFTInv_CToC_SC32_Sfs_Radix8_fs_OutOfPlace_unsafe,r4
58999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com            FFTSTAGE "TRUE","TRUE",INVSFS
59099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com        M_END
59199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
59299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
59399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com	.end
594