This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: ARM: enable interpreter, add locks code
- From: Paul Brook <paul at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Andrew Haley <aph-gcc at littlepinkcloud dot com>, java-patches at gcc dot gnu dot org
- Date: Fri, 13 Jul 2007 19:04:10 +0100
- Subject: Re: ARM: enable interpreter, add locks code
- References: <18069.10098.18740.585534@zebedee.pink>
> + ? arm*-linux-gnu)
Should probably be
arm*-linux*)
> +/* Atomic compare and exchange. These sequences are not actually
> + atomic; there is a race if *ADDR != OLD_VAL and we are preempted
For recent kernels there is a kernel helper you should use.
See __kernel_cmpxchg in linux/arch/arm/kernel/entry-armv.S
Any kernel capable of running on armv6/v7 hardware should have this helper.
So should all targets on targets that define __ARM_EABI__
So I suggest using the kernel helper for EABI and v6/v7 libraries, everyone
else will have to make do with the crappy old sequence.
Paul