diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-08-24 20:50:09 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-08-24 20:50:09 +0000 |
commit | 327236cd6c211e54fc6288b0ac2b413901cc0611 (patch) | |
tree | b8413eb9f01313fbcce90df7a1f0ab3bdbc3d6cd /lib/Target/X86/X86InstrCompiler.td | |
parent | b05fdd6babada25da2ec3ba54bb462c2ecfc42a8 (diff) | |
download | external_llvm-327236cd6c211e54fc6288b0ac2b413901cc0611.zip external_llvm-327236cd6c211e54fc6288b0ac2b413901cc0611.tar.gz external_llvm-327236cd6c211e54fc6288b0ac2b413901cc0611.tar.bz2 |
Basic x86 code generation for atomic load and store instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138478 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86InstrCompiler.td')
-rw-r--r-- | lib/Target/X86/X86InstrCompiler.td | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Target/X86/X86InstrCompiler.td b/lib/Target/X86/X86InstrCompiler.td index 78cf754..2801c9b 100644 --- a/lib/Target/X86/X86InstrCompiler.td +++ b/lib/Target/X86/X86InstrCompiler.td @@ -1691,3 +1691,17 @@ def : Pat<(and GR64:$src1, i64immSExt8:$src2), (AND64ri8 GR64:$src1, i64immSExt8:$src2)>; def : Pat<(and GR64:$src1, i64immSExt32:$src2), (AND64ri32 GR64:$src1, i64immSExt32:$src2)>; + +def : Pat<(atomic_load_8 addr:$src), (MOV8rm addr:$src)>; +def : Pat<(atomic_load_16 addr:$src), (MOV16rm addr:$src)>; +def : Pat<(atomic_load_32 addr:$src), (MOV32rm addr:$src)>; +def : Pat<(atomic_load_64 addr:$src), (MOV64rm addr:$src)>; + +def : Pat<(atomic_store_8 addr:$ptr, GR8:$val), + (MOV8mr addr:$ptr, GR8:$val)>; +def : Pat<(atomic_store_16 addr:$ptr, GR16:$val), + (MOV16mr addr:$ptr, GR16:$val)>; +def : Pat<(atomic_store_32 addr:$ptr, GR32:$val), + (MOV32mr addr:$ptr, GR32:$val)>; +def : Pat<(atomic_store_64 addr:$ptr, GR64:$val), + (MOV64mr addr:$ptr, GR64:$val)>; |