After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 612370 - gstutils.c inline asm typo, compilation fails
gstutils.c inline asm typo, compilation fails
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Mac OS
: Normal blocker
: 0.10.29
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-03-10 01:38 UTC by Jeremy Huddleston
Modified: 2010-03-10 07:16 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jeremy Huddleston 2010-03-10 01:38:42 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)
       );
 }
Comment 1 Sebastian Dröge (slomo) 2010-03-10 07:16:54 UTC
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.