[patch] Shark reroute LLVM atomic intrinsics to Zero (new ARM specific patch)
xerxes at zafena.se
Thu Apr 23 02:42:01 PDT 2009
Gary Benson skrev:
> Ok, so there's no way around this.
> I'm thinking is that ARM is a special case here: you could implement
> SharkBuilder::CreateCmpxchg* on ARM by inlining arm_compare_and_swap
> from atomic_linux_zero.inline.hpp. That wouldn't require any LLVM
> modifications, and it wouldn't be any slower than a "real"
> implementation of llvm.atomic.cmp.swap.i32 because either way the
> atomic part is handled by the call to __kernel_cmpxchg so the
> generated code would be the same.
> Obviously it would be preferable for this code to be in LLVM rather
> than in Shark, but I know that implementing it in LLVM won't be quick
> or easy so I can live with a bit of clutter in Shark for this.
> What I'm not happy with is the idea of a generic solution that would
> perform a function call on platforms that don't require one, because
> that _would_ be slower than an implementation of llvm.atomic.cmp.swap.
> For platforms that have instructions to do this I'm going to insist
> people bite the bullet and implement the intrinsic.
Hi Gary i have attached a reworked patch which only apply for ARM with
appropriate comments so that new developers will know whats going on and
also know what can be removed once the LLVM implementation are in place.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2526 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/zero-dev/attachments/20090423/3d041a4d/attachment.bin
More information about the zero-dev