History log of /external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c18f4efc5dd24adcc653806455fc7ae8508e9c66 28-Jul-2013 Elena Demikhovsky <elena.demikhovsky@intel.com> Added encoding prefixes for KNL instructions (EVEX).
Added 512-bit operands printing.
Added instruction formats for KNL instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187324 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
f63ef914b67593e4b20a0b85e889380c20b41f55 24-Jul-2013 Craig Topper <craig.topper@gmail.com> Split generated asm mnemonic matching table into a separate table for each asm variant.

This removes the need to store the asm variant in each row of the single table that existed before. Shaves ~16K off the size of X86AsmParser.o.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187026 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
b99052ce4a75a3eac638afcd5171903514aa28e9 13-May-2013 Duncan Sands <baldrick@free.fr> Suppress GCC compiler warnings in release builds about variables that are only
read in asserts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181689 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
ffc49cbea41c08132587a3e622bb65191fa576a2 10-May-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Fix a crasher when we fail on a direct match.

The issue was that the MatchingInlineAsm and VariantID args to the
MatchInstructionImpl function weren't being set properly. Specifically, when
parsing intel syntax, the parser thought it was parsing inline assembly in the
at&t dialect; that will never be the case.

The crash was caused when the emitter tried to emit the instruction, but the
operands weren't set. When parsing inline assembly we only set the opcode, not
the operands, which is used to lookup the instruction descriptor.
rdar://13854391 and PR15945

Also, this commit reverts r176036. Now that we're correctly parsing the intel
syntax the pushad/popad don't match properly. I've reimplemented that fix using
a MnemonicAlias.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181620 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
a70d02ff2841d535875fe80bd3d3c25ba90613da 10-May-2013 Chad Rosier <mcrosier@apple.com> [x86AsmParser] It's valid to stop parsing an operand at an immediate.
rdar://13854369 and PR15944

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181564 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
5c332dbd30d9398ed25b30c3080506f7b8e92290 05-May-2013 Dmitri Gribenko <gribozavr@gmail.com> Add ArrayRef constructor from None, and do the cleanups that this constructor enables

Patch by Robert Wilhelm.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
26f3bb997f0c5d7951d61d28a26ca6ac1481090c 03-May-2013 John McCall <rjmccall@apple.com> In MC asm parsing, account for the possibility of whitespace within
the "identifier" parsed by the frontend callback by skipping forward
until we've consumed a token that ends at the point dictated by the
callback.

In addition, inform the callback when it's parsing an unevaluated
operand (e.g. mov eax, LENGTH A::x) as opposed to an evaluated one
(e.g. mov eax, [A::x]).

This commit depends on a clang commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180978 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
d50dc20f06d9cf95562899020f773cd9f8309786 23-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Removed this unnecessary check. In the current implementation,
Disp will always be one of MCSymbolRefExpr or MCConstantExpr, and never NULL.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
248f4965d29362db182d642cdf5fcbeba5c997a4 23-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add the OpDecl to the InlineAsmIdentifierInfo struct and in turn
the MCParsedAsmOperand.
Part of rdar://13663589

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180054 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
566542c87bf215c621ca58963c9940649ed27068 22-Apr-2013 Chad Rosier <mcrosier@apple.com> Fix unused variable warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
6804971dcfbba1dcf7b0f8335588ba2ab6b0f073 22-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Remove the identifier parsing logic from the AsmParser. This is
now taken care of by the frontend, which allows us to parse arbitrary C/C++
variables.
Part of rdar://13663589

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
44021515d76ec9b529f2adbc252552869b1357d5 22-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Refactor/clean up the SemaLookup interface. No functional
change indended.
Part of rdar://13663589

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
4acef770cfb9622a5baf3e1c72e99c4fc84e48ea 19-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Make code layout more canonical with iniline asm handled last.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
e43624e345bcef09d4d57dca2c27d33cb6a34edd 19-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Refactor the parsing of identifiers. No functional change
indended.
Part of rdar://13663589

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
d38684366105789ce41fa1bca76d8d93de19bb07 19-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Remove these asserts. C++ variables that use namespace
qualifiers don't necessarily begin with an identifier (e.g., ::foo::bar).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
3031ac01311e474cb0c25fe3f6d2e86cac220485 19-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Move this variable into the scope in which it is used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
fea1f8ee7a707c1a37a69f92459046ede590d834 19-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Make this a hard error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179865 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
89ab4e4cd0627be8b779c6a1e7023e9ea58c4b09 19-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Cleanup the dot operator implementation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
c3a9574eed4420985533b7223fda094d3c191f68 18-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Simplify some logic and add a FIXME for unhandled unary minus.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179765 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
6c8afad198688649ba7fc024bd5521d6b77a7ad5 18-Apr-2013 Chad Rosier <mcrosier@apple.com> Make this private method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179764 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
53c9def43359f9b908565b28340e461ce5463009 17-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] These should be int64_t, not uint64_t.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
d58f773b96fdb5539d9da2192b8cf2ff6112239f 17-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add support for the minus unary operator. Previously, we were
unable to handle cases such as __asm mov eax, 8*-8.

This patch also attempts to simplify the state machine. Further, the error
reporting has been improved. Test cases included, but more will be added to
the clang side shortly.
rdar://13668445


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179719 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
4afa9b7ffc636104e225e815afc568af27a134da 17-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add support for parsing complex immediate expressions. Test
cases to be submitted on clang side shortly.
rdar://13663768 and PR15760

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179655 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
b7690beb0213c7757bbd37b367b4092a93a9dc07 16-Apr-2013 Chad Rosier <mcrosier@apple.com> Remove unused variable from previous refactor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
8ccacf788aeb3834ba9b6a2dc4f524fe42c55076 16-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Refactor. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
7e5d54c320f9f02284187ba0d34faf2e6e1988f6 16-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Remove some dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
41a10b6c4ecb0bdd17466bd569eaf4b8f103e240 13-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Simplify the logic by using parsePrimaryExpr. No functional
change intended. Test case previously added in r178568.
Part of rdar://13611297

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179425 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
3f42936af8be447c339a7c41bcd2b1468e39135b 12-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Move this logic into a static function as it's only applicable
when parsing MS-style inline assembly. No functional change intended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
d0dd5e413a53e4f743dece52b3e912749e2880ae 12-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Address the FIXME for ImmDisp before brackets. This
is a follow on to r179393 and r179399. Test case to be added on
the clang side.
Part of rdar://13453209


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179403 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
b71ce6a4234f78aef982c3580eb19a90c40302c5 12-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Have the [ Symbol ] case fall into the more general logic. This
is a follow on to r179393. Test case to be added on the clang side.
Part of rdar://13453209


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179399 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
9458f3ecee4d17ec9759a0351d2f339315cdebb1 12-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add support for operands that include both a symbol and an
immediate displacement. Specifically, add support for generating the proper IR.
We've been able to parse this for some time now. Test case to be added on the
clang side.
Part of rdar://13453209


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
33c55bdfed027313b05217d7049aa0e810da5caa 12-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add support for using the LENGTH, TYPE, and SIZE operators with
variables that use namespace alias qualifiers. Test case coming on clang side
shortly.
Part of rdar://13499009


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179343 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
5ea1ea8db810aaf51f68e32119006629a2f06f30 12-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add support for using offsetof operator with variables that use
namespace alias qualifiers. Test case coming on clang side shortly.
Part of rdar://13499009


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
adb5c16aa74d67b6c36b4c22dc0fc2cdecc43acb 12-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Pass a StringRef reference to ParseIntelVarWithQualifier so we
can build up the identifier string. No test case as support for looking up
these type of identifiers hasn't been implemented on the clang side.
Part of rdar://13499009


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179336 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
f06cc981495991d2095ed4066f0eb9c0241c0a61 11-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Remove brackets from around a symbol reference in the target
specific logic. This makes the code much less fragile. Test case coming on the
clang side in a moment.
rdar://13634327


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
37c04bcff28ae24aa84c44d73b1079bdab09c8c5 10-Apr-2013 Chad Rosier <mcrosier@apple.com> Tidy up, fix and simplify a few of the SMLocs. Prior to r179109 the Start SMLoc
wasn't always the start of the operand. If there was a symbol reference, then
Start pointed to that token. It's very likely there are other places that need
to be updated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
b4d6a6574d3702e14e67be588b997f7dee68815a 10-Apr-2013 Chad Rosier <mcrosier@apple.com> Remove unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179205 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
ba69b366929a39d393e7eed0bbf2edc31d8de599 10-Apr-2013 Chad Rosier <mcrosier@apple.com> Reapply r179115, but use parsePrimaryExpression a little more judiciously.
Test cases that regressed due to r179115, plus a few more, were added in
r179182. Original commit message below:

[ms-inline asm] Use parsePrimaryExpr in lieu of parseExpression if we need to
parse an identifier. Otherwise, parseExpression may parse multiple tokens,
which makes it impossible to properly compute an immediate displacement.
An example of such a case is the source operand (i.e., [Symbol + ImmDisp]) in
the below example:

__asm mov eax, [Symbol + ImmDisp]

Part of rdar://13611297

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179187 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
df1087061c58c1734efd363715f221ac7d426cbb 09-Apr-2013 Chad Rosier <mcrosier@apple.com> Cleanup. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179129 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
bad493e9126fd601c01d4eb5bd9c30f517382e69 09-Apr-2013 Chad Rosier <mcrosier@apple.com> Cleanup. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179125 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
3eb6d7fcd024b67d548e4c3a075682d7cff1599e 09-Apr-2013 Chad Rosier <mcrosier@apple.com> Revert r179115 as it looks to have killed the ASan tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179120 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
d4727e3798981af3d1308418464a10a398290851 09-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Use parsePrimaryExpr in lieu of parseExpression if we need to
parse an identifier. Otherwise, parseExpression may parse multiple tokens,
which makes it impossible to properly compute an immediate displacement.
An example of such a case is the source operand (i.e., [Symbol + ImmDisp]) in
the below example:

__asm mov eax, [Symbol + ImmDisp]

The existing test cases exercise this patch.
rdar://13611297


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179115 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
b976e407dcd7794eb9e151b81cdc8fbbe05e6bd8 09-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Maintain a StringRef to reference a symbol in a parsed operand,
rather than deriving the StringRef from the Start and End SMLocs.

Using the Start and End SMLocs works fine for operands such as [Symbol], but
not for operands such as [Symbol + ImmDisp]. All existing test cases that
reference a variable exercise this patch.
rdar://13602265



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179109 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
6b369ceb582f2deba9c252af301667975456ff86 08-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add support for ImmDisp [ Symbol ] memory operands.
rdar://13521249


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179030 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
e112453fc39b97147ea3f23bf0b1973cd9f739b1 05-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add support for numeric displacement expressions in bracketed
memory operands.

Essentially, this layers an infix calculator on top of the parsing state
machine. The scale on the index register is still expected to be an immediate

__asm mov eax, [eax + ebx*4]

and will not work with more complex expressions. For example,

__asm mov eax, [eax + ebx*(2*2)]

The plus and minus binary operators assume the numeric value of a register is
zero so as to not change the displacement. Register operands should never
be an operand for a multiply or divide operation; the scale*indexreg
expression is always replaced with a zero on the operand stack to prevent
such a case.
rdar://13521380


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178881 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
30c729b5d043a72a8eb35b9fe4c5c180cbed9a75 02-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add support for parsing variables with namespace alias
qualifiers.

This patch only adds support for parsing these identifiers in the
X86AsmParser. The front-end interface isn't capable of looking up
these identifiers at this point in time. The end result is the
compiler now errors during object file emission, rather than at
parse time. Test case coming shortly.
Part of rdar://13499009 and PR13340


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178566 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
dd40e8cd54805aa81c8548ac8c87755c562c1723 27-Mar-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add support of imm displacement before bracketed memory
expression. Specifically, this syntax:

ImmDisp [ BaseReg + Scale*IndexReg + Disp ]

We don't currently support:

ImmDisp [ Symbol ]

