In running applications on e500, we got "illegal instruction" error, finally,
we found it's caused by asm code below:

gcc-4.3.2/boehm-gc/include/private/gc_locks.h
        __asm__ __volatile__("lwsync": : : "memory");

lwsync is not supported by e500, even though powerpc claims that. There are
similar issues before since __NO_LWSYNC__ has been introduced.

it should be modified to use msync or sync in this case.
    + #ifdef __NO_LWSYNC__
    +   __asm__ __volatile__("msync": : : "memory");
    + #else
        __asm__ __volatile__("lwsync": : : "memory");
    + #endif


-- 
           Summary: illegal instruction "lwsync" reported on e500
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: boehm-gc
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: harry dot he at freescale dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: powerpc-linux-gnu


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

Reply via email to