summaryrefslogtreecommitdiff
path: root/lib/Target/X86/MCTargetDesc
diff options
context:
space:
mode:
authorNirav Dave <niravd@google.com>2017-11-20 18:38:55 +0000
committerNirav Dave <niravd@google.com>2017-11-20 18:38:55 +0000
commit7078f99f3b946d3d32c45f3d8ebd4250169be694 (patch)
tree9d206d937432462b64913dad2062b60c5b65aa9a /lib/Target/X86/MCTargetDesc
parentbfeecfb5a0375eab2f1cee244776114dead0aa97 (diff)
[X86] Avoid unecessary opsize byte in segment move to memory
Summary: Segment moves to memory are always 16-bit. Remove invalid 32 and 64 bit variants. Fixes PR34478. Reviewers: rnk, craig.topper Subscribers: llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D39847 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318678 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/MCTargetDesc')
-rw-r--r--lib/Target/X86/MCTargetDesc/X86BaseInfo.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Target/X86/MCTargetDesc/X86BaseInfo.h b/lib/Target/X86/MCTargetDesc/X86BaseInfo.h
index 7c6444ba58a..f65ba1b6005 100644
--- a/lib/Target/X86/MCTargetDesc/X86BaseInfo.h
+++ b/lib/Target/X86/MCTargetDesc/X86BaseInfo.h
@@ -366,13 +366,15 @@ namespace X86II {
// OpSize - OpSizeFixed implies instruction never needs a 0x66 prefix.
// OpSize16 means this is a 16-bit instruction and needs 0x66 prefix in
// 32-bit mode. OpSize32 means this is a 32-bit instruction needs a 0x66
- // prefix in 16-bit mode.
+ // prefix in 16-bit mode. OpSizeIgnore means that the instruction may
+ // take a optional 0x66 byte but should not emit with one.
OpSizeShift = 7,
OpSizeMask = 0x3 << OpSizeShift,
- OpSizeFixed = 0 << OpSizeShift,
- OpSize16 = 1 << OpSizeShift,
- OpSize32 = 2 << OpSizeShift,
+ OpSizeFixed = 0 << OpSizeShift,
+ OpSize16 = 1 << OpSizeShift,
+ OpSize32 = 2 << OpSizeShift,
+ OpSizeIgnore = 3 << OpSizeShift,
// AsSize - AdSizeX implies this instruction determines its need of 0x67
// prefix from a normal ModRM memory operand. The other types indicate that