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] |
On 06/17/2011 02:12 PM, Andrew MacLeod wrote:--- machmode.h (working copy) *************** extern enum machine_mode ptr_mode; *** 275,278 **** --- 275,291 ---- /* Target-dependent machine mode initialization - in insn-modes.c. */ extern void init_adjust_machine_modes (void);
+ /* Memory model types for the __sync_mem* builtins. + This must match the order in libstdc++-v3/include/bits/atomic_base.h. */ + enum memmodel + { + MEMMODEL_RELAXED = 0, + MEMMODEL_CONSUME = 1, + MEMMODEL_ACQUIRE = 2, + MEMMODEL_RELEASE = 3, + MEMMODEL_ACQ_REL = 4, + MEMMODEL_SEQ_CST = 5, + MEMMODEL_LAST = 6 + };This isn't a very machine mode sort of define. I think coretypes.h is a better choice.
Some names include "sync" and some don't?+ static rtx + expand_builtin_mem_exchange (enum machine_mode mode, tree exp, rtx target)
Ah, even better. For some reason I thought I saw somewhere that it wasn't a full barrier. Might have just been the documentation for lock_test_and_set.+The xchg instruction is a full barrier; no need for anything extra here. Indeed, you needn't define UNSPECV_MEM_XCHG either. This could be as simple as
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |