This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#12013 - Build libmad using mips-sde-elf-gcc 4.5.1:impossible constraint in 'asm'
Attached to Project:
Rockbox
Opened by Huan Zhang (victorzhang) - Wednesday, 16 March 2011, 18:00 GMT+2
Last edited by Frank Gevaerts (fg) - Monday, 11 June 2012, 23:19 GMT+2
Opened by Huan Zhang (victorzhang) - Wednesday, 16 March 2011, 18:00 GMT+2
Last edited by Frank Gevaerts (fg) - Monday, 11 June 2012, 23:19 GMT+2
|
Details@rockbox/apps/codecs/libmad/fixed.h,line 299
# define MAD_F_MLX(hi, lo, x, y) \ asm ("mult %2,%3" \ : "=l" (lo), "=h" (hi) \ : "%r" (x), "r" (y)) 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: 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) See also:GCC 4.4 release note http://gcc.gnu.org/gcc-4.4/ This patch is a possible workaround that works on both old and new version of gcc. |
This task depends upon
Closed by Frank Gevaerts (fg)
Monday, 11 June 2012, 23:19 GMT+2
Reason for closing: Accepted
Additional comments about closing: Committed in fbe33e0. Thanks!
Monday, 11 June 2012, 23:19 GMT+2
Reason for closing: Accepted
Additional comments about closing: Committed in fbe33e0. Thanks!
This patch applys to fixed.h r28532.