aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86/X86ISelLowering.h
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2010-11-20 11:25:00 +0000
committerDuncan Sands <baldrick@free.fr>2010-11-20 11:25:00 +0000
commit59d2dad59ebba1d82e5b72f78b7a5b2c873445d7 (patch)
treeccebb41eaf760e4dc3e2092947ba9a7e8e0bfcc1 /lib/Target/X86/X86ISelLowering.h
parentb9e6fe1e3afe3c4cdbdddfb563adc10c439dc296 (diff)
downloadexternal_llvm-59d2dad59ebba1d82e5b72f78b7a5b2c873445d7.zip
external_llvm-59d2dad59ebba1d82e5b72f78b7a5b2c873445d7.tar.gz
external_llvm-59d2dad59ebba1d82e5b72f78b7a5b2c873445d7.tar.bz2
On X86, MEMBARRIER, MFENCE, SFENCE, LFENCE are not target memory intrinsics,
so don't claim they are. They are allocated using DAG.getNode, so attempts to access MemSDNode fields results in reading off the end of the allocated memory. This fixes crashes with "llc -debug" due to debug code trying to print MemSDNode fields for these barrier nodes (since the crashes are not deterministic, use valgrind to see this). Add some nasty checking to try to catch this kind of thing in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119901 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86ISelLowering.h')
-rw-r--r--lib/Target/X86/X86ISelLowering.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Target/X86/X86ISelLowering.h b/lib/Target/X86/X86ISelLowering.h
index 776299e..ccc792b 100644
--- a/lib/Target/X86/X86ISelLowering.h
+++ b/lib/Target/X86/X86ISelLowering.h
@@ -256,6 +256,12 @@ namespace llvm {
// WIN_ALLOCA - Windows's _chkstk call to do stack probing.
WIN_ALLOCA,
+ // Memory barrier
+ MEMBARRIER,
+ MFENCE,
+ SFENCE,
+ LFENCE,
+
// ATOMADD64_DAG, ATOMSUB64_DAG, ATOMOR64_DAG, ATOMAND64_DAG,
// ATOMXOR64_DAG, ATOMNAND64_DAG, ATOMSWAP64_DAG -
// Atomic 64-bit binary operations.
@@ -267,12 +273,6 @@ namespace llvm {
ATOMNAND64_DAG,
ATOMSWAP64_DAG,
- // Memory barrier
- MEMBARRIER,
- MFENCE,
- SFENCE,
- LFENCE,
-
// LCMPXCHG_DAG, LCMPXCHG8_DAG - Compare and swap.
LCMPXCHG_DAG,
LCMPXCHG8_DAG,