rdar://13518671


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178186 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
811ddf64afb03fb2262209034900f03fa797879c 19-Mar-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Move the immediate asm rewrite into the target specific
logic as a QOI cleanup. No functional change. Tests already in place.
rdar://13456414

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
d3e7416de7f4aae708a5cc57a9fcc75ad43e1e96 19-Mar-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Create a helper function, CreateMemForInlineAsm, that creates
an X86Operand, but also performs a Sema lookup and adds the sizing directive
when appropriate. Use this when parsing a bracketed statement. This is
necessary to get the instruction matching correct as well. Test case coming
on clang side.
rdar://13455408

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177439 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
023c8802203d7f3b433d93233ccee6f8cce9ca5d 19-Mar-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Move the size directive asm rewrite into the target specific
logic as a QOI cleanup.
rdar://13445327

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
ee29c16890ab0d7e6b96dc99b2c56ce5a62853b7 19-Mar-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Avoid emitting a redundant sizing directive, if we've already
parsed one. Test case coming shortly.
rdar://13446980

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
8ee1c1cfaff9eece05ecabfa267cd68c98af5dd2 18-Mar-2013 Craig Topper <craig.topper@gmail.com> Post process ADC/SBB and use a shorter encoding if they use a sign extended immediate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177243 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
4bef961baf9660f1ac5a5b80378631cd942636b2 18-Mar-2013 Craig Topper <craig.topper@gmail.com> Refactor some duplicated code into helper functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177242 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
a286fc065a5bc846d73c8407a534a1d3c1d70b59 15-Mar-2013 Eric Christopher <echristo@gmail.com> Silence anonymous type in anonymous union warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177135 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
4d9b7c234fd2510c27e6d74a3f0653efc0141580 01-Mar-2013 Duncan Sands <baldrick@free.fr> GCC thinks that this variable might be used uninitialized (it isn't).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176341 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
cb2ae3d98e3bb36e5813f8f69b00d39efd026dcd 20-Feb-2013 Jim Grosbach <grosbach@apple.com> MCParser: Update method names per coding guidelines.

s/AddDirectiveHandler/addDirectiveHandler/
s/ParseMSInlineAsm/parseMSInlineAsm/
s/ParseIdentifier/parseIdentifier/
s/ParseStringToEndOfStatement/parseStringToEndOfStatement/
s/ParseEscapedString/parseEscapedString/
s/EatToEndOfStatement/eatToEndOfStatement/
s/ParseExpression/parseExpression/
s/ParseParenExpression/parseParenExpression/
s/ParseAbsoluteExpression/parseAbsoluteExpression/
s/CheckForValidSection/checkForValidSection/

http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly

No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175675 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
4fb25b7d799ea27a2c98a4d9bcf7469cc685db47 15-Feb-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Adjust the EndLoc to account for the ']'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175312 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
3da67ca97383f8d305cc732019a51157f9fce290 18-Jan-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Make the error message more generic now that we support the
'SIZE' and 'LENGTH' operators.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
505bca3617fe310a5ff07914e3cf3ea6ae4d27ed 17-Jan-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add support for the 'SIZE' and 'LENGTH' operators.
Part of rdar://12576868


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172743 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
dd2e8950222ab74157b1c083ffa77b0fbaf1d210 14-Jan-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Extend support for parsing Intel bracketed memory operands that
have an arbitrary ordering of the base register, index register and displacement.
rdar://12527141


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172484 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
b789b949b60c9a28686e638f75b2640d16d7144e 11-Jan-2013 NAKAMURA Takumi <geek4civic@gmail.com> X86AsmParser.cpp: Fix up r172148, to add initializer in another CreateMem().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172157 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
7109fbe98260d7a574762f5b9920d3d8e99052e3 11-Jan-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Make sure we set a default value for AddressOf. Follow on to
r172121.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172148 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
c1ec207b615cb058d30dc642ee311ed06fe59cfe 10-Jan-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add support for calling functions from inline assembly.
Part of rdar://12991541

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172121 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
1ced208be9cab0f994c5df9000da36bc313b2507 09-Jan-2013 Eric Christopher <echristo@gmail.com> Last in the series of removing unnecessary '0' arguments for
address space. Reordered the EmitULEB128IntValue arguments to
make this easier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171949 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
3ebe59c892051375623fea55e977ff559fdb3323 07-Jan-2013 Jordan Rose <jordan_rose@apple.com> Change SMRange to be half-open (exclusive end) instead of closed (inclusive)

This is necessary not only for representing empty ranges, but for handling
multibyte characters in the input. (If the end pointer in a range refers to
a multibyte character, should it point to the beginning or the end of the
character in a char array?) Some of the code in the asm parsers was already
assuming this anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171765 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
6af228a92a7b8414fa3c1b3c37ee659d32e66e1b 20-Dec-2012 Roman Divacky <rdivacky@freebsd.org> Remove MCTargetAsmLexer and its derived classes now that edis,
its only user, is gone.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170699 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
d04a8d4b33ff316ca4cf961e06c9e312eff8e64f 03-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Use the new script to sort the includes of every file under lib.

Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.

Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
3ca6382120c16e30151e19175d40480ee72de641 14-Nov-2012 Jim Grosbach <grosbach@apple.com> X86: Better diagnostics for 32-bit vs. 64-bit mode mismatches.

When an instruction as written requires 32-bit mode and we're assembling
in 64-bit mode, or vice-versa, issue a more specific diagnostic about
what's wrong.

rdar://12700702

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167937 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
2fbc239e4fbdd12c24fb2cf9e3e915861fc12030 29-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add support for the [] operator. Essentially, [expr1][expr2] is
equivalent to [expr1 + expr2]. See test cases for more examples.
rdar://12470392

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166949 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
ddb53ef4a8aa526c293ff316c2134bf1629e6812 27-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166819 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
7ab21c7a05509714358ac26530f5427de63113df 26-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Emit an error for unsupported SIZE and LENGTH directives.
Part of rdar://12576868


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
efcb3d9c1cd9410949b4005fbe6f2817f8dfe395 26-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add support for the TYPE operator.
Part of rdar://12576868


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166790 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
6e43157b5d39a713d4061f97629bf9107c6d25e0 26-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Have the target AsmParser create the asmrewrite for the offsetof
operator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
ec13022c392747ef166e6be738fc6f00bd7c52d3 25-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Perform field lookups with the dot operator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
6a020a71173a3ea7738a9df69982e85ddbfe0303 25-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add support for creating AsmRewrites in the target specific
AsmParser logic. To be used/tested in a subsequent commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166714 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
5e6b37fa3d5f555b0aba7b2594f28b359a22ea31 25-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add error handling to the ParseIntelDotOperator() function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166698 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
22f441afbac90b2dc1e4315a7a6c50dd034af2db 25-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add support for parsing the '.' operator. Given,

[register].field

The operator returns the value at the location pointed to by register plus the
offset of field within its structure or union. This patch only handles
immediate fields (i.e., [eax].4). The original displacement has to be a
MCConstantExpr as well.
Part of rdar://12470415 and rdar://12470514



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
4284e1795dd47d9638bb4fbd455ddb7e2e710e80 25-Oct-2012 Chad Rosier <mcrosier@apple.com> Tidy up. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166630 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
c0a14b86f7ad334c2a557c1ee4fff12e8d396fd0 24-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Create a register operand, rather than a memory operand when we
see the offsetof operator. Previously, we were matching something like MOVrm
in the front-end and later matching MOVrr in the back-end. This change makes
things more consistent. It also fixes cases where we can't match against a
memory operand as the source (test cases coming).
Part of rdar://12470317



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166592 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
a6cf7a62a7adc45680597ae2630a268d8d548517 24-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Offset operator - the size should be based on the size of a
pointer, not the size of the variable.
Part of rdar://12470317



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
d4d96acb9117574510390af700ec0eca375f58f2 24-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Clean up comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166525 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
2a784131fed4bc99c0ae96b5252a3fe0079a3079 24-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] When parsing inline assembly we set the base register to a
non-zero value as we don't know the actual value at this point. This is
necessary to get the matching correct in some cases. However, the actual value
set as the base register doesn't matter, since we're just matching not emitting.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166523 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
5a719fcb5ea91ec4e7af6fc2e48ec31774a859dd 23-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add an implementation of the offset operator. This is a follow
on patch to r166433.
rdar://12470317

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166488 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
a703fb9e5e86ed29f7334736f7c085ec81a2006f 22-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add the isOffsetOf() function.
Part of rdar://12470317


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
65c88929e718f4fb0f57afb4c95b2e570759e99f 22-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add support for parsing the offset operator. Callback for
CodeGen in the front-end not implemented yet.
rdar://12470317


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
ab450e42f1ae00d221a86cd41361834dd2ab95bc 20-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Reset the opcode prior to parsing a statement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
96d58e64cfe88356f8be4ce622b829fbd9fb5908 19-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Have the TargetParser callback to Sema to determine the size of
a memory operand. Retain this information and then add the sizing directives
to the IR. This allows the backend to do proper instruction selection.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166316 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
127f5edfd98893d8910a9ae59b10696a824fed24 15-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] If we parsed a statement and the opcode is valid, then it's an instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165955 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
ce353b31ae327ad90dda4808814eba15cd662d35 15-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Update the end loc for ParseIntelMemOperand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165947 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
84125ca43c758fd21fdab2b05196e0df57c55c96 13-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Remove the MatchInstruction() function. Previously, this was
the interface between the front-end and the MC layer when parsing inline
assembly. Unfortunately, this is too deep into the parsing stack. Specifically,
we're unable to handle target-independent assembly (i.e., assembly directives,
labels, etc.). Note the MatchAndEmitInstruction() isn't the correct
abstraction either. I'll be exposing target-independent hooks shortly, so this
is really just a cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
7a2b624bb34374fe233f71cc5220d5ae0a0971cf 13-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Capitalize per coding standard.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165847 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
6e006d3de882784527d4d9cc92b1a91f6773505e 13-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Use the new API introduced in r165830 in lieu of the
MapAndConstraints vector. Also remove the unused Kind argument.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165833 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
9ba9d4d76bfa8de2b05cbce02a5a3ff7d46cb331 05-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add a few typedefs to simplify future changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165324 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
5b0f1b37639d57dec72972fe445880a8a99d8674 05-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add support for parsing [Intel dialect] memory operands that use
segmented registers. Test case to come.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165275 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
f9e008bf673a8eeb04766bfc99f51068608809d2 03-Oct-2012 Chad Rosier <mcrosier@apple.com> Revert 165057, per Jim's request. This requires further discussion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165069 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
95707c90ccb7309df76ea7f3f0b81495e4f7d0e6 02-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add basic support for wildcard MCParsedAsmOperands. This type
of operand is specific to MS-style inline assembly and should not be generated
when parsing normal assembly.

The purpose of the wildcard operands are to allow the AsmParser to match
multiple instructions (i.e., MCInsts) to a given ms-style asm statement. For
the time being the matcher just returns the first match. This patch only
implements wildcard matches for memory operands. Support for register
wildcards will be added in the near future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
22685876ed7231f32f7d1698c00acab22825b74c 02-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add the convertToMapAndConstraints() function that is used to
map constraints and MCInst operands to inline asm operands. This replaces the
getMCInstOperandNum() function.

The logic to determine the constraints are not in place, so we still default to
a register constraint (i.e., "r"). Also, we no longer build the MCInst but
rather return just the opcode to get the MCInstrDesc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164979 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
a3c3e1f8e2dc3572564426a420c293a271630c7b 25-Sep-2012 Bob Wilson <bob.wilson@apple.com> Consistently specify the assembly variant to MatchInstructionImpl.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
2590c2e1e9e2f2a7f28672c10c2df55566238dfa 25-Sep-2012 Chad Rosier <mcrosier@apple.com> Rather then have a wrapper function, have tblgen instantiate the implementation.
Also remove an unused argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
00796a1b15a83247e19c2445a6ff7a31e72299a4 24-Sep-2012 Chad Rosier <mcrosier@apple.com> Rather then have a wrapper function, have tblgen instantiate the implementation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
d717a066c6ddaff401b9259579b265eeafb83b6e 22-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Expose the mnemonicIsValid() function in the AsmParser.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164420 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
7d4e989da972c2e9c89dad2d4e8f6ff9e1c73394 21-Sep-2012 Chad Rosier <mcrosier@apple.com> Add comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164415 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
f58ae5dfc1c939e34e660a21b4ea7d192a37a322 12-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Make the operand size directives case insensitive.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163729 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
66b64bec6021e3f38af090429c7e41d1180df5a9 11-Sep-2012 Chad Rosier <mcrosier@apple.com> StringSwitchify.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163649 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
aa645f78a26ca3b6faaeffa515dab1960c0cbdb1 11-Sep-2012 Chad Rosier <mcrosier@apple.com> Simplify logic. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163648 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
3c4ecd7dab5567017ad573769b0af484479bac6f 10-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add support for .att_syntax directive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163542 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
8e70b5506ec0d7a6c2740bc89cd1b8f12a78b24f 07-Sep-2012 Benjamin Kramer <benny.kra@googlemail.com> PR13754: llvm-mc/x86 crashes on .cfi directives without the % prefix for registers.

