summaryrefslogtreecommitdiff
path: root/utils/TableGen/X86FoldTablesEmitter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/TableGen/X86FoldTablesEmitter.cpp')
-rw-r--r--utils/TableGen/X86FoldTablesEmitter.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/utils/TableGen/X86FoldTablesEmitter.cpp b/utils/TableGen/X86FoldTablesEmitter.cpp
index f211a8fab975..99429c5f96a2 100644
--- a/utils/TableGen/X86FoldTablesEmitter.cpp
+++ b/utils/TableGen/X86FoldTablesEmitter.cpp
@@ -77,7 +77,14 @@ const char *const NoFoldSet[] = {
"TCRETURNri64",
"TCRETURNmi64", // Special dealing (in X86InstrCompiler.td under
"TCRETURNri", // "tailcall stuff" section).
- "TCRETURNmi"
+ "TCRETURNmi",
+
+ // Never fold XCHG, the register and memory forms have different locking
+ // semantics.
+ "XCHG8rr", "XCHG8rm",
+ "XCHG16rr", "XCHG16rm",
+ "XCHG32rr", "XCHG32rm",
+ "XCHG64rr", "XCHG64rm",
// Different calculations of the folded operand between
// memory and register forms (folding is illegal).