This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: libjava failed to build on Linux/x86
- From: "Boehm, Hans" <hans_boehm at hp dot com>
- To: "'Per Bothner'" <per at bothner dot com>, "H . J . Lu" <hjl at lucon dot org>
- Cc: gcc at gcc dot gnu dot org, java at gcc dot gnu dot org
- Date: Thu, 24 Jan 2002 15:42:32 -0800
- Subject: RE: libjava failed to build on Linux/x86
This happened once before. IIRC, the conclusion then was that it might be
better to change "=m" to "+m" and to remove the "0"(*(addr)) argument. But
as it stands, this very closely follows one of the examples in the gcc
manual, so it seems to primarily be a gcc bug.
Hans
> -----Original Message-----
> From: Per Bothner [mailto:per@bothner.com]
> In
> function `bool
> compare_and_swap(volatile obj_addr_t*, unsigned int,
> unsigned int)':
> /home/bothner/GNU/gcc/libjava/java/lang/natObject.cc:329:
> inconsistent
> operand
> constraints in an `asm'
> make[3]: *** [java/lang/natObject.lo] Error 1
>
> The asm is:
>
> inline static bool
> compare_and_swap(volatile obj_addr_t *addr,
>
> obj_addr_t old,
> obj_addr_t new_val)
> {
> char result;
> __asm__ __volatile__("lock; cmpxchgl %2, %0; setz %1"
> : "=m"(*(addr)), "=q"(result)
> : "r" (new_val), "0"(*(addr)), "a"(old) : "memory");
> return (bool) result;
> }
>
>
> --
> --Per Bothner
> per@bothner.com http://www.bothner.com/per/
>