gas accepts this and it seems to be common enough to be worth supporting. This
doesn't affect the parsing of reg operands outside of .cfi directives.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163390 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
5d637d7e93c1f6058c16b41b8ac7dd36c61b4a5c 05-Sep-2012 Chad Rosier <mcrosier@apple.com> Fix function name per coding standard.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163187 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
2cc97def7434345e399e4f5f3f2001d6d7a93c6f 03-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Asm operands can map to one or more MCOperands. Therefore, add
the NumMCOperands argument to the GetMCInstOperandNum() function that is set
to the number of MCOperands this asm operand mapped to.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163124 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
038f3e31276f8cc86d91d0e4513e1a3ddb8509ba 03-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add an interface to the GetMCInstOperandNum() function in the
MCTargetAsmParser class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163122 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
c4d2560a2010456f4eea0007eb71829d5668e7dd 03-Sep-2012 Chad Rosier <mcrosier@apple.com> Removed unused argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163104 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
3a86e1396230748f17a521915bc802939a787eac 03-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Expose the Kind and Opcode variables from the
MatchInstructionImpl() function.

These values are used by the ConvertToMCInst() function to index into the
ConversionTable. The values are also needed to call the GetMCInstOperandNum()
function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163101 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
5d04a560a875eef5cc7ae2bfadaf7d46ea8a60c5 31-Aug-2012 Chad Rosier <mcrosier@apple.com> The ConvertToMCInst() function can't fail, so remove the now dead Match_ConversionFail enum.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163002 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
4ee0808d9f1c7d64b0b304e610ce0fb496dd3279 29-Aug-2012 Chad Rosier <mcrosier@apple.com> Typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162807 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
674101e6bb3742ae743e21e9b9ebec5946b1d273 22-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Avoid a false positive assertion

