[x86] Make AsmParser validate registers for memory operands a bit better
authorDavid Woodhouse <dwmw2@infradead.org>
Wed, 8 Jan 2014 12:58:28 +0000 (12:58 +0000)
committerDavid Woodhouse <dwmw2@infradead.org>
Wed, 8 Jan 2014 12:58:28 +0000 (12:58 +0000)
commitab5b9489e9e91ef21d9cebf5cf9453d2e9fce1d7
tree4838e95316a428fefedc48c15bd8ac10f32a25c1
parentaab59870a4f57f3d3246c858cb775766e38f0795
[x86] Make AsmParser validate registers for memory operands a bit better

We can't do a perfect job here. We *have* to allow (%dx) even in 64-bit
mode, for example, because it might be used for an unofficial form of
the in/out instructions. We actually want to do a better job of validation
*later*. Perhaps *instead* of doing it where we are at the moment.

But for now, doing what validation we *can* do in the place that the code
already has its validation, is an improvement.

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