OSDN Git Service

[X86][AsmParser] Rework that allows (%dx) to be used in place of %dx with in/out...
authorCraig Topper <craig.topper@intel.com>
Sat, 23 Jun 2018 00:03:20 +0000 (00:03 +0000)
committerCraig Topper <craig.topper@intel.com>
Sat, 23 Jun 2018 00:03:20 +0000 (00:03 +0000)
commitba5eea7881910abb7cac9fcb6272a472702554a3
tree1e9cfd2a8a3dd334e75df96683b37265c7385f55
parent10fa02975bca65529dc08f718185e2f4bbe6b6d9
[X86][AsmParser] Rework that allows (%dx) to be used in place of %dx with in/out instructions.

Previously, to support (%dx) we left a wide open hole in our 16-bit memory address checking. This let this address value be used with any instruction without error in the parser. It would later fail in the encoder with an assertion failure on debug builds and who knows what on release builds.

This patch passes the mnemonic down to the memory operand parsing function so we can allow the (%dx) form only on specific instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335403 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/AsmParser/X86AsmParser.cpp