Assertion failed: (Start.isValid() == End.isValid() && "Start and end should
either both be valid or both be invalid!")

when parsing inline asm. SMLoc assumes that the first char * in the source is
invalid. However, when parsing an inline asm the mnemonic is at this location.
I don't want to change SMLoc, so use a trivial workaround.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162381 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
b4fdadef51ed254d9282356463c6b11ff8a102df 21-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Do not report a Parser error when matching inline assembly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162306 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
64bfcbbc58ad485db157190496f0f39156b5a516 21-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Expose the ErrorInfo from the MatchInstructionImpl. In general,
this is the index of the operand that failed to match.

Note: This may cause a buildbot failure due to an API mismatch in clang. Should
recover with my next commit to clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162295 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
3246176838a47fa088b98772d4899063a9b7f731 10-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Extend the MC AsmParser API to match MCInsts (but not emit).
This new API will be used by clang to parse ms-style inline asms.

One goal of this project is to use this style of inline asm for targets other
then x86. Therefore, this API needs to be implemented for non-x86 targets at
some point in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161624 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
76bd9386f1e1487a49c7c34ff95078dea20e3154 18-Jul-2012 Craig Topper <craig.topper@gmail.com> Remove tab characters.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160425 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
833d7f85888c9f7f583eb9a09d1a135ee79ca643 18-Jul-2012 Craig Topper <craig.topper@gmail.com> Fix typo in error message and remove some tab characters.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160423 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
75dc33a60b65bbbf2253b0b916df1d36a4da4237 18-Jul-2012 Craig Topper <craig.topper@gmail.com> Make x86 asm parser to check for xmm vs ymm for index register in gather instructions. Also fix Intel syntax for gather instructions to use 'DWORD PTR' or 'QWORD PTR' to match gas.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160420 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
36b8fed61db8d772bf07ed828ff505ce15461bd7 28-Jun-2012 Chad Rosier <mcrosier@apple.com> Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
1f7a1b68a07ea6bdf521525a7928f4a8c5216713 26-Jun-2012 Manman Ren <mren@apple.com> X86: add GATHER intrinsics (AVX2) in LLVM

Support the following intrinsics:
llvm.x86.avx2.gather.d.pd, llvm.x86.avx2.gather.q.pd
llvm.x86.avx2.gather.d.pd.256, llvm.x86.avx2.gather.q.pd.256
llvm.x86.avx2.gather.d.ps, llvm.x86.avx2.gather.q.ps
llvm.x86.avx2.gather.d.ps.256, llvm.x86.avx2.gather.q.ps.256

Modified Disassembler to handle VSIB addressing mode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
9e6ddcb88ec40422c0ebd260567e2264ec424506 29-Mar-2012 Craig Topper <craig.topper@gmail.com> Only allow symbolic names for (v)cmpss/sd/ps/pd encodings 8-31 to be used with 'v' version of instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
4e02f23de24375294005f88b5254a3775d39fcb2 27-Mar-2012 Craig Topper <craig.topper@gmail.com> Prune some includes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153502 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
0f5ab7c5f392d8207a4b0c5bf1f8b274a9f410df 13-Mar-2012 Kevin Enderby <enderby@apple.com> Change the X86 assembler to not require a segment register on string
instruction's destination operand like it does for the source operand.
Also fix a typo in the comment for X86AsmParser::isSrcOp().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152654 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
84faf659125cb354794e457fa5a8a8daad84760d 12-Mar-2012 Kevin Enderby <enderby@apple.com> Added a missing error check for X86 assembly with mismatched base and index
registers not both being 64-bit or both being 32-bit registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152580 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
58dfaa14651f36fc9fce2031eb011e65ae267b9f 09-Mar-2012 Kevin Enderby <enderby@apple.com> Add the missing call to Error when a bad X86 scale expression is parsed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152443 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
b80d571ea85db5d52fafed0523cf59e693502198 23-Feb-2012 Kevin Enderby <enderby@apple.com> Updated the llvm-mc disassembler C API to support for the X86 target.
rdar://10873652

As part of this I updated the llvm-mc disassembler C API to always call the
SymbolLookUp call back even if there is no getOpInfo call back. If there is a
getOpInfo call back that is tried first and then if that gets no information
then the SymbolLookUp is called. I also made the code more robust by
memset(3)'ing to zero the LLVMOpInfo1 struct before then setting
SymbolicOp.Value before for the call to getOpInfo. And also don't use any
values from the LLVMOpInfo1 struct if getOpInfo returns 0. And also don't
use any of the ReferenceType or ReferenceName values from SymbolLookUp if it
returns NULL. rdar://10873563 and rdar://10873683

For the X86 target also fixed bugs so the annotations get printed.

Also fixed a few places in the ARM target that was not producing symbolic
operands for some instructions. rdar://10878166


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151267 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
b0934ab7d811e23bf530371976b8b35f3242169c 19-Feb-2012 Ahmed Charles <ace2001ac@gmail.com> Remove dead code. Improve llvm_unreachable text. Simplify some control flow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150918 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
0db58bfecea020ffcdfa1fc6458995371e1c3c50 31-Jan-2012 Devang Patel <dpatel@apple.com> Add assembler dialect attribute in asm parser which lets target specific asm parser change dialect on the fly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149396 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
885f65b4a1c1ec80cd800a0617c57a2289472165 30-Jan-2012 Devang Patel <dpatel@apple.com> Intel syntax. Adjust special code, used to recognize cmp<comparison code>{ss,sd,ps,pd}, for intel syntax.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149291 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
be3e310d5ed8717f070acc71b0f4dae28cb08c4d 30-Jan-2012 Devang Patel <dpatel@apple.com> Intel syntax. Support .intel_syntax directive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149270 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
a28101e61aa3aeed5baf3d5b91d0f8bcb4e9e12a 27-Jan-2012 Devang Patel <dpatel@apple.com> Intel Syntax: Parse mem operand with seg reg. QWORD PTR FS:[320]


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149142 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
cb5dca38157a48c734660746e7f7340d5db7c2db 27-Jan-2012 Jim Grosbach <grosbach@apple.com> Keep source location information for X86 MCFixup's.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149106 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
3b96e1fe3b695e6d845668ea90d75016f0f46a17 24-Jan-2012 Devang Patel <dpatel@apple.com> Intel Syntax: Extend special hand coded logic, to recognize special instructions, for intel syntax.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148864 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
392ad6d8aa5d1af7becbff4e01dd89dc44b7a00e 24-Jan-2012 Devang Patel <dpatel@apple.com> Fix typo.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148751 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
f2d213745e07e884c1616f2f3d0b78f9e918e5db 23-Jan-2012 Devang Patel <dpatel@apple.com> Intel syntax: Robustify parsing of memory operand's displacement experssion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
3e08131185d5b3245065eb027900aed56b607970 23-Jan-2012 Devang Patel <dpatel@apple.com> Intel syntax: Parse memory operand with empty base reg, e.g. DWORD PTR [4*RDI]


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
7c64fe651ad4581ac66b6407116144442a8a7f03 23-Jan-2012 Devang Patel <dpatel@apple.com> Intel syntax: Parse segment registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148712 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
8608cc9473198f5e3db40f2155cb4e0c4260aaab 21-Jan-2012 Benjamin Kramer <benny.kra@googlemail.com> Remove unused variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148635 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
1aea430b8834f7bed3a14eda5027eac2133d6496 20-Jan-2012 Devang Patel <dpatel@apple.com> Intel syntax: Robustify register parsing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148591 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
fdd3b30151bc391efce74f4592a9a3bb595565a2 20-Jan-2012 Devang Patel <dpatel@apple.com> Intel syntax: Parse ... PTR [-8]


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148570 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
a951f77ca31b43551bd41765504519d6d76e6cbf 19-Jan-2012 Devang Patel <dpatel@apple.com> Post process 'and', 'sub' instructions and select better encoding, if available.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148489 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
e60540f380cc9466f3b2f7d17adfd37db137689c 19-Jan-2012 Devang Patel <dpatel@apple.com> Intel syntax: There is no need to create unary expr for simple negative displacement.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148486 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
ac0f0486022fb1798579c9a550154e839770efa9 19-Jan-2012 Devang Patel <dpatel@apple.com> Post process 'xor', 'or' and 'cmp' instructions and select better encoding, if available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148485 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
b8ba13f0096b560ee618512019ca86969a9fa772 18-Jan-2012 Devang Patel <dpatel@apple.com> Process instructions after match to select alternative encoding which may be more desirable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
6220fea2a877e5cff559ed38e98c59a076ea9825 17-Jan-2012 Devang Patel <dpatel@apple.com> Intel syntax: Parse "BYTE PTR [RDX + RCX]"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
bc51e501a0cd3d2bea770d07fe39ea5e87726cb4 17-Jan-2012 Devang Patel <dpatel@apple.com> Untabify.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148322 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
9a3d293cf3f72b3c0ed5d4474fc5d4d12fd36be2 17-Jan-2012 Devang Patel <dpatel@apple.com> Intel syntax: Do not unncessarily create plus expression for memory operand displacement.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
d37ad247cc04c2a436e537767ac1aec709901594 17-Jan-2012 Devang Patel <dpatel@apple.com> Intel syntax: Robustify memory operand parsing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148312 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
85d5aaecd03ca4bc6e406ee88c72a4ba8878bb2b 13-Jan-2012 Devang Patel <dpatel@apple.com> Revert r148131, it was committed before it was ready.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148134 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
c798cc42831150f678b080c0994c1cc024bae653 13-Jan-2012 Devang Patel <dpatel@apple.com> Refactor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
dd929fc704054fa79cc1171354f95d91a5b62de2 12-Jan-2012 Devang Patel <dpatel@apple.com> Rename X86ATTAsmParser -> X86AsmParser

We are using one parser to parse att as well as intel style syntax.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148032 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
c59d9df2487accc82c2d128bba2aaf029c4a077d 12-Jan-2012 Devang Patel <dpatel@apple.com> Add predicate method check match memory operand size, if available.

In att style asm syntax memory operand size is derived from suffix attached with mnemonic. In intel style asm syntax it is part of memory operand hence predicate method check is required to select appropriate instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
0a338868b746f29d6d72fd95e425ec8696ed8024 12-Jan-2012 Devang Patel <dpatel@apple.com> Add intel style operand parser skeleton.
This is a work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148002 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
590853667345d6fb191764b9d0bd2ff13589e3a3 06-Nov-2011 Benjamin Kramer <benny.kra@googlemail.com> Replace (Lower|Upper)caseString in favor of StringRef's newest methods.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143891 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
5efabcf01d1c9cdf7ac59a17d757c6ad4cdb112c 16-Oct-2011 Benjamin Kramer <benny.kra@googlemail.com> Add AsmToken::getEndLoc and use it to add ranges to x86 asm register parsing.

<stdin>:1:12: error: register %rax is only available in 64-bit mode
incl %rax
^~~~

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
f82edaffb1a6d41bc89d86c69f53962e63621aad 16-Oct-2011 Benjamin Kramer <benny.kra@googlemail.com> X86AsmParser: Synthesize EndLoc for tokens out of StartLoc + Length and print ranges for invalid operands.

<stdin>:1:4: error: invalid instruction mnemonic 'abc'
abc incl %edi
^~~

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142135 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
d8b7aa26134d2abee777f745c32005e63dea2455 16-Oct-2011 Chris Lattner <sabre@nondot.org> Enhance llvm::SourceMgr to support diagnostic ranges, the same way clang does. Enhance
the X86 asmparser to produce ranges in the one case that was annoying me, for example:

test.s:10:15: error: invalid operand for instruction
movl 0(%rax), 0(%edx)
^~~~~~~

It should be straight-forward to enhance filecheck, tblgen, and/or the .ll parser to use
ranges where appropriate if someone is interested.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142106 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
3e74d6fdd248e20a280f1dff3da9a6c689c2c4c3 24-Aug-2011 Evan Cheng <evan.cheng@apple.com> Move TargetRegistry and TargetSelect from Target to Support where they belong.
These are strictly utilities for registering targets and components.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138450 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
19cb7f491fbc7cb5d0bbd10e201f9d5093e6d4e5 16-Aug-2011 Jim Grosbach <grosbach@apple.com> MCTargetAsmParser target match predicate support.

Allow a target assembly parser to do context sensitive constraint checking
on a potential instruction match. This will be used, for example, to handle
Thumb2 IT block parsing.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137675 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
5de728cfe1a922ac9b13546dca94526b2fa693b6 28-Jul-2011 Evan Cheng <evan.cheng@apple.com> Emit an error is asm parser parsed X86_64 only registers, e.g. %rax, %sil.
This can happen in cases where TableGen generated asm matcher cannot check
whether a register operand is in the right register class. e.g. mem operands.

rdar://8204588


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136292 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
c37d4bbf1f33c5e4b1c2f1bf1a6e2cae2ae5603a 28-Jul-2011 Kevin Enderby <enderby@apple.com> Fix llvm-mc handing of x86 instructions that take 8-bit unsigned immediates.

llvm-mc gives an "invalid operand" error for instructions that take an unsigned
immediate which have the high bit set such as:
pblendw $0xc5, %xmm2, %xmm1
llvm-mc treats all x86 immediates as signed values and range checks them.
A small number of x86 instructions use the imm8 field as a set of bits.
This change only changes those instructions and where the high bit is not
ignored. The others remain unchanged.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136287 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
bd27f5adbd8f3b8ab8def5aa43fbc406ac9b8cbe 27-Jul-2011 Evan Cheng <evan.cheng@apple.com> Support .code32 and .code64 in X86 assembler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136197 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
94b9550a32d189704a8eae55505edf62662c0534 26-Jul-2011 Evan Cheng <evan.cheng@apple.com> Rename TargetAsmParser to MCTargetAsmParser and TargetAsmLexer to MCTargetAsmLexer; rename createAsmLexer to createMCAsmLexer and createAsmParser to createMCAsmParser.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
a7cfc08ebe737062917b442830eb5321b0f79e89 23-Jul-2011 Evan Cheng <evan.cheng@apple.com> Move TargetAsmParser.h TargetAsmBackend.h and TargetAsmLexer.h to MC where they belong.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135833 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
c60f9b752381baa6c4b80c0739034660f1748c84 14-Jul-2011 Evan Cheng <evan.cheng@apple.com> Next round of MC refactoring. This patch factor MC table instantiations, MC
registeration and creation code into XXXMCDesc libraries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135184 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
b7f689bab98777236a2bf600f299d232d246bb61 13-Jul-2011 Jim Grosbach <grosbach@apple.com> Update MCParsedAsmOperand debug methods.

Update the debug output interface for MCParsedAsmOperand to have a print()
method which takes an output stream argument, an << operator which invokes
the print method using the given stream, and a dump() method which prints
the operand to the dbgs() stream. This makes the interface more consistent
with the rest of LLVM, and more convenient to use at the debugger command
line.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135043 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
59ee62d2418df8db499eca1ae17f5900dc2dcbba 11-Jul-2011 Evan Cheng <evan.cheng@apple.com> - Eliminate MCCodeEmitter's dependency on TargetMachine. It now uses MCInstrInfo
and MCSubtargetInfo.
- Added methods to update subtarget features (used when targets automatically
detect subtarget features or switch modes).
- Teach X86Subtarget to update MCSubtargetInfo features bits since the
MCSubtargetInfo layer can be shared with other modules.
- These fixes .code 16 / .code 32 support since mode switch is updated in
MCSubtargetInfo so MC code emitter can do the right thing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134884 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
ffc0e73046f737d75e0a62b3a83ef19bcef111e3 09-Jul-2011 Evan Cheng <evan.cheng@apple.com> Change createAsmParser to take a MCSubtargetInfo instead of triple,
CPU, and feature string. Parsing some asm directives can change
subtarget state (e.g. .code 16) and it must be reflected in other
modules (e.g. MCCodeEmitter). That is, the MCSubtargetInfo instance
must be shared.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
75ca4b94bd9dcd3952fdc237429342a2154ba142 08-Jul-2011 Benjamin Kramer <benny.kra@googlemail.com> Plug a leak by giving the AsmParser ownership of the MCSubtargetInfo.

Found by valgrind.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134738 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
480cee5d4396a380ada6ffd03551b5700d041fe0 08-Jul-2011 Evan Cheng <evan.cheng@apple.com> TargetAsmParser doesn't need reference to Target.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
ebdeeab812beec0385b445f3d4c41a114e0d972f 08-Jul-2011 Evan Cheng <evan.cheng@apple.com> Eliminate asm parser's dependency on TargetMachine:
- Each target asm parser now creates its own MCSubtatgetInfo (if needed).
- Changed AssemblerPredicate to take subtarget features which tablegen uses
to generate asm matcher subtarget feature queries. e.g.
"ModeThumb,FeatureThumb2" is translated to
"(Bits & ModeThumb) != 0 && (Bits & FeatureThumb2) != 0".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134678 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
af45b3d8cb1b88d3cf775542996d78d8ce009274 05-Jul-2011 Eli Friedman <eli.friedman@gmail.com> Add assembler/disassembler support for non-AVX pclmulqdq. While I'm here, use proper aliases for the pclmullqlqdq and friends. PR10269.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134424 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
15f895179953b258e4ca20860d0d58f25f3a3edb 09-Apr-2011 Chris Lattner <sabre@nondot.org> fix rdar://8735979 - "int 3" doesn't match to "int3". Unfortunately,
InstAlias doesn't allow matching immediate operands, so we have to write
C++ code to do this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
96622aa063435b1de085489f0e3e49b5912c22da 18-Mar-2011 Joerg Sonnenberger <joerg@bec.de> Support explicit argument forms for the X86 string instructions.
For now, only the default segments are supported.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
00743c2218ff3f0f4edce972e2d88893a19e6ef8 22-Feb-2011 Joerg Sonnenberger <joerg@bec.de> Use the same (%dx) hack for in[bwl] as for out[bwl].


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
b412915ff6229b3e2dffedcfb0f3fb7e85259841 04-Feb-2011 Daniel Dunbar <daniel@zuster.org> MC/AsmParser: Add support for allowing the conversion process to fail (via
custom conversion functions).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
bf7553210ae44f05e7460edeae1ee499d8a22dcb 27-Jan-2011 Roman Divacky <rdivacky@freebsd.org> Introduce virtual ParseRegister method in TargetAsmParser.
Create override of this method in X86/ARM/MBlaze.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124378 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
76331754d4a06e2394c15ae8f4870f4aeaf5ca1f 09-Dec-2010 Kevin Enderby <enderby@apple.com> Allow a slash, '/', as a prefix separator for X86. rdar://8741045


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121320 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
d8f717911dcdccb1a60b3049ea22c7767970dcb7 28-Nov-2010 Chris Lattner <sabre@nondot.org> fix PR8686, accepting a 'b' suffix at the end of all the setcc
instructions. I choose to handle this with an asmparser hack,
though it could be handled by changing all the instruction definitions
to allow be "setneb" instead of "setne". The asm parser hack is
better in this case, because we want the disassembler to produce
setne, not setneb.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120260 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
bfd2d26159c87262fcf462ea442f99478a2093c9 27-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Implement the data16 prefix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
beb6898df8f96ccea4ae147587479b507bb3e491 23-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Implement the rex64 prefix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120017 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
c146c4d47a7ec54c14e730c30bea821c34dc4c48 18-Nov-2010 Chris Lattner <sabre@nondot.org> trivial QoI improvement. On this invalid input:
sahf movl 344(%rdi),%r14d
we used to produce:

t.s:2:1: error: unexpected token in argument list

^

we now produce:
t.s:1:11: error: unexpected token in argument list
sahf movl 344(%rdi),%r14d
^

rdar://8581401


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
d5b2f1aa8ce09624b0d0fd133e6cf0829dea57c8 06-Nov-2010 Chris Lattner <sabre@nondot.org> move the "sh[lr]d op,op" -> "shld $1, op,op" aliases to the .td file.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118361 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
8c24b0c6996a8f03ff32766f0695dcf19577af59 06-Nov-2010 Chris Lattner <sabre@nondot.org> rework the rotate-by-1 instructions to be defined like the
shift-by-1 instructions, where the asmstring doesn't contain
the implicit 1. It turns out that a bunch of these rotate
instructions were completely broken because they used 1
instead of $1.

This fixes assembly mismatches on "rclb $1, %bl" and friends,
where we used to generate the 3 byte form, we now generate the
proper 2-byte form.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
3af0e7d5cdb21ac8cc3dfbb26ce1078da7a7a6f5 06-Nov-2010 Chris Lattner <sabre@nondot.org> move the plethora of fp stack aliases to the .td file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118353 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
90fd797dc739319347861d4f3984bc8952ae9a29 06-Nov-2010 Chris Lattner <sabre@nondot.org> add (and document) the ability for alias results to have
fixed physical registers. Start moving fp comparison
aliases to the .td file (which default to using %st1 if
nothing is specified).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118352 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
98c870f87b7f0c996a9ba67003d88d434d6dbcd0 06-Nov-2010 Chris Lattner <sabre@nondot.org> generalize alias support to allow the result of an alias to
add fixed immediate values. Move the aad and aam aliases to
use this, and document it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118350 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
dea546b62339578938a91f05a00a145baf921f6c 06-Nov-2010 Chris Lattner <sabre@nondot.org> move fnstsw aliases to .td file, fix typo


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
7e925cc3c92b489709fb1fa501fb6270344a4628 06-Nov-2010 Chris Lattner <sabre@nondot.org> move in/out aliases to the .td files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118348 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
9c1dbc69d76d1df8d83ea62f6b44514b33627f6d 06-Nov-2010 Chris Lattner <sabre@nondot.org> move sldt, imul, and movabsq aliases from c++ to .td file.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
fb7000fcbde3b5257ac055e1e5abdee5df21842b 06-Nov-2010 Chris Lattner <sabre@nondot.org> correct suffix matching to search for s/l/t suffixes on
floating point stack instructions instead of looking for b/w/l/q.

This fixes issues where we'd accidentally match fistp to fistpl,
when it is in fact an ambiguous instruction.

This changes the behavior of llvm-mc to reject fstp, which was the
correct fix for rdar://8456389:
t.s:1:1: error: ambiguous instructions require an explicit suffix (could be 'fstps', 'fstpl', or 'fstpt')
fstp (%rax)

it also causes us to correctly reject fistp and fist, which addresses
PR8528:

t.s:2:1: error: ambiguous instructions require an explicit suffix (could be 'fistps', or 'fistpl')
fistp (%rax)
^
t.s:3:1: error: ambiguous instructions require an explicit suffix (could be 'fists', or 'fistl')
fist (%rax)
^

Thanks to Ismail Donmez for tracking down the issue here!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
5bde7345980587284bda6d42a68cdb151fbf5d6b 06-Nov-2010 Chris Lattner <sabre@nondot.org> fix a bug where we had an implicit assumption that the
result instruction operand numbering matched the result pattern.

Fixing this allows us to move the xchg/test aliases to the .td file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
8caa290a77cc6e71457fcc6b6bfac907510dc0f4 06-Nov-2010 Chris Lattner <sabre@nondot.org> move the lcall/ljmp aliases to the .td file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118332 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
02ff6ba6f6bb804d01ff5354176486355b5e2676 06-Nov-2010 Chris Lattner <sabre@nondot.org> move the "movsd -> movsl" alias to the .td files,
tidy up the movsx and movzx aliases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
414098571b19fc248fda2be194082cfd012d2729 06-Nov-2010 Chris Lattner <sabre@nondot.org> fix some bugs in the alias support, unblocking changing of "clr" aliases
from c++ hacks to proper .td InstAlias definitions. Change them!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
99f535242c71d795c11bf54aa6d30ddbed465e9a 01-Nov-2010 Chris Lattner <sabre@nondot.org> use our fancy new MnemonicAlias mechanism to remove a bunch of hacks
from X86AsmParser.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
b501d4f673c0db267a76800339f9943f2ce6fe33 01-Nov-2010 Chris Lattner <sabre@nondot.org> Implement enough of the missing instalias support to get
aliases installed and working. They now work when the
matched pattern and the result instruction have exactly
the same operand list.

This is now enough for us to define proper aliases for
movzx and movsx, implementing rdar://8017633 and PR7459.

Note that we do not accept instructions like:
movzx 0(%rsp), %rsi

GAS accepts this instruction, but it doesn't make any
sense because we don't know the size of the memory
operand. It could be 8/16/32 bits.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117901 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
693173feefaa326fad0e386470846fb3199ba381 30-Oct-2010 Chris Lattner <sabre@nondot.org> Implement (and document!) support for MnemonicAlias's to have Requires
directives, allowing things like this:

def : MnemonicAlias<"pop", "popl">, Requires<[In32BitMode]>;
def : MnemonicAlias<"pop", "popq">, Requires<[In64BitMode]>;

Move the rest of the X86 MnemonicAliases over to the .td file.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117830 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
a47b265b1a63cacec50b3936cb1477e9a6810376 30-Oct-2010 Chris Lattner <sabre@nondot.org> really zap alias.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117824 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
b3c417845d88bef2128fa30f472f6ef3121786b4 30-Oct-2010 Chris Lattner <sabre@nondot.org> move fcompi alias to .td file and zap some useless code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117823 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
6f96b0899bd1c28de33ae15b52a0d6b34d9ceca5 30-Oct-2010 Chris Lattner <sabre@nondot.org> move rep aliases to td file


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117822 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
a17a9a00dcd57f8352803e9b8e827d23192494cb 30-Oct-2010 Chris Lattner <sabre@nondot.org> move sal aliases to .td file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
1a1ecc9f3c2684249bd765d1299302d629aaf4fe 30-Oct-2010 Chris Lattner <sabre@nondot.org> fix an encoding mismatch where "sal %eax, 1" was not using the short encoding
for shl. Caught by inspection.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117820 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
8b260a76445762f109cc8cf6577435c4cc59e3aa 30-Oct-2010 Chris Lattner <sabre@nondot.org> move a bunch more aliases from .cpp -> .td file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117819 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
8cb441c9e0acb8b2c68229a783785fc9c3942ec8 30-Oct-2010 Chris Lattner <sabre@nondot.org> move cmov aliases to .td file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117818 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
b69fc28e927444e053f0d446150fc606712dfc72 30-Oct-2010 Chris Lattner <sabre@nondot.org> move setcc and jcc aliases from .cpp to .td


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
537ca844dde9e6e843ada298fe8e9bac48a2c92e 30-Oct-2010 Chris Lattner <sabre@nondot.org> move some code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
674c1dcca21f5edf9f7380902971fc5471c0bd4a 30-Oct-2010 Chris Lattner <sabre@nondot.org> implement (and document!) the first kind of MC assembler alias, which
just remaps one mnemonic to another. Convert a few of the X86 aliases
from .cpp to .td code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117815 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
9a82e7027549bfc8655b090b37e709baa3cd3240 30-Oct-2010 Chris Lattner <sabre@nondot.org> stay out of the reserved namespace


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
e460890351ed36fa518960a417d85964c2b29eee 27-Oct-2010 Kevin Enderby <enderby@apple.com> Yet another tweak to X86 instructions to add ud2a as an alias to ud2
(still to add ud2b).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117435 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
5a378076a44ef3f507b91aa8e7715fabaec42074 27-Oct-2010 Kevin Enderby <enderby@apple.com> Another tweak to X86 instructions to add the missing flex instruction (without
the wait prefix).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
f4630ecc3f2b80440b2d9e59add56a3b422de684 27-Oct-2010 Kevin Enderby <enderby@apple.com> Tweaks to X86 instructions to allow the 'w' suffix in places it makes
sense, when the instruction takes the 16-bit ax register or m16 memory
location. These changes to llvm-mc matches what the darwin assembler
allows for these instructions. Done differently than in r117031 that
caused a valgrind error which was later reverted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
41e8cc73cf570754fffdc6963321c153a8010458 27-Oct-2010 Kevin Enderby <enderby@apple.com> Added some aliases to the fcomip and fucompi Intel instructions. So that llvm-mc
will accept versions that the darwin assembler allows. Forms ending in "pi" and
forms without all the operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117427 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
0966ec08610c02c8556105f2fff88a7e7247a549 22-Oct-2010 Andrew Trick <atrick@apple.com> Reverting r117031 to cleanup valgrind errors.
It doesn't look like anything is wrong with the checkin,
but the new test cases expose a mem bug in AsmParser.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
0b9325c97d031ab0e9a240d69a2be11ec1559e37 21-Oct-2010 Kevin Enderby <enderby@apple.com> More tweaks to X86 instructions to allow the 'w' suffix in places it makes
sense, when the instruction takes the 16-bit ax register or m16 memory
location. These changes to llvm-mc matches what the darwin assembler allows
for these instructions. Also added the missing flex (without the wait prefix)
and ud2a as an alias to ud2 (still to add ud2b).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117031 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
87f4a1a4331e40cbba28e829561759d146273840 19-Oct-2010 Kevin Enderby <enderby@apple.com> Added a few tweaks to the Intel Descriptor-table support instructions to allow
word forms and suffixed versions to match the darwin assembler in 32-bit and
64-bit modes. This is again for use just with assembly source for llvm-mc .


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
7aef62ff8c72506cc9b77333d25f4aa8aa9cf9fe 18-Oct-2010 Kevin Enderby <enderby@apple.com> Added a handful of x86-32 instructions that were missing so that llvm-mc would
be more complete. These are only expected to be used by llvm-mc with assembly
source so there is no pattern, [], in the .td files. Most are being added to
X86InstrInfo.td as Chris suggested and only comments about register uses are
added. Suggestions welcome on the .td changes as I'm not sure on every detail
of the x86 records. More missing instructions will be coming.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116716 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
c0c8df3cea0dde2069edd10313a958508f99ec85 09-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> Fix Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116149 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
508fc4708bb859391af8969614e67c84ab56c38c 05-Oct-2010 Chris Lattner <sabre@nondot.org> Replace a gross hack (the MOV64ri_alt instruction) with a slightly less
gross hack (having the asmmatcher handle the alias).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115685 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
b0f96facd6e6637cb71bbeaf2f4e006f0b6348e3 01-Oct-2010 Benjamin Kramer <benny.kra@googlemail.com> Delete token *after* reading from it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115311 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
905f2e06691672c236ae864faf0ad7220afc2844 30-Sep-2010 Chris Lattner <sabre@nondot.org> preemptively add the rest of the non-n fpstack instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115168 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
9ee4aed3b652ea4a4327af2cb1c614dd10cd8b47 30-Sep-2010 Chris Lattner <sabre@nondot.org> implement support for finit, PR8258


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115156 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
0bb83a84d4319030c0c9260dbfea461c40eea1b2 30-Sep-2010 Chris Lattner <sabre@nondot.org> add support for fstcw, PR8259


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115154 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
a25f933396b8408ad89218bc60b0a93f130a3ea9 29-Sep-2010 Chris Lattner <sabre@nondot.org> implement rdar://8491845 - Gas supports commuted forms of non-commutable instructions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
7c51a3172cf5104ebeaef22f1366fa634ca00d85 29-Sep-2010 Chris Lattner <sabre@nondot.org> implement rdar://8456378 and PR7557 - support for the fstsw,
an instruction that requires a WHOLE NEW wonderful kind of alias.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115015 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
7036f8be4df8a1a830ca01afe9497b035a5647d6 29-Sep-2010 Chris Lattner <sabre@nondot.org> change the protocol TargetAsmPArser::MatchInstruction method to take an
MCStreamer to emit into instead of an MCInst to fill in. This allows the
matcher extra flexibility and is more convenient.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115014 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
295646274276c6814d970bed86d3b4ff76ba3ee3 27-Sep-2010 Chris Lattner <sabre@nondot.org> yet more aliases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114822 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
b1162fc05e09c7247be1896fd4aa4ca7e76c938c 27-Sep-2010 Chris Lattner <sabre@nondot.org> add a couple more aliases, rdar://8456378


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
df967d613704d4e4f01ecce85c1846dfab4d9a1b 27-Sep-2010 Chris Lattner <sabre@nondot.org> fix rdar://8470918 - llvm-mc can't assemble smovl


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114819 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
cb296ec0b689ccbcb08cedc5d3e090c0471eb393 27-Sep-2010 Chris Lattner <sabre@nondot.org> Fix rdar://8468087 - llvm-mc commutes fmul (and friend) operands.

My previous fix for rdar://8456371 should only apply to fmulp/faddp,
not to fmul/fadd. Instruction set orthogonality is overrated or
something.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114818 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
fd8fddd830ad8322d04161f2f6bad6269a451ab2 27-Sep-2010 Chris Lattner <sabre@nondot.org> implement support for 'clr' alias. This is part of rdar://8416805,
but balrog was wanting it on irc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114809 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
2c5291b56358bf239bdfc675ed681c2da3eb4901 22-Sep-2010 Chris Lattner <sabre@nondot.org> fix rdar://8456371 - Handle commutable instructions written backward.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
1eb1b68e3a5241591bfa18d4beb0e0cf13a48ef2 22-Sep-2010 Chris Lattner <sabre@nondot.org> Fix an inconsistency in the x86 backend that led it to reject "calll foo" on
x86-32: 32-bit calls were named "call" not "calll". 64-bit calls were correctly
named "callq", so this only impacted x86-32.

This fixes rdar://8456370 - llvm-mc rejects 'calll'

This also exposes that mingw/64 is generating a 32-bit call instead of a 64-bit call,
I will file a bugzilla.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
c2b942acf6008ac822c21722ac7ec84264d10bef 22-Sep-2010 Chris Lattner <sabre@nondot.org> add the missing aliases for fp stack cmovs, rdar://8456391


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114531 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
33d60d5e56bbf3e9ed02bc916735419091736ca3 22-Sep-2010 Chris Lattner <sabre@nondot.org> Fix rdar://8456364 - llvm-mc rejects '%CS'


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114528 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
0c289c140ee7a68e3d06b9d8ae6060758345ad4e 22-Sep-2010 Chris Lattner <sabre@nondot.org> fix rdar://8456389 - llvm-mc mismatch with 'as' on 'fstp'

-This line, and those below, will be ignored--

M test/MC/AsmParser/X86/x86_instructions.s
M lib/Target/X86/AsmParser/X86AsmParser.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114527 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
61129252e44067ae112dc856c64c814344b7e7c9 22-Sep-2010 Chris Lattner <sabre@nondot.org> fix rdar://8456361 - llvm-mc rejects 'rep movsd'


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
35aa94b229d516b9eb775ad4e13a8e2d03221cf9 16-Sep-2010 Chris Lattner <sabre@nondot.org> fix rdar://8438816 - unrecognized 'fildq' instruction


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114116 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
d0bcc9a01590c60adb4d288691120c46a49a2288 15-Sep-2010 Chris Lattner <sabre@nondot.org> lcall and ljmp always default to lcalll and ljmpl. This finally
wraps up r8418316


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113949 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
cbb442640fdefae48edca2b4c60555a68352b553 15-Sep-2010 Chris Lattner <sabre@nondot.org> apparently jmpl $1,$2 is an alias for ljmpl, similiarly
for call. Add this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
250b948f21b2910c5bc61fb364c6817727a3a972 15-Sep-2010 Chris Lattner <sabre@nondot.org> Disambiguate lcall/ljmp to the 32-bit version. This happens
even in 64-bit mode apparently.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
cfad564043021c7276ce19725f43bcde233fa549 15-Sep-2010 Chris Lattner <sabre@nondot.org> implement aliases for shld/shrd, part of rdar://8418316


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113937 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
e9e16a36d9ff355dab60e4b95673bf7a0cd27e86 15-Sep-2010 Chris Lattner <sabre@nondot.org> fix rdar://8431880 - rcl/rcr with no shift amount not recognized


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
84f362d8912657bb21250a65331f797d5381e9a3 15-Sep-2010 Chris Lattner <sabre@nondot.org> add various broken forms of fnstsw. I didn't add the %rax
version because it adds a prefix and makes even less sense
than the other broken forms. This wraps up rdar://8431422


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113932 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
8f777a205e4523b773ba3af3bad007d93da56a9a 15-Sep-2010 Chris Lattner <sabre@nondot.org> add some aliases for f[u]comi, part of rdar://8431422


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
2d592d10a57887ebe7c43a5e610f4278dd6c5d20 15-Sep-2010 Chris Lattner <sabre@nondot.org> add a bunch of aliases for fp operations with no operand,
rdar://8431422


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113929 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
f884012c93578912556de6ab89ecebab79b4ee31 15-Sep-2010 Chris Lattner <sabre@nondot.org> Diagnose invalid instructions like "incl" with "too few operands for instruction"
instead of crashing. This fixes:
rdar://8431815 - crash when invalid operand is one that isn't present


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113921 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
ef63c9a9b6f79fef91dc144db9d5f217d2b83a95 15-Sep-2010 Chris Lattner <sabre@nondot.org> add a terrible hack to allow out with dx is parens, a gas bug.
This fixes PR8114


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113894 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
0989d29d093c281a0d8b4f1b1ea22436249c4087 11-Sep-2010 Chris Lattner <sabre@nondot.org> add a missed cmov alias, part of rdar://8416805


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113693 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
697d37a43625b8862a6d6993c6c5ee614fdc0843 11-Sep-2010 Chris Lattner <sabre@nondot.org> add support for all the setCC aliases. Part of rdar://8416805


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113692 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
dfa3c9d98260f899297c11cda2b15dc44fc4f91e 11-Sep-2010 Chris Lattner <sabre@nondot.org> add support for pushfd/popfd which are aliases for pushfl/popfl.
This fixes rdar://8408129 - pushfd and popfd get invalid instruction mnemonic errors


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113690 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
ee211d0ed632d6329922ad4c5f7a25d3d66cf551 11-Sep-2010 Chris Lattner <sabre@nondot.org> implement rdar://8407928 - support for in/out with a missing "a" register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113689 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
cbf8a98c7c652e96967623c80cb945fef001b090 11-Sep-2010 Chris Lattner <sabre@nondot.org> fix the asmparser so that the target is responsible for skipping to
the end of the line on a parser error, allowing skipping to happen
for syntactic errors but not for semantic errors. Before we would
miss emitting a diagnostic about the second line, because we skipped
it due to the semantic error on the first line:

foo %eax
bar %al

This fixes rdar://8414033 - llvm-mc ignores lines after an invalid instruction mnemonic errors


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113688 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
90b54547d9fcc381f8ec92c32756ad4da43ed9aa 09-Sep-2010 Chris Lattner <sabre@nondot.org> fix rdar://8407548, I missed the commuted form of xchg/test without a suffix.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113427 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
373c458850a963ab062046529337fe976e1f944d 09-Sep-2010 Chris Lattner <sabre@nondot.org> fix bugs in push/pop segment support, rdar://8407242


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
c8ae35a8e8a6a39ae05b1c876afbf404e20961ff 08-Sep-2010 Chris Lattner <sabre@nondot.org> add support for the commuted form of the test instruction, rdar://8018260.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113352 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
ba8e81cca281a92fe30c25a10d8990521128be39 08-Sep-2010 Chris Lattner <sabre@nondot.org> implement proper support for sysret{,l,q}, rdar://8403907


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113350 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
ba8cea450f330145cc7764e23e5d8b1aadd5e131 08-Sep-2010 Chris Lattner <sabre@nondot.org> implement the iret suite of instructions properly,
fixing rdar://8403974



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
2544f426927aa6dbac8d52bd9d5e12629099da82 08-Sep-2010 Chris Lattner <sabre@nondot.org> add support for instruction prefixes on the same line as the instruction,
implementing rdar://8033482 and PR7254.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113348 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
34e53140c2cc02ce4c9d060e48302576d3962e1c 08-Sep-2010 Chris Lattner <sabre@nondot.org> change the MC "ParseInstruction" interface to make it the
implementation's job to check for and lex the EndOfStatement
marker.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
9607c40601b345c21af9de97ec03e124179efd24 08-Sep-2010 Chris Lattner <sabre@nondot.org> gas accepts xchg <mem>, <reg> as a synonym for xchg <reg>, <mem>.
Add this to the mc assembler, fixing PR8061


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
a247685b3013b3dc675d4e83f9c98de6473af1d7 08-Sep-2010 Chris Lattner <sabre@nondot.org> fix the encoding of the "jump on *cx" family of instructions,
rdar://8061602


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113343 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
aceeb3a4e2165e94624c3e5e2e7c93e325e951dd 07-Sep-2010 Benjamin Kramer <benny.kra@googlemail.com> Don't leak the old operand when transforming "sldt" into "sldtw".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
e9e0fc5eed9e177c3ee7299a34e640973102ac39 07-Sep-2010 Chris Lattner <sabre@nondot.org> add missing cmov aliases, this resolves rdar://8208499


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113189 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
7d284de955a6a525da556bc85ed7a4ea66c24c2d 07-Sep-2010 Chris Lattner <sabre@nondot.org> remove duplicated entry


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
c5cebeb3cb44a3fd0aaee956431159757ee47914 07-Sep-2010 Chris Lattner <sabre@nondot.org> "sldt <mem>" is ambiguous in 64-bit mode, but should
always be disambiguated as sldtw. sldtw and sldtq with
a mem operands have the same effect, but sldtw is more
compact. Force it to sldtw, resolving rdar://8017530


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113186 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
d68c474ec55a3dd43f9fa8ea4c89e5fae62909ab 07-Sep-2010 Chris Lattner <sabre@nondot.org> fix rdar://8017621 - llvm-mc can't guess encoding for "push $(1000)"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113184 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
ce4a3355d96971e7edcbff3c1975f83e1ddcb8f2 07-Sep-2010 Chris Lattner <sabre@nondot.org> in the case where an instruction only has one implementation
of a mneumonic, report operand errors with better location
info. For example, we now report:

t.s:6:14: error: invalid operand for instruction
cwtl $1
^

but we fail for common cases like:

t.s:11:4: error: invalid operand for instruction
addl $1, $1
^

because we don't know if this is supposed to be the reg/imm or imm/reg
form.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
a008e8ac73cb3cf2eaf006fbb1b62905c8626758 06-Sep-2010 Chris Lattner <sabre@nondot.org> Now that we know if we had a total fail on the instruction mnemonic,
give a more detailed error. Before:

t.s:11:4: error: unrecognized instruction
addl $1, $1
^
t.s:12:4: error: unrecognized instruction
f2efqefa $1
^

After:

t.s:11:4: error: invalid operand for instruction
addl $1, $1
^
t.s:12:4: error: invalid instruction mnemonic 'f2efqefa'
f2efqefa $1
^

This fixes rdar://8017912 - llvm-mc says "unrecognized instruction" when it means "invalid operands"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113176 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
69c7249a6f628db393aaa426c9595dccd4a1d87b 06-Sep-2010 Chris Lattner <sabre@nondot.org> simplify the hacks around jrcxz.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113167 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
ec6789f4f97ca1701c163132b6e3388366463090 06-Sep-2010 Chris Lattner <sabre@nondot.org> have tblgen detect when an instruction would have matched, but
failed because a subtarget feature was not enabled. Use this to
remove a bunch of hacks from the X86AsmParser for rejecting things
like popfl in 64-bit mode. Previously these hacks weren't needed,
but were important to get a message better than "invalid instruction"
when used in the wrong mode.

This also fixes bugs where pushal would not be rejected correctly in
32-bit mode (just pusha).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113166 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
79ed3f77e8b87615b80054ca6e4e3ba5e07445bd 06-Sep-2010 Chris Lattner <sabre@nondot.org> change MatchInstructionImpl to return an enum instead of bool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113165 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
0692ee676f8cdad25ad09a868bf597af4115c9d9 06-Sep-2010 Chris Lattner <sabre@nondot.org> have AsmMatcherEmitter.cpp produce the hunk of code that gets included
into the middle of the class, and rework how the different sections of
the generated file are conditionally included for simplicity.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
47ab90bfa8544bc96a02443a7c430200a880bd2b 06-Sep-2010 Chris Lattner <sabre@nondot.org> random cleanups


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113157 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
fba88d49e3fbb68bb84c295a9639fe94f9a8c6aa 24-Aug-2010 Daniel Dunbar <daniel@zuster.org> MC/X86: Tweak imul recognition, previous hack only applies for the imul form
taking immediates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111950 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
ae528f65ba731e2e080822496ef36db950ffe1c1 24-Aug-2010 Daniel Dunbar <daniel@zuster.org> MC/X86: Add custom hack for recognizing "imul $12, %eax" and friends.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111947 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
ee9102587e7f6fc95de9fc5731b341eeb9bfc3ca 24-Aug-2010 Daniel Dunbar <daniel@zuster.org> MC/X86: Warn on scale factors > 1 without index register, instead of erroring,
for 'as' compatibility.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
0d857cf8d1eaa3268c0118c124b6fe77c39d1482 18-Aug-2010 Chris Lattner <sabre@nondot.org> remove some code that is dead now that lea's are modeled with segment registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111343 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
09062b1672d33c40c38de3ff3163e0d53ebe165d 12-Aug-2010 Daniel Dunbar <daniel@zuster.org> MC/X86/AsmParser: Give an explicit error message when we reject an instruction
because it could have an ambiguous suffix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
f1e29d4c21d15f9e1e3a64f3b92b1aa9908e4f63 12-Aug-2010 Daniel Dunbar <daniel@zuster.org> MC/AsmParser: Push the burdon of emitting diagnostics about unmatched
instructions onto the target specific parser, which can do a better job.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110889 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
b3cb6967949493a2e1b10d015ac08b746736764e 11-Aug-2010 Daniel Dunbar <daniel@zuster.org> MCAsmParser: Add dump() hook to MCParsedAsmOperand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110790 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
3c8e1bee6399e829eda801a32158c1f52d2733ad 24-Jul-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Support x86 "eiz" and "riz" pseudo index registers in the assembler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109295 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
f64a7d49a0cdc8587f5b79bb2ac7be5fe56c1746 24-Jul-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Remove trailing whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109276 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
f528d2b438b5c8fd3e2609be981e500576f5e5af 23-Jul-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Add AVX version of CLMUL instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109248 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
90b374cdedf0ff844b86b768b2d0832c64ab9173 19-Jul-2010 Daniel Dunbar <daniel@zuster.org> MC/X86: We now match instructions like "incl %eax" correctly for the arch we are
assembling; remove crufty custom cleanup code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
54074b5f04f5affc77b5c6f3e5d8062b50384831 19-Jul-2010 Daniel Dunbar <daniel@zuster.org> TblGen/AsmMatcher: Add support for honoring instruction Requires<[]> attributes as part of the matcher.
- Currently includes a hack to limit ourselves to "In32BitMode" and "In64BitMode", because we don't have the other infrastructure to properly deal with setting SSE, etc. features on X86.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
d73ada7d24832bc2a4c3965b8f00ffd951341acf 19-Jul-2010 Daniel Dunbar <daniel@zuster.org> Target: Give the TargetAsmParser access to the TargetMachine.
- Unfortunate, but necessary for now to handle subtarget instruction matching. Eventually we should factor out the lower level target machine information so we don't need to do this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108664 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
38e59891ee4417a9be2f8146ce0ba3269e38ac21 15-Jul-2010 Benjamin Kramer <benny.kra@googlemail.com> Don't pass StringRef by reference.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
52a18aedaebbd87931c6705165e62986700a49d6 13-Jul-2010 Kevin Enderby <enderby@apple.com> Added a check that pusha cannot be encoded in 64-bit mode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
cc69e13a36b2238d8e0a2fc01463d16943c08936 08-Jul-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Add more assembly opcodes for SSE compare instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107823 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
645b209c4af53c0d21292df3d506cf79d4e3ec11 24-Jun-2010 Chris Lattner <sabre@nondot.org> Teach the x86 mc assembler that %dr6 = %db6, this implements
rdar://8013734


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106725 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
428256b8186208e89995d447c5e4c9d8e5c099fa 23-Jun-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Add tests for different AVX cmp opcodes, also teach the x86 asm parser to understand the vcmp instruction

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106678 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
09712b57cedb4493b487652b0395ac1d502b75a4 09-Jun-2010 Kevin Enderby <enderby@apple.com> Incremental improvement to the handling of the x86 "Jump if rCX Zero"
instruction. Added the 64-bit version "jrcxz" so it is recognized and also
added the checks for incorrect uses of "jcxz" in 64-bit mode and "jrcxz" in
32-bit mode. Still to do is to correctly handle the encoding of the
instruction adding the Address-size override prefix byte, 0x67, when the width
of the count register is not the same as the mode the machine is running in.
Which for example means the encoding of "jecxz" depends if you are assembling
as a 32-bit target or a 64-bit target.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105661 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
31cc9655b681c1b9b0a199131588377ce578ec0d 28-May-2010 Kevin Enderby <enderby@apple.com> MC/X86: Add alias for movzx.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105005 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
5e394429ab0a51af87056fbdaceeae879e651963 28-May-2010 Kevin Enderby <enderby@apple.com> MC/X86: Add alias for fwait.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105001 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
bd658918df63f43654ce3b1045c7b563df91a63f 27-May-2010 Kevin Enderby <enderby@apple.com> MC/X86: Add aliases for Jcc variants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
cf50a5390c09325a7fc41640449205eced4363f6 25-May-2010 Kevin Enderby <enderby@apple.com> Changed the encoding of X86 floating point stack operations where both operands
are st(0). These can be encoded using an opcode for storing in st(0) or using
an opcode for storing in st(i), where i can also be 0. To allow testing with
the darwin assembler and get a matching binary the opcode for storing in st(0)
is now used. To do this the same logical trick is use from the darwin assembler
in converting things like this:

fmul %st(0), %st

into this:

fmul %st(0)

by looking for the second operand being X86::ST0 for specific floating point
mnemonics then removing the second X86::ST0 operand. This also has the add
benefit to allow things like:

fmul %st(1), %st

that llvm-mc did not assemble.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
39e2dd7bab1925e12d4a03ae7abca0eff87274d6 25-May-2010 Daniel Dunbar <daniel@zuster.org> MC/X86: Add a hack to allow recognizing 'cmpltps' and friends.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104626 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
ca956dc0f66a573735cdea16acab7159c0c254e5 24-May-2010 Kevin Enderby <enderby@apple.com> MC/X86: Add aliases for CMOVcc variants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104549 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
62e4c671b6b0f13c04a20bb43c05bfe84984ef34 22-May-2010 Daniel Dunbar <daniel@zuster.org> MC/X86: Subdivide immediates a bit more, so that we properly recognize immediates based on the width of the target instruction. For example:
addw $0xFFFF, %ax
should match the same as
addw $-1, %ax
but we used to match it to the longer encoding.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104453 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
4c361972fd9110eff30145abdd17f195404a4e49 22-May-2010 Daniel Dunbar <daniel@zuster.org> MC/X86: Add alias for setz, setnz, jz, jnz.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104435 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
9d31d79493be05ab9cbf5b7fb16b52e79712eff3 22-May-2010 Kevin Enderby <enderby@apple.com> Added retl for 32-bit x86 and added retq for 64-bit x86.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104394 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
1fe591da3e83ae95f6e97d7cd432cfbb25e680e8 20-May-2010 Daniel Dunbar <daniel@zuster.org> X86: Model i64i32imm properly, as a subclass of all immediates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104272 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
e5e4ff974df52aa870085904b6670c4d22ada0ac 20-May-2010 Dan Gohman <gohman@apple.com> Fix assembly parsing and encoding of the pushf and popf family of
instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104231 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
b5505d0ee34c22ca25189e035e29e07323311ec9 13-May-2010 Chris Lattner <sabre@nondot.org> reapply r103668 with a fix. Never make "minor syntax changes"
after testing before committing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
3519f9d7d179ac1a77a4721b2e5f8123f95af418 13-May-2010 Chris Lattner <sabre@nondot.org> revert r103668 for now, it is apparently breaking things.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
0de8e3f10ac42abbd642fb2bdab5911374b14a75 13-May-2010 Chris Lattner <sabre@nondot.org> moffset forms of moves are x86-32 only, make the parser
lower them to the correct x86-64 instructions since we
don't have a clean way to handle this in td files yet.
rdar://7947184


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
0481449a0536311b5fefc9122ce679000540e013 12-May-2010 Daniel Dunbar <daniel@zuster.org> MC/X86: Extend suffix matching hack to match 'q' suffix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103535 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
e9f0fb4179d57c631a72fa8020ca05a4d132e15b 04-May-2010 Daniel Dunbar <daniel@zuster.org> MC/X86: Chris pointed that 'as' isn't consistent in accepting the long form of
instructions which have no direct register usage.

Darwin 'as' accepts:
add $0, (%rax)
but rejects
mov $0, (%rax)
for example.

Given that, only accept suffix matches which match exactly one form. We still
need to emit nice diagnostics for failures...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103015 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
c918d6043b823173b106c163038b14c1e2f92765 04-May-2010 Daniel Dunbar <daniel@zuster.org> MC/X86: Add "support" for matching ATT style mnemonic prefixes.
- The idea is that when a match fails, we just try to match each of +'b', +'w',
+'l'. If exactly one matches, we assume this is a mnemonic prefix and accept
it. If all match, we assume it is width generic, and take the 'l' form.

- This would be a horrible hack, if it weren't so simple. Therefore it is an
elegant solution! Chris gets the credit for this particular elegant
solution. :)

