summaryrefslogtreecommitdiff
path: root/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/norm_l.h
diff options
context:
space:
mode:
Diffstat (limited to 'opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/norm_l.h')
-rw-r--r--opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/norm_l.h31
1 files changed, 6 insertions, 25 deletions
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/norm_l.h b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/norm_l.h
index faea591..288b6c7 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/norm_l.h
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/norm_l.h
@@ -1,5 +1,5 @@
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -86,29 +86,9 @@ extern "C"
; GLOBAL FUNCTION DEFINITIONS
; Function Prototype declaration
----------------------------------------------------------------------------*/
-#if !( defined(PV_ARM_V5) || defined(PV_ARM_GCC_V5) )
- /* C EQUIVALENT */
- OSCL_IMPORT_REF Word16 norm_l(Word32 L_var1);
-
-#elif defined(PV_ARM_V5)
-
- __inline Word16 norm_l(Word32 L_var1)
- {
- register Word32 var_out = 0;
-
- __asm
- {
- CMP L_var1, #0
- EORNE L_var1, L_var1, L_var1, LSL #1
- CLZNE var_out, L_var1
- }
-
- return ((Word16)var_out);
- }
-
-#elif defined(PV_ARM_GCC_V5)
+#if ((PV_CPU_ARCH_VERSION >=5) && (PV_COMPILER == EPV_ARM_GNUC))
static inline Word16 norm_l(Word32 L_var1)
{
register Word32 var_out = 0;
@@ -116,7 +96,7 @@ extern "C"
if (L_var1)
{
ra ^= (ra << 1);
- asm volatile(
+ __asm__ volatile(
"clz %0, %1"
: "=r"(var_out)
: "r"(ra)
@@ -124,6 +104,9 @@ extern "C"
}
return (var_out);
}
+#else
+ /* C EQUIVALENT */
+ OSCL_IMPORT_REF Word16 norm_l(Word32 L_var1);
#endif
/*----------------------------------------------------------------------------
@@ -134,5 +117,3 @@ extern "C"
#endif
#endif
-
-