1 ;/* ----------------------------------------------------------------------
2 ;* Copyright (C) 2010-2013 ARM Limited. All rights reserved.
4 ;* $Date: 17. January 2013
7 ;* Project: CMSIS DSP Library
8 ;* Title: arm_bitreversal2.S
10 ;* Description: This is the arm_bitreversal_32 function done in
11 ;* assembly for maximum speed. This function is called
12 ;* after doing an fft to reorder the output. The function
13 ;* is loop unrolled by 2.
15 ;* Target Processor: Cortex-M4/Cortex-M3/Cortex-M0
17 ;* Redistribution and use in source and binary forms, with or without
18 ;* modification, are permitted provided that the following conditions
20 ;* - Redistributions of source code must retain the above copyright
21 ;* notice, this list of conditions and the following disclaimer.
22 ;* - Redistributions in binary form must reproduce the above copyright
23 ;* notice, this list of conditions and the following disclaimer in
24 ;* the documentation and/or other materials provided with the
26 ;* - Neither the name of ARM LIMITED nor the names of its contributors
27 ;* may be used to endorse or promote products derived from this
28 ;* software without specific prior written permission.
30 ;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
31 ;* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
32 ;* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
33 ;* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
34 ;* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
35 ;* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
36 ;* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
37 ;* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
38 ;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
39 ;* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
40 ;* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 ;* POSSIBILITY OF SUCH DAMAGE.
42 ;* -------------------------------------------------------------------- */
43 #if defined(__CC_ARM) //Keil
44 #define CODESECT AREA ||.text||, CODE, READONLY, ALIGN=2
46 #elif defined(__IASMARM__) //IAR
47 #define CODESECT SECTION `.text`:CODE
52 #elif defined (__GNUC__) //GCC
57 #define CODESECT .section text
58 #define EXPORT .global
69 ;* @brief In-place bit reversal function.
70 ;* @param[in, out] *pSrc points to the in-place buffer of unknown 32-bit data type.
71 ;* @param[in] bitRevLen bit reversal table length
72 ;* @param[in] *pBitRevTab points to bit reversal table.
75 EXPORT arm_bitreversal_32
77 #if defined(ARM_MATH_CM0) || defined(ARM_MATH_CM0PLUS)
79 arm_bitreversal_32 PROC
84 arm_bitreversal_32_0 LABEL
99 BNE arm_bitreversal_32_0
106 arm_bitreversal_32 PROC
114 arm_bitreversal_32_0 LABEL ;/* loop unrolled by 2 */
141 BNE arm_bitreversal_32_0