- Next step to making this more robust is to have the X86 matcher generate the
mnemonic prefix information. Ideally we would also compute up-front exactly
which mnemonic to attempt to match, but this may require more custom code in
the matcher than is really worth it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
eef6d78be1c3a685f277be3e89ff17f67ed65f49 17-Apr-2010 Chris Lattner <sabre@nondot.org> teach the x86 asm parser how to handle segment prefixes
in memory operands. rdar://7874844


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101661 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
f2de13f8d7bed958538bbd9dbeb9b15ea48456cc 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/X86: Fix an MCOperand link, when we parsing shrld $1,%eax and friends; I believe this fixes the last memory leaks under test/MC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99102 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
f98bc6320b61645897606ef332cff60521c1e8f3 18-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/X86/AsmMatcher: Use the new instruction cleanup routine to implement a
temporary workaround for matching inc/dec on x86_64 to the correct instruction.
- This hack will eventually be replaced with a robust mechanism for handling
matching instructions based on the available target features.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
d5e7705a05947e60806b795880f09757e835f590 13-Mar-2010 Daniel Dunbar <daniel@zuster.org> MC/X86: Add temporary hack to match shrl $1,%eax correctly, to support testing
other functionality on 403.gcc compiled at -O0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98405 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
9c60f534cbdec2ba58b269c4d624ae4d301ef73a 13-Feb-2010 Daniel Dunbar <daniel@zuster.org> MC/X86: Push immediate operands as immediates not expressions when possible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96055 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
1b6c0605915a2f626b1d3aae6f8371924e0fffe7 10-Feb-2010 Daniel Dunbar <daniel@zuster.org> MC/X86 AsmMatcher: Fix a use after free spotted by d0k, and de-XFAIL
x86_32-encoding.s in on expectation of it passing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
e16b0fc3cb607bd0b8240733e2fe829d78df3833 09-Feb-2010 Chris Lattner <sabre@nondot.org> Implement x86 asm parsing support for %st and %st(4)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
b8d6e98e566724f58344d275a4bd675249bb713a 09-Feb-2010 Chris Lattner <sabre@nondot.org> pass stringref by value instead of by const&


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95627 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
12ce0de4622df7bcc15ba6c8818b98c0b936876a 03-Feb-2010 Kevin Enderby <enderby@apple.com> Added support for X86 instruction prefixes so llvm-mc can assemble them. The
Lock prefix, Repeat string operation prefixes and the Segment override prefixes.
Also added versions of the move string and store string instructions without the
repeat prefixes to X86InstrInfo.td. And finally marked the rep versions of
move/store string records in X86InstrInfo.td as isCodeGenOnly = 1 so tblgen is
happy building the disassembler files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95252 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
e7070e90066acc3460af1d6cac4036a80b0250b8 03-Feb-2010 Daniel Dunbar <daniel@zuster.org> AsmParser/X86: Add temporary hack to allow parsing "sal". Eventually we need
some mechanism for specifying alternative syntaxes, but I'm not sure what form
that should take yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95158 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
7b9147afa7d1875353e1c1347b6b6cf71f548229 02-Feb-2010 Daniel Dunbar <daniel@zuster.org> MCAsmParser/X86: Represent absolute memory operands as CodeGen does, with scale
== 1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
b834f5d13d824dc4da2ce0df2aa8dffb697b8974 30-Jan-2010 Daniel Dunbar <daniel@zuster.org> MC/X86 AsmParser: Handle absolute memory operands correctly. We were doing
something totally broken and parsing them as immediates, but the .td file also
had the wrong match class so things sortof worked. Except, that is, that we
would parse
movl $0, %eax
as
movl 0, %eax
Feel free to guess how well that worked.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94869 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
ec2b1f1beb134872aba4faf2e7a9c7eabcf64df9 30-Jan-2010 Daniel Dunbar <daniel@zuster.org> AsmMatcher/X86: Separate out sublass for memory operands that have no segment
register, and use to cleanup a FIXME in X86AsmParser.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94859 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
75f265fbbbb64ab060bf41c5a4677ce56014ce9f 24-Jan-2010 Chris Lattner <sabre@nondot.org> fix a parsing problem on instructions like:
movw $8, (_cost_table_-L97$pb)+66(%eax)

