diff options
| author | Huan Zhang <victzhang@gmail.com> | 2012-06-11 23:17:19 +0200 |
|---|---|---|
| committer | Frank Gevaerts <frank@gevaerts.be> | 2012-06-11 23:17:19 +0200 |
| commit | fbe33e07285c2915cc0d9b5ff427ec6683c8c385 (patch) | |
| tree | 36e626f6bf829cb87b9483c4f6cdc1bdb2df5608 | |
| parent | 10b2143fbf56bd03a2050f06617d5af7dbb911df (diff) | |
| download | rockbox-fbe33e07285c2915cc0d9b5ff427ec6683c8c385.zip rockbox-fbe33e07285c2915cc0d9b5ff427ec6683c8c385.tar.gz rockbox-fbe33e07285c2915cc0d9b5ff427ec6683c8c385.tar.bz2 rockbox-fbe33e07285c2915cc0d9b5ff427ec6683c8c385.tar.xz | |
Fix libmad compilation on MIPS with newer gcc. FS#12013
Since gcc 4.4 the MIPS port no longer recognizes the "h" asm constraint.
It was necessary to remove this constraint in order to avoid generating
unpredictable code sequences. We can achieve the same effect using
128-bit types.
See also:GCC 4.4 release notes at http://gcc.gnu.org/gcc-4.4/
Change-Id: I713cdf57cde1a989ad960aa441ab1ccf51f1cdc6
| -rw-r--r-- | lib/rbcodec/codecs/libmad/fixed.h | 11 | ||||
| -rwxr-xr-x | tools/configure | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/rbcodec/codecs/libmad/fixed.h b/lib/rbcodec/codecs/libmad/fixed.h index 6015684..1b4d29d 100644 --- a/lib/rbcodec/codecs/libmad/fixed.h +++ b/lib/rbcodec/codecs/libmad/fixed.h @@ -292,6 +292,15 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) # elif defined(FPM_MIPS) +#if GCCNUM >= 404 +typedef unsigned int u64_di_t __attribute__ ((mode (DI))); +# define MAD_F_MLX(hi, lo, x, y) \ +do { \ + u64_di_t __ll = (u64_di_t) (x) * (y); \ + hi = __ll >> 32; \ + lo = __ll; \ +}while(0) +#else /* * This MIPS version is fast and accurate; the disposition of the least * significant bit depends on OPT_ACCURACY via mad_f_scale64(). @@ -322,6 +331,8 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) # define MAD_F_MLZ(hi, lo) ((mad_fixed_t) (lo)) # endif +#endif /* GCCNUM */ + # if defined(OPT_SPEED) # define mad_f_scale64(hi, lo) \ ((mad_fixed_t) ((hi) << (32 - MAD_F_SCALEBITS))) diff --git a/tools/configure b/tools/configure index c008395..7d86068 100755 --- a/tools/configure +++ b/tools/configure @@ -3840,6 +3840,9 @@ ${Darch_version} /* Define endianess for the target or simulator platform */ #define ${defendian} 1 +/* Define the GCC version used for the build */ +#define GCCNUM ${GCCNUM} + /* Define this if you build rockbox to support the logf logging and display */ ${use_logf} |