[Bug boehm-gc/47309] New: gcc-4.4.5 fails to build on darwin/ppc due to issues in boehm-gc GC_test_and_set

jeremyhu at macports dot org gcc-bugzilla@gcc.gnu.org
Sat Jan 15 20:02:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47309

           Summary: gcc-4.4.5 fails to build on darwin/ppc due to issues
                    in boehm-gc GC_test_and_set
           Product: gcc
           Version: 4.4.5
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: boehm-gc
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jeremyhu@macports.org


temp work dir replaced with "..." for better readability:

libtool: compile:  .../build/./gcc/xgcc -B.../build/./gcc/
-B/opt/local/ppc-apple-darwin9/bin/ -B/opt/local/ppc-apple-darwin9/lib/
-isystem /opt/local/ppc-apple-darwin9/include -isystem
/opt/local/ppc-apple-darwin9/sys-include -DHAVE_CONFIG_H
-I.../gcc-4.4.5/boehm-gc/include -fexceptions -Iinclude -I././targ-include
-I.//libc/include -g -pipe -ggdb3 -fexceptions -Iinclude -I././targ-include
-I.//libc/include -c ../../../gcc-4.4.5/boehm-gc/os_dep.c  -fno-common -DPIC -o
.libs/os_dep.o
In file included from .../gcc-4.4.5/boehm-gc/include/private/gc_priv.h:98,
                 from ../../../gcc-4.4.5/boehm-gc/os_dep.c:17:
.../gcc-4.4.5/boehm-gc/include/private/gc_locks.h: In function
'GC_test_and_set':
.../gcc-4.4.5/boehm-gc/include/private/gc_locks.h:165: error: 'asm' operand has
impossible constraints

        inline static int GC_test_and_set(volatile unsigned int *addr) {
          int oldval;
          int temp = 1; /* locked value */

          __asm__ __volatile__(
               "1:\tlwarx %0,0,%3\n"   /* load and reserve               */
               "\tcmpwi %0, 0\n"       /* if load is                     */
               "\tbne 2f\n"            /*   non-zero, return already set */
               "\tstwcx. %2,0,%1\n"    /* else store conditional         */
               "\tbne- 1b\n"           /* retry if lost reservation      */
               "\tsync\n"              /* import barrier                 */
               "2:\t\n"                /* oldval is zero if we set       */
              : "=&r"(oldval), "=p"(addr)
              : "r"(temp), "1"(addr)
              : "cr0","memory");
          return oldval;
        }



More information about the Gcc-bugs mailing list