Added the additional three lines per Ryan Gammon:

#else
#error "You need to define 64 bit operations for your platform"
#endif

Is it okay to now do the cvs commit?

Thanks
Margot


> Date: Thu, 6 Oct 2005 20:48:12 -0700 (PDT)
> From: Margot Miller <[EMAIL PROTECTED]>
> 
> Modified by: [EMAIL PROTECTED]
> Reviewed by: Ryan Gammon
> Date: 10:06:05
> Project:  Support for Solaris X86 in math64.h
> 
> Synopsis:  
> 
> Add Solaris X86 support in math64.h to fix
> MulShiftN unreference symbol error.
> 
> Overview: 
> 
> Built using:
> 
>  [0] Set BIF branch (hxclient_1_5_0_cayenne_restricted)
>  [1] Set Target(s) (splay)
>  [2] Set Profile (/build1/building/build/umakepf/helix-client-all-defines)
> 
> When running splay with an rm file from ContentSuite_1.0/rm-
> NatureRF_rvG2SVT-cbr_30fps_352x288_100k_cook23.rm - get
> error of
> 
>   clntcore.so: symbol MulShiftN referenced: not found
> 
> This comes from audio/limiter/rel:
> 
> brion% nm audlimiter.a | grep MulS 
> [14]    |         0|       0|FUNC |GLOB |0    |UNDEF  |MulShiftN
> brion%
> 
> Specifically, limiter.c.
> 
> Now limiter.c uses MulShiftN in two functions, limiterMono and
> limiterStereo in this hxclient_1_5_0_cayenne_restriced branch.
> I noticed in the realplayer_gtk_stable branch, limiter.c doesn't
> use these two functions, therefore doesn't run into this MulShiftN
> problem- ifdef'ed with HAVE_PLATFORM_MACROS.
> 
> audio/fixptuil/pub/math64.h did not have a MulShiftN for 
> Solaris X86.  At the end of math64.h, there are a bunch of
> Mul* C functions for HPUX, that look appropriate for
> Solaris X86.
> 
> As a result, the fix for this problem is to:
> 
>   -  Use the HPUX block of code for Solaris X86 by adding
>      the correct defines for Solaris X86:
>      
>      #elif defined(_HPUX) || (defined (_SOLARIS) && !defined (__GNUC__) &&
>      defined(_SOLARISX86))
>      
>   -  Delete the block of code that has similar functions
>      that the HPUX block of code already has.
>      
>      The block of code being deleted was:
>      
>      #if (defined(__SVR4) && defined(__i386) && (defined(_NO_GNU_AS) ||
>         !defined(__GNUC__)) )
>      /* No 64bit, no asm provided in some other file..
>      * need normal funcs for sun forte CC + 386
>      * However... forte's inline assembly for MulShift32 is just as good
>      * as the "hand tuned" gcc version, if you use
>      *  cc -fast
>      */
>      ....
>      
>   -  Structure the code to be #if ... #elif ....#elif from
>      #if ... #if ... #if...
>      
> Files Added:
> [File 1] - NONE
> 
> Files Modified:
> [File 3] -  math64.h
> 
> 
> Image Size and Heap Use impact (Client -Only):
> <Description of image size and heaps size impact. >
> 
> Platforms and Profiles Affected:
> Tested on X86 with helix-client-all-defines profile
> 
> Distribution Libraries Affected:
> <List of distribution libraries affected>
> 
> Distribution library impact and planned action:
> <Is an update required and if so when will it occur>
> 
> Platforms and Profiles Build Verified:
> 
> Platform - x86.
> brion% uname -a
> SunOS brion 5.10 Generic i86pc i386 i86pc
> brion% 
> Profile:helix-client-all-defines
> 
> Platforms and Profiles Functionality verified:
> Same as above
> 
> Branch: <code branch(es) change is for>
> 
> HEAD and hxclient_1_5_0_cayenne
> 
> 
> Copyright assignment: <MUST be one of the following statements >
> 
> 
>    3.      My company SUN is bound by the terms
>            of a commercial contribution agreement with RealNetworks,
>            and I am authorized to contribute this code under said agreement. 
> 
>    
> QA Instructions:
> 
> Full test suites run on an X86 and Sparc machines running Solaris 10.
> 
> 
> 

Index: math64.h
===================================================================
RCS file: /cvsroot/audio/fixptutil/pub/math64.h,v
retrieving revision 1.26.2.1
diff -u -r1.26.2.1 math64.h
--- math64.h    2 May 2005 20:17:22 -0000       1.26.2.1
+++ math64.h    10 Oct 2005 23:43:05 -0000
@@ -118,13 +118,12 @@
 #endif // TIMING
 
 #pragma warning(default:4035)
-#endif // (defined(_M_IX86) && defined(_MSC_VER)) || (defined(__WINS__) && 
defined(_SYMBIAN))
 
 
///////////////////////////////////////////////////////////////////////////////////////
 // GCC / i386
 
///////////////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUC__) && (defined(__i386__) || defined(__amd64__)) && 
!defined(_NO_GNU_AS)
+#elif defined(__GNUC__) && (defined(__i386__) || defined(__amd64__)) && 
!defined(_NO_GNU_AS)
 
 #define HAVE_PLATFORM_MACROS
 
@@ -199,13 +198,12 @@
 #ifdef DEBUG
 #define ASSERT(x) if (!(x)) __asm__ __volatile ("int $3" :: )
 #endif