After the parens, we could still have a binop.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94345 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
e88f55254cde9d9443f1299b61aa6a93ec50b791 23-Jan-2010 Sean Callanan <scallanan@apple.com> Added the skeleton for the implementation of the X86
target-specific AsmLexer, and added the appropriate
registration calls.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94275 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
e9b466d4f09de3b46c0d0d1e71cabddc7cc9021b 23-Jan-2010 Sean Callanan <scallanan@apple.com> Modified the register matcher function in AsmMatcher to
be static. Also made it possible for clients to get it
and no other functions from ...GenAsmMatcher.inc by
defining REGISTERS_ONLY before including GenAsmMatcher.inc.
This sets the stage for target-specific lexers that can
identify registers and return AsmToken::Register as
appropriate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94266 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
c6ef277a0b8f43af22d86aea9d5053749cacfbbb 22-Jan-2010 Chris Lattner <sabre@nondot.org> create a new MCParser library and move some stuff into it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94129 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
18b8323de70e3461b5d035e3f9e4f6dfaf5e674b 19-Jan-2010 Sean Callanan <scallanan@apple.com> Promoted the getTok() method to MCAsmParser so that
the two token accessor functions are declared consistently.
Modified the clients of MCAsmParser to reflect this change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93916 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
b9a25b7744ed12b80031426978decce3d4cebbd7 19-Jan-2010 Sean Callanan <scallanan@apple.com> Propagated the parser-side Lex function's declaration to
MCAsmParser, and changed the target-specific AsmParsers
to use it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
aaec205b87637cd0d59d4f11630db603686eb73d 19-Jan-2010 Chris Lattner <sabre@nondot.org> Generalize mcasmstreamer data emission APIs to take an address space
identifier. There is no way to work around it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
54482b472a888c9efe003ad694ecf47b21878f0e 15-Jan-2010 Chris Lattner <sabre@nondot.org> fix a bug in range information for $42, eliminate an
unneeded argument from ParseExpression.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
0a3c5a54a144fd05a7feeb5c9e58da36edbe888c 15-Jan-2010 Chris Lattner <sabre@nondot.org> add range information for mem X86Operand's, now all
X86Operand's have range info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93535 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
b4307b33705ef9e660db640b2f70d6246aa51165 15-Jan-2010 Chris Lattner <sabre@nondot.org> extend MCAsmParser::ParseExpression and ParseParenExpression
to return range information for subexpressions. Use this to
provide range info for several new X86Operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
1f19f0f31dace5d145fecbe1f0f3fea4fb9ae813 15-Jan-2010 Chris Lattner <sabre@nondot.org> give X86Operand a ctor and start passing SMLoc's into it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
29ef9a21dd4df3e92d21f4d9edf612d8da67cfe1 15-Jan-2010 Chris Lattner <sabre@nondot.org> add range location info for registers, change
X86Operand::Create* implementations to avoid
copy ctor use.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93528 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
309264d1e4c41923ff04fb6786749185cf3b9de1 15-Jan-2010 Chris Lattner <sabre@nondot.org> clean up the memory management of the operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
23075746a1418f281bc2a088ea85560bfd833599 15-Jan-2010 Chris Lattner <sabre@nondot.org> refactor ParseRegister to avoid using X86Operand as a temporary
datastructure when parsing a mem operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93521 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
9898671a74d3fc924347e679c45edaa685b3fe6e 14-Jan-2010 Chris Lattner <sabre@nondot.org> Split the TargetAsmParser "ParseInstruction" interface in half:
the new ParseInstruction method just parses and returns a list of
target operands. A new MatchInstruction interface is used to
turn the operand list into an MCInst.

