This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [boehms-gc, libjava?] Update Boehm's GC to 6.8


On Fri, Aug 04, 2006 at 01:38:50PM -0700, Boehm, Hans wrote:
> The underlying problem is that this instruction has weird register
> constraints, as documented here.  I'm not sure that this particular
> encoding into gcc asm notation is in any sense optimal.

When the assembler began checking this constraint we had to fix it in a
lot of places.  I used this:

   __asm__ __volatile__ ("swp %0, %1, [%2]"
                         : "=&r,&r" (result)
                         : "r,0" (newvalue), "r,r" (mem) : "memory");

The second operand can be the same as the first operand, or different,
but the third operand can never match the first operand.


-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]