diff options
author | Robert Lytton <robert@xmos.com> | 2013-11-12 10:11:26 +0000 |
---|---|---|
committer | Robert Lytton <robert@xmos.com> | 2013-11-12 10:11:26 +0000 |
commit | 32e8528c3368d5e0986cb265b436799cc490ea0c (patch) | |
tree | db91eca62ea74e7333238360b8342865d89ce151 /lib/Target/XCore/XCoreInstrInfo.td | |
parent | c17ea93ed516d5c7d03a8d5c7fc470a0f254b58a (diff) | |
download | llvm-32e8528c3368d5e0986cb265b436799cc490ea0c.tar.gz llvm-32e8528c3368d5e0986cb265b436799cc490ea0c.tar.bz2 llvm-32e8528c3368d5e0986cb265b436799cc490ea0c.tar.xz |
Add XCore support for ATOMIC_FENCE.
ATOMIC_FENCE is lowered to a compiler barrier which is codegen only. There
is no need to emit an instructions since the XCore provides sequential
consistency.
Original patch by Richard Osborne
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194464 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/XCore/XCoreInstrInfo.td')
-rw-r--r-- | lib/Target/XCore/XCoreInstrInfo.td | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Target/XCore/XCoreInstrInfo.td b/lib/Target/XCore/XCoreInstrInfo.td index 81fa84d4e2..934a707e78 100644 --- a/lib/Target/XCore/XCoreInstrInfo.td +++ b/lib/Target/XCore/XCoreInstrInfo.td @@ -70,6 +70,11 @@ def callseq_start : SDNode<"ISD::CALLSEQ_START", SDT_XCoreCallSeqStart, def callseq_end : SDNode<"ISD::CALLSEQ_END", SDT_XCoreCallSeqEnd, [SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>; +def SDT_XCoreMEMBARRIER : SDTypeProfile<0, 0, []>; + +def XCoreMemBarrier : SDNode<"XCoreISD::MEMBARRIER", SDT_XCoreMEMBARRIER, + [SDNPHasChain]>; + //===----------------------------------------------------------------------===// // Instruction Pattern Stuff //===----------------------------------------------------------------------===// @@ -343,6 +348,10 @@ let usesCustomInserter = 1 in { (select GRRegs:$cond, GRRegs:$T, GRRegs:$F))]>; } +let hasSideEffects = 1 in +def Int_MemBarrier : PseudoInstXCore<(outs), (ins), "#MEMBARRIER", + [(XCoreMemBarrier)]>; + //===----------------------------------------------------------------------===// // Instructions //===----------------------------------------------------------------------===// |