This requires new/deleting all the operands, but it also gives
targets the ability to use polymorphic operands if they want to.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
f007e853e26845cd6866b52d646455fc69f4e0af 14-Jan-2010 Chris Lattner <sabre@nondot.org> prune #includes in TargetAsmParser.h
Pass in SMLoc of instr opcode into ParseInstruction.
Make AsmToken be a class, not a struct.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93457 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
45220a84394758c86cc29ee0e3fe6738946fbcd0 14-Jan-2010 Chris Lattner <sabre@nondot.org> introduce the MCParsedAsmOperand class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93454 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
0d6cd00dbe58b456d0d33663e6a36c270aad2b5a 16-Sep-2009 Kevin Enderby <enderby@apple.com> Fix incorrect assert that should be a user error for code like 'mov $0, %%eax'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82054 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
9c656450d65034c4cd3597fff61ef17376cff090 10-Sep-2009 Kevin Enderby <enderby@apple.com> Added the ParseInstruction() hook for target specific assembler directives so
that things like .word can be parsed as target specific. Moved parsing .word
out of AsmParser.cpp into X86AsmParser.cpp as it is 2 bytes on X86 and 4 bytes
for other targets that support the .word directive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81461 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
875f4ae789ad15dc04771f535a7568700091d0a9 06-Sep-2009 Duncan Sands <baldrick@free.fr> Avoid an unused variable warning when assertions are
disabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81122 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
7b4608dfa018455021050ccd31d3c49aaecf7ff6 03-Sep-2009 Kevin Enderby <enderby@apple.com> Removed the non-target independent AsmToken::Register enum constant
from MCAsmLexer.h in preparation of supporting other targets. Changed the
X86AsmParser code to reflect this by removing AsmLexer::LexPercent and looking
for AsmToken::Percent when parsing in places that used AsmToken::Register.
Then changed X86ATTAsmParser::ParseRegister to parse out registers as an
AsmToken::Percent followed by an AsmToken::Identifier.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80929 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
8c2eebe4074ef218b30d94358f6b2e45c079605c 31-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Switch MCInst to storing an MCExpr* instead of an MCValue.

