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 137006 - Investigate asm contstraints in gatomic.c
Investigate asm contstraints in gatomic.c
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: general
2.3.x
Other Linux
: Normal minor
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2004-03-12 19:56 UTC by Miguel Ibarra
Modified: 2011-05-28 21:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to fix glib/gatomic.c for PPC. There are two superfluos (I think) asm constraints in g_atomic_int_add() and g_atomic_int_exchange_and_add(). (1.41 KB, patch)
2004-03-12 19:59 UTC, Miguel Ibarra
none Details | Review

Description Miguel Ibarra 2004-03-12 19:56:19 UTC
glib/gatomic.c failed to built for me with a "inconsistent asm constraints"
error. I made a couple of changes and it seems to work.

I'll attatch a patch.
Comment 1 Miguel Ibarra 2004-03-12 19:59:40 UTC
Created attachment 25574 [details] [review]
patch to fix glib/gatomic.c for PPC. There are two superfluos (I think) asm constraints in g_atomic_int_add() and g_atomic_int_exchange_and_add().
Comment 2 Owen Taylor 2004-03-12 21:41:04 UTC
See recent discussion on gtk-devel-list.
Comment 3 Manish Singh 2004-03-12 23:09:36 UTC
I'm hesitant to remove the constraints without fully understanding why
they aren't needed. At cursory glance, I don't think they are, since I
think they are simply there to force reloads of any register cached
values of *atomic, since glibc has these as #defines and not
functions. But I'd like a second opinion.

I'm going to apply Sebastian's patch to disable the asm when compiling
with -O0, and will punt this for future investigation.
Comment 4 Manish Singh 2004-03-12 23:23:25 UTC
Fri Mar 12 15:21:22 2004  Manish Singh  <yosh@gimp.org>
                                                                     
          
        * glib/gatomic.c: Non-optimizing compile fails for two asm
        statements on PowerPC. Use generic implementaton for those
        cases. Spotted by Christof Petig <christof@petig-baender.de>,
        fix by Sebastian Wilhelmi. Bug #137006 has a possible
alternate            
        solution, but we'll be conservative for now.
Comment 5 Christophe Fergeau 2004-07-23 11:44:15 UTC
Shouldn't this bug be closed now ?
Comment 6 Owen Taylor 2004-07-24 18:19:11 UTC
See above "... and will punt this for future investigation."
Comment 7 Michael Haubenwallner 2004-09-08 14:03:26 UTC
Still can't compile gatomic.c from CVS (as of pre 2.5.3) on a
powerpc-ibm-aix5.2.0.0 using gcc-3.3.2. I always get assembler errors in
g_atomic_int_compare_and_exchange/g_atomic_pointer_compare_and_exchange, and
with optimization -O2, in g_atomic_int_exchange_and_add/g_atomic_int_add too.

I don't use gas, if this does matter.
Comment 8 Matthias Clasen 2011-05-28 21:00:09 UTC
The asm implementation has been removed in a rewrite of gatomic.c