Re: [PATCH] Fix MIPS assembly to work with recent GCC
Kurt Roeckx <[email protected]> Thu, 7 Nov 2013 13:19:12 +0100
| Newsgroups | gmane.comp.audio.mad.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Nov 07, 2013 at 01:41:01AM -0500, Mark H Weaver wrote:
> This patch fixes the MIPS assembly code to work with recent versions of
> GCC, where the "=h" constraint is no longer supported.
I've been using this patch:
--- libmad-0.15.1b.orig/fixed.h
+++ libmad-0.15.1b/fixed.h
@@ -297,6 +297,14 @@
/* --- MIPS
* ----------------------------------------------------------------
* */
+# elif defined(FPM_MIPS) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+ 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)
# elif defined(FPM_MIPS)
/*