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: __sync_swap* with acq/rel/full memory barrier semantics



Some names include "sync" and some don't?

Well, I was going to blame Aldy :-) but then I went to look at this, and thats the same way *all* the other __sync instructions seem to be.

ie:

builtins.c:expand_builtin_lock_test_and_set (enum machine_mode mode,
tree exp,
builtins.c: case BUILT_IN_LOCK_TEST_AND_SET_1:
builtins.c: case BUILT_IN_LOCK_TEST_AND_SET_2:
builtins.c: case BUILT_IN_LOCK_TEST_AND_SET_4:

whereas everything else is 'sync_lock_test_and_set'..

So i guess it falls to prior art... I assume Aldy just cut-and-pasted
for his new routine and just changed the names in the same format.

Correct, this was the way all the other sync builtins were implemented. I found it odd as well, but wanted to keep my changes to a minimum.



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