GNOME Bugzilla – Bug 612370
gstutils.c inline asm typo, compilation fails
Last modified: 2010-03-10 07:16:54 UTC
mul should be mulq ... otherwise the build fails. See downstream bug: http://trac.macports.org/ticket/24002 The bug entered with this commit: commit d8911f269faa235572b80a8a25b842b09df6e151 Author: Wim Taymans <wim.taymans@collabora.co.uk> Date: Fri Aug 28 12:43:43 2009 +0200 utils: optimize for x86_64 with some inline asm 64bit x86 has native 64x64->128 bit multiply that we can use with some inline assembler to speed up large multiplications. Use bsr to find the number of leading zeros more efficiently. Here is the fix: diff --git a/gst/gstutils.c b/gst/gstutils.c index fc9339d..da32ca7 100644 --- a/gst/gstutils.c +++ b/gst/gstutils.c @@ -211,7 +211,7 @@ static inline void gst_util_uint64_mul_uint64 (GstUInt64 * c1, GstUInt64 * c0, guint64 arg1, guint64 arg2) { - __asm__ __volatile__ ("mul %3":"=a" (c0->ll), "=d" (c1->ll) + __asm__ __volatile__ ("mulq %3":"=a" (c0->ll), "=d" (c1->ll) :"a" (arg1), "g" (arg2) ); }
commit d7034ce4ae29dca5c0441492f186d886fd6bfe56 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Mar 10 07:15:15 2010 +0000 utils: Use mulq instead of mul as some assemblers can't guess the size of th Fixes bug #612370.