This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: [patch] Provide a can_compare_and_swap_p target hook.
- From: Andrew MacLeod <amacleod at redhat dot com>
- To: Andrew Haley <aph at redhat dot com>, Richard Biener <richard dot guenther at gmail dot com>, Richard Henderson <rth at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Cc: Jeff Law <law at redhat dot com>, java at gcc dot gnu dot org
- Date: Fri, 07 Nov 2014 08:31:19 -0500
- Subject: Re: [patch] Provide a can_compare_and_swap_p target hook.
- Authentication-results: sourceware.org; auth=none
- References: <5458FE9C dot 2090409 at redhat dot com> <54590C19 dot 40208 at redhat dot com> <54591348 dot 1010904 at redhat dot com> <545913A4 dot 5010400 at redhat dot com> <54591B3A dot 8030908 at redhat dot com> <70044BE8-9F38-4BDB-B73F-6E2FC9AC2629 at gmail dot com> <54593352 dot 2000700 at redhat dot com> <545BB682 dot 9000209 at redhat dot com> <545BBCA5 dot 7060203 at redhat dot com> <545BC666 dot 5020007 at redhat dot com> <545C9176 dot 6000006 at redhat dot com>
On 11/07/2014 04:31 AM, Andrew Haley wrote:
On 06/11/14 19:05, Andrew MacLeod wrote:
1) Given that the compiler *always* provides support via libatomic now
(even if it is via locks), does that mean that VMSupportsCS8_builtin()
should always return true?
or should we map to that a call to __atomic_always_lock_free() ? (that
always gets folded to a true or false at compile time) my guess is the
latter?
Perhaps so. The problem is that some targets can't do CAS on 64-bit
doublewords.
with libatomic present, I believe they always can, even if it drops to a
lock implementation.
I'm sorry, I really can't remember. I can't think of any reason to
want to turn off builtin support. You have to remember that all this
was written when our support for atomic builtins was seriously flaky
and we would just punt back to the user anything we hadn't written
yet.
No worries, i cant remember why i did something last year, let along 8
years ago :-)
I'll take a best stab and we'll see what happens :-)
Andrew