forked from len0rd/rockbox
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
This commit is contained in:
parent
10b2143fbf
commit
fbe33e0728
2 changed files with 14 additions and 0 deletions
|
@ -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)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue