Modified by: [EMAIL PROTECTED]
Date: 06-20-2006
Project: Helix Player
Bug Number: Nil
Bug URL: Nil
Synopsis:
Integrate fixes for sem_t, and math64.h into 150 Cay to fix build breaks on
Fedora Core 5 using GCC 4.x.x
Overview:
sem_t is now defined as an union, so HXsem_t can no longer subclass
it. Greg fixed this in HEAD already:
http://lists.helixcommunity.org/pipermail/common-dev/2006-June/003528.html
For more information about math64.h issue, see the following URL:
http://lists.helixcommunity.org/pipermail/audio-dev/2006-June/000717.html
Files Modified:
common/system/pub/platform/unix/pthreadthreads.h - Define HXsem_t to be
sem_t, rather than subclassing.
audio/fixptutil/pub/math64.h - Integrate Greg's fixes for GCC 4.x.x
Image Size and Heap Use impact (Client -Only):
None
Platforms and Profiles Affected:
sem_t fix affect all Unix platforms, math64.h fix affects all x86 platforms.
Platforms and Profiles Build Verified:
Profile: helix_client_all_define
Platform: Fedora Core 5
Platforms and Profiles Functionality verified:
Profile: helix_client_all_define
Platform: Fedora Core 5
Branch:
hxclient_1_5_0_cayenne
Copyright assignment: I am a RealNetworks employee
Index: pthreadthreads.h
===================================================================
RCS file: /cvsroot/common/system/pub/platform/unix/pthreadthreads.h,v
retrieving revision 1.8
diff -u -w -r1.8 pthreadthreads.h
--- pthreadthreads.h 27 Oct 2004 23:41:10 -0000 1.8
+++ pthreadthreads.h 20 Jun 2006 22:31:07 -0000
@@ -1,5 +1,5 @@
/* ***** BEGIN LICENSE BLOCK *****
- * Source last modified: $Id: pthreadthreads.h,v 1.8 2004/10/27 23:41:10
liam_murray Exp $
+ * Source last modified: $Id: pthreadthreads.h,v 1.9 2006/06/13 18:42:12
gwright Exp $
*
* Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved.
*
@@ -102,10 +102,7 @@
#ifndef _MAC_UNIX
-struct HXsem_t : public sem_t
-{
- char padding[64]; /* Flawfinder: ignore */ // different linux versions
have different binary reps blechhhh!
-};
+typedef sem_t HXsem_t;
//=======================================================================
//
Index: math64.h
===================================================================
RCS file: /cvsroot/audio/fixptutil/pub/math64.h,v
retrieving revision 1.26.2.6
diff -u -w -r1.26.2.6 math64.h
--- math64.h 30 Apr 2006 18:50:29 -0000 1.26.2.6
+++ math64.h 20 Jun 2006 22:36:35 -0000
@@ -1,5 +1,5 @@
/* ***** BEGIN LICENSE BLOCK *****
- * Source last modified: $Id: math64.h,v 1.26.2.6 2006/04/30 18:50:29
abockover Exp $
+ * Source last modified: $Id: math64.h,v 1.31 2006/06/06 22:14:02 gwright
Exp $
*
* Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved.
*
@@ -123,63 +123,37 @@
// GCC / i386
///////////////////////////////////////////////////////////////////////////////////////
-#elif !defined(_MAC_UNIX) && defined(__GNUC__) && (defined(__i386__) ||
defined(__amd64__)) && !defined(_NO_GNU_AS)
+#elif !defined(_MAC_UNIX) && defined(__GNUC__) && (defined(__i386__) ||
defined(__amd64__))
#define HAVE_PLATFORM_MACROS
/* Compute a * b / c, using 64-bit intermediate result */
static __inline__ int MulDiv64(register int x, register int y, register
int z)
{
- /* we specify four alternatives here, one for each permutation of
memory or
- register operand in the multiplier and the divisor. All are
commutative in
- the multiplication arguments, one of which needs to be in eax when we
- start. */
-
- __asm__ volatile ("imull %2\n\t"
- "idivl %3\n"
- : "+a,a,a,a" (x)
- : "%0,%0,%0,%0" (x), "m,r,m,r" (y), "m,m,r,r" (z)
- : "edx") ;
- return x ;
+ return (int)(((INT64)x*(INT64)y)/(INT64)z);
}
/* Compute (a * b) >> 32, using 64-bit intermediate result */
static __inline__ int MulShift32(int x, int y)
{
- int z ;
- /* we specify two alternatives here. The first one can read the
multiplier from
- memory, the second from from a register. Both return the result in
eax,edx
- and are commutative in the arguments, one of which needs to be in
eax when we
- start. */
- __asm__ volatile ("imull %3" : "=d,d" (z), "+a,a" (x): "%1,1" (x),
"m,r" (y)) ;
- return z ;
+ return (int)(((INT64)x*(INT64)y)>>32);
}
/* Compute (a * b) >> 31, using 64-bit intermediate result */
static __inline__ int MulShift31(int x, int y)
{
- int zhi ;
- __asm__ volatile ("imull %3\n\t"
- "shrdl $31,%1,%0": "+a,a" (x), "=d,d" (zhi) :
"%0,%0" (x), "m,r" (y)) ;
- return x ;
+ return (int)(((INT64)x*(INT64)y)>>31);
}
-/* Compute (a * b) >> 30, using 64-bit intermediate result */
static __inline__ int MulShift30(int x, int y)
{
- int zhi ;
- __asm__ volatile ("imull %3\n\t"
- "shrdl $30,%1,%0" : "+a,a" (x), "=d,d" (zhi) :
"%0,%0" (x), "m,r" (y)) ;
- return x ;
+ return (int)(((INT64)x*(INT64)y)>>30);
}
/* Compute (a * b) >> n, using 64-bit intermediate result */
static __inline__ int MulShiftN(register int x, register int y, register
int n)
{
- int zhi ;
- __asm__ volatile ("imull %3\n\t"
- "shrdl %%cl,%1,%0" : "+a,a" (x), "=d,d" (zhi) :
"%0,%0" (x), "m,r" (y), "c,c" (n)) ;
- return x ;
+ return (int)(((INT64)x*(INT64)y)>>n);
}
#ifdef TIMING
@@ -196,6 +170,9 @@
#endif
#ifdef DEBUG
+# ifdef ASSERT
+# undef ASSERT
+# endif
#define ASSERT(x) if (!(x)) __asm__ __volatile ("int $3" :: )
#endif
--
Daniel Yek
_______________________________________________
Audio-dev mailing list
[email protected]
http://lists.helixcommunity.org/mailman/listinfo/audio-dev