Also, use MCInst::print instead of custom code in MCAsmPrinter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80575 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
c22e0b2443afdedb6d9b225b938ad404d63cdbe6 14-Aug-2009 Daniel Dunbar <daniel@zuster.org> Update llvm-mc / MCAsmStreamer to print the instruction using the actual target
specific printer (this only works on x86, for now).
- This makes it possible to do some correctness checking of the parsing and
matching, since we can compare the results of 'as' on the original input, to
those of 'as' on the output from llvm-mc.

- In theory, we could now have an easy ATT -> Intel syntax converter. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
0db68f4e3a8be1641dbba72a41baa6ff1b5dd6af 11-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc/X86: Parse '*' correctly (in the way the matcher expects).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
5c468e3d7006e854fd41b29d5539a7adcee53904 10-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc/AsmParser: Allow .td users to redefine the names of the methods to call
on target specific operands for testing class membership and converting to
MCInst operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
5fe6338ac859707f797bf6db6d043bb5f4d944a1 09-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc/AsmParser: Implement user defined super classes.
- We can now discriminate SUB32ri8 from SUB32ri, for example.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78530 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
245f05843f7f17406f394696e7330950e6d88e6d 08-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc/AsmMatcher: Switch token matching to use the new string matcher.

Also, redefined MatchRegisterName to just return the register value or a
sentinel, to simplify the generated code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
a3741fa28b1a397ebfd623ef9d14e978df94ce47 08-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc/AsmMatcher: Improve match code.
- This doesn't actually improve the algorithm (its still linear), but the
generated (match) code is now fairly compact and table driven. Still need a
generic string matcher.

- The table still needs to be compressed, this is quite simple to do and should
shrink it to under 16k.

- This also simplifies and restructures the code to make the match classes more
explicit, in anticipation of resolving ambiguities.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78461 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
2724915c171b08fa9f7f9e54a46ea81708d9c5b2 07-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc/AsmMatcher: Tweaks in response to feedback.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78404 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
6812cd18aad7f31de3a05b86a4fa6119e44b6924 07-Aug-2009 Daniel Dunbar <daniel@zuster.org> Improve disabling of X86 AsmMatcher.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78381 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
7ddca30f311423933ab27bd48727a7226ac3e159 07-Aug-2009 Daniel Dunbar <daniel@zuster.org> Disable X86 AsmMatcher for now, it is causing gcc-4.0 to run out of memory on
i386-apple-darwin9. This presumably will get fixed once the generated code
improves.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78379 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
20927f26fcd7d0394bc60c58c61d879a83adac0d 07-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc/AsmMatcher: Move to a slightly more sane matching design.
- Still not very sane, but a least its not 60k lines on X86. :)

- In terms of correctness, currently some things are hard wired for X86, and we
still don't properly resolve ambiguities (this is ignoring the instructions
we don't even match due to funny .td stuff or other corner cases).

The high level changes:
1. Represent tokens which are significant for matching explicitly as separate
operands. This uniformly handles not only the instruction mnemonic, but
also 'signficiant' syntax like the '*' in "call * ...".

2. Separate the matching of operands to an instruction from the construction of
the MCInst. In theory this can be done during matching, but since the number
of variations is small I think it makes sense to decompose the problems.

3. Improved a few of the mechanisms to at least successfully flatten / tokenize
the assembly strings for PowerPC and ARM.

4. The comment at the top of AsmMatcherEmitter.cpp explains the approach I'm
moving towards for handling ambiguous instructions. The high-bit is to infer
a partial ordering of the operand classes (and force the user to specify one
if we can't) and use that to resolve ambiguities.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78378 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
cdcb388a589846e7e7ca8c88f77cf53933539074 02-Aug-2009 Daniel Dunbar <daniel@zuster.org> Change MCOperand to use Create style instead of Make style for constructing
operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77837 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
c09e411102878c7f01ef707c2ac52eb3c76ab77b 01-Aug-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: A few more parsing / match tweaks.
- Operands which are just a label should be parsed as immediates, not memory
operands (from the assembler perspective).

- Match a few more flavors of immediates.

- Distinguish match functions for memory operands which don't take a segment
register.

- We match the .s for "hello world" now!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77745 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
022e2a84a867ba73fd0e6b89f61e56396f22620d 31-Jul-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc/X86: Sketch match functions for immediates and memory operands.

Also, change scale value to always be 1 when unspecified to machine MachineInst
encoding.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
c6b79ac88e52367dd2afdf03b1be81b10345c0bb 31-Jul-2009 Benjamin Kramer <benny.kra@googlemail.com> Fix a struct/class mismatch, to silence a MSVC warning.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77673 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
a027d222e18ea9028e9e12ae2f5cd566889b599a 31-Jul-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Match a few X86 instructions.
- This is "experimental" code, I am feeling my way around and working out the
best way to do things (and learning tblgen in the process). Comments welcome,
but keep in mind this stuff will change radically.

- This is enough to match "subb" and friends, but not much else. The next step is to
automatically generate the matchers for individual operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
37dfdecafdaabc87d3a9dcfc8c33a2308af2763c 29-Jul-2009 Chris Lattner <sabre@nondot.org> more syntactic cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77442 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
c3c35b17218248f9b4786a6125bf9719e536eeb2 29-Jul-2009 Chris Lattner <sabre@nondot.org> minor smallvector cleanups


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
0e2771f4c4a6e1ffc664eb23487087f824340255 29-Jul-2009 Daniel Dunbar <daniel@zuster.org> Match X86 register names to number.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77404 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
16cdcb38b2a5c5cdc216f9abafabd20e1ef7a254 29-Jul-2009 Daniel Dunbar <daniel@zuster.org> Move X86 instruction parsing into X86/AsmParser.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
a2edbabcb86f213eca6daeda5d801f8c7b1e44b2 28-Jul-2009 Daniel Dunbar <daniel@zuster.org> Provide generic MCAsmParser when constructing target specific parsers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77362 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
9a7e2ccf574368b60455f8c8975030475a1f3ce0 27-Jul-2009 Daniel Dunbar <daniel@zuster.org> llvm-mc: Move AsmLexer::getCurStrVal to StringRef based API.
- My DFS traversal of LLVM is, at least for now, nearly complete! :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77258 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
0c795d61878156817cedbac51ec2921f2634c1a5 25-Jul-2009 Daniel Dunbar <daniel@zuster.org> Add new helpers for registering targets.
- Less boilerplate == good.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77052 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
a8f0af5e0ec7dc60eb4a4a2ae41fee91ea3e2f40 21-Jul-2009 Daniel Dunbar <daniel@zuster.org> Remove some unused code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76541 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
dbd692a66e6a5f60ec3ff120ed27ae3a918c375f 20-Jul-2009 Daniel Dunbar <daniel@zuster.org> Add MCAsmLexer interface.
- This provides the AsmLexer interface to the target specific assembly parsers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
a3af370dc12f6d5100da5d614ab0a62da135569a 20-Jul-2009 Daniel Dunbar <daniel@zuster.org> Add MCAsmParser interface.
- This provides the AsmParser interface to the target specific assembly
parsers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76453 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
4cb1e13769856716261a4d315f8202bd918502c3 19-Jul-2009 Daniel Dunbar <daniel@zuster.org> Put Target definitions inside Target specific header, and llvm namespace.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76344 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
092a9dda2d13918a6410db26f41c7b5aa97ff989 17-Jul-2009 Daniel Dunbar <daniel@zuster.org> Sketch support for target specific assembly parser.
- Not fully enabled yet, need a configure regeneration.


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