-#endif // defined(__GNUC__) && defined(__i386__)
 
 
///////////////////////////////////////////////////////////////////////////////////////
 // Sun native compiler / Sparc
 
///////////////////////////////////////////////////////////////////////////////////////
 
-#if defined(__sparc)
+#elif defined(__sparc)
 
 // the macros definitions come from an il file here.
 #define HAVE_PLATFORM_MACROS
@@ -248,51 +246,13 @@
 #include <assert.h>
 #define ASSERT(x)  assert(x)
 #endif
-#endif // defined(__sparc)
 
-#if (defined(__SVR4) && defined(__i386) && (defined(_NO_GNU_AS) || 
!defined(__GNUC__)) )
-/* No 64bit, no asm provided in some other file..
- * need normal funcs for sun forte CC + 386 
- * However... forte's inline assembly for MulShift32 is just as good
- * as the "hand tuned" gcc version, if you use
- *  cc -fast
- */
-static inline int MulDiv64(int a, int b, int c)
-{
-       long long t = (long long)((long long)a * (long long)b) ;
-       return (int)(t / c) ;
-}
-/* Compute (a * b) >> 32, using 64-bit intermediate result */
-static inline int MulShift32(int a, int b)
-{
-       long long res ;
-       res = (long long)((long long)a * (long long)b);
-       return (res>>32);
-}
-
-/* Compute (a * b) >> 31, using 64-bit intermediate result */
-static inline int MulShift31(int a, int b)
-{
-       long long res ;
-       res = (long long)((long long)a * (long long)b);
-       return (res>>31);
-}
-
-/* Compute (a * b) >> 30, using 64-bit intermediate result */
-static inline int MulShift30(int a, int b)
-{
-       long long res ;
-       res = (long long)((long long)a * (long long)b);
-       return (res>>30);
-}
-
-#endif
 
 
///////////////////////////////////////////////////////////////////////////////////////
 // Codewarrior / PowerPC
 
///////////////////////////////////////////////////////////////////////////////////////
 
-#if defined(__MWERKS__) && defined(__POWERPC__)
+#elif defined(__MWERKS__) && defined(__POWERPC__)
 
 /*if your compiler can compile 64-bit instructions, define this. CW 8 cannot */
 /* #define USE_64BIT_INSNS */
@@ -407,14 +367,13 @@
 
 #endif // TIMING
 
-#endif //  defined(__MWERKS__) && defined(__POWERPC__)
 
 
 
///////////////////////////////////////////////////////////////////////////////////////
 // GCC / PowerPC
 
///////////////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUC__) && (defined(__POWERPC__) || defined(__powerpc__))
+#elif defined(__GNUC__) && (defined(__POWERPC__) || defined(__powerpc__))
 
 /*if your compiler can compile 64-bit instructions, and your CPU has them,
  define this. */
@@ -509,13 +468,12 @@
 
 #endif // TIMING
 
-#endif //  defined(__GNUC__) && defined(__POWERPC__)
 
 
///////////////////////////////////////////////////////////////////////////////////////
 // EVC3.0 / ARM
 
///////////////////////////////////////////////////////////////////////////////////////
 
-#if (defined(_ARM) && defined(_MSC_VER))
+#elif (defined(_ARM) && defined(_MSC_VER))
 
 /* EVC does not allow us to use inline assembly. Thus, you'll only see 
prototypes here.
  */
@@ -544,13 +502,12 @@
 }
 #endif // __cplusplus
 
-#endif // (defined(_ARM) && defined(_MSC_VER))
 
 
///////////////////////////////////////////////////////////////////////////////////////
 // GNUC / ARM
 
///////////////////////////////////////////////////////////////////////////////////////
 
-#if (defined(_ARM) && defined(__GNUC__))
+#elif (defined(_ARM) && defined(__GNUC__))
 
 #define HAVE_PLATFORM_MACROS
 
@@ -679,13 +636,12 @@
 
 #endif // defined(__MARM_THUMB__)
 
-#endif // (defined(_ARM) && defined(__GNUC__))
 
 
///////////////////////////////////////////////////////////////////////////////////////
 // ARM_ADS / ARM
 
///////////////////////////////////////////////////////////////////////////////////////
 
-#if defined(ARM_ADS)
+#elif defined(ARM_ADS)
 
 #ifdef __cplusplus
 extern "C" {
@@ -768,12 +724,13 @@
        return x;
 }
 
-#endif // defined(ARM_ADS)
 
 
///////////////////////////////////////////////////////////////////////////////////////
 // platform independent implementations
 
///////////////////////////////////////////////////////////////////////////////////////
 
+#elif defined(_HPUX) || (defined (_SOLARIS) && !defined (__GNUC__) && 
defined(_SOLARISX86))
+
 #ifndef ASSERT
 #define ASSERT(x)
 #endif
@@ -786,7 +743,6 @@
 #define TOCK(nsamples) 1
 #endif
 
-#if defined(_HPUX)
 #define HAVE_PLATFORM_MACROS
 static __inline int MulDiv64(int a, int b, int c)
 {
@@ -829,6 +785,8 @@
        return x;
     return -x;
 }
+#else
+#error "You need to define 64 bit operations for your platform"
 #endif
 
 #ifndef HAVE_FASTABS
@@ -843,3 +801,4 @@
        return x;
 }
 #endif
+
_______________________________________________
Audio-dev mailing list
[email protected]
http://lists.helixcommunity.org/mailman/listinfo/audio-dev

Reply via email to