OSDN Git Service

[TableGen][AsmMatcherEmitter] Only parse isolated tokens as registers.
authorAhmed Bougacha <ahmed.bougacha@gmail.com>
Fri, 29 May 2015 01:03:37 +0000 (01:03 +0000)
committerAhmed Bougacha <ahmed.bougacha@gmail.com>
Fri, 29 May 2015 01:03:37 +0000 (01:03 +0000)
commitd4b59dcdba744d81cc6d97b1d4772d9c8b048977
tree35321deb23fa248eaa5b60a75eff4c64db7b8f5f
parent85f66de8cc99f9b0416beb01c24d54388893595c
[TableGen][AsmMatcherEmitter] Only parse isolated tokens as registers.

Fixes PR23455, where, when TableGen generates the matcher from the
AsmString, it splits "cmp${cc}ss" into tokens, and the "ss" suffix
is recognized as the SS register.

I can't think of a situation where that's a feature, not a bug, hence:
when a token is "isolated", i.e., it is followed and preceded by
separators, it shouldn't be parsed as a register.

Differential Revision: http://reviews.llvm.org/D9844

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238536 91177308-0d34-0410-b5e6-96231b3b80d8
test/MC/X86/intel-syntax.s
utils/TableGen/AsmMatcherEmitter.cpp