summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/ms-inline-asm.c
Commit message (Collapse)AuthorAgeFilesLines
* [X86][AsmParser] re-introduce 'offset' operatorEric Astor2019-12-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | Summary: Amend MS offset operator implementation, to more closely fit with its MS counterpart: 1. InlineAsm: evaluate non-local source entities to their (address) location 2. Provide a mean with which one may acquire the address of an assembly label via MS syntax, rather than yielding a memory reference (i.e. "offset asm_label" and "$asm_label" should be synonymous 3. address PR32530 Based on http://llvm.org/D37461 Fix broken test where the break appears unrelated. - Set up appropriate memory-input rewrites for variable references. - Intel-dialect assembly printing now correctly handles addresses by adding "offset". - Pass offsets as immediate operands (using "r" constraint for offsets of locals). Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D71436
* (clang part) Implement MASM-flavor intel syntax behavior for inline MS asm ↵Yunzhong Gao2016-09-021-4/+4
| | | | | | | | | | | | | | block. Clang tests for verifying the following syntaxes: 1. 0xNN and NNh are accepted as valid hexadecimal numbers, but 0xNNh is not. 0xNN and NNh may come with optional U or L suffix. 2. NNb is accepted as a valid binary (base-2) number, but 0bNN is not. NNb may come with optional U or L suffix. Differential Revision: https://reviews.llvm.org/D22112 llvm-svn: 280556
* Update Clang Parser test error message to match new parser errorsNirav Dave2016-08-021-1/+1
| | | | | | Update clang tests in light of r277489. llvm-svn: 277490
* Revert r276896 "Update Clang Parser test error message to match new parser ↵Hans Wennborg2016-08-011-1/+1
| | | | | | | | errors" This depended on r276895, which was reverted in r277402. llvm-svn: 277405
* Update Clang Parser test error message to match new parser errorsNirav Dave2016-07-271-1/+1
| | | | llvm-svn: 276896
* [ms-inline-asm][AVX512] Add ability to use k registers in MS inline asm + ↵Marina Yatsina2016-03-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | fix bag with curly braces Until now curly braces could only be used in MS inline assembly to mark block start/end. All curly braces were removed completely at a very early stage. This approach caused bugs like: "m{o}v eax, ebx" turned into "mov eax, ebx" without any error. In addition, AVX-512 added special operands (e.g., k registers), which are also surrounded by curly braces that mark them as such. Now, we need to keep the curly braces and identify at a later stage if they are marking block start/end (if so, ignore them), or surrounding special AVX-512 operands (if so, parse them as such). This patch fixes the bug described above and enables the use of AVX-512 special operands. This commit is the the clang part of the patch. The clang part of the review is: http://reviews.llvm.org/D17766 The llvm part of the review is: http://reviews.llvm.org/D17767 Differential Revision: http://reviews.llvm.org/D17766 llvm-svn: 262842
* [ms-inline-asm] Fixing bug in single asm statement supportMarina Yatsina2016-02-231-1/+1
| | | | | | | | | | | | | | Fixing a crash caused by trying to merge a single-line asm statement with an asm block that follows it, e.g: asm int 4 asm { int 5 } Now, only adjacent single-line asm statements that are not surrounded by braces will be merged into one asm call. Differential Revision: http://reviews.llvm.org/D17496 llvm-svn: 261618
* Adding option -fno-inline-asm to disallow inline asmSteven Wu2015-01-161-0/+2
| | | | | | | | | | | | | | | | Summary: This patch add a new option to dis-allow all inline asm. Any GCC style inline asm will be reported as an error. Reviewers: rnk, echristo Reviewed By: rnk, echristo Subscribers: bob.wilson, rnk, echristo, rsmith, cfe-commits Differential Revision: http://reviews.llvm.org/D6870 llvm-svn: 226340
* ms-inline-asm: Scope inline asm labels to functionsEhsan Akhgari2014-09-221-0/+3
| | | | | | | | | | | | | | | | Summary: This fixes PR20023. In order to implement this scoping rule, we piggy back on the existing LabelDecl machinery, by creating LabelDecl's that will carry the "internal" name of the inline assembly label, which we will rewrite the asm label to. Reviewers: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4589 llvm-svn: 218230
* clang-cl: Merge adjacent single-line __asm blocksEhsan Akhgari2014-07-251-1/+1
| | | | | | | | | | | | | | | | | Summary: This patch extends the __asm parser to make it keep parsing input tokens as inline assembly if a single-line __asm line is followed by another line starting with __asm too. It also makes sure that we correctly keep matching braces in such situations by separating the notions of how many braces we are matching and whether we are in single-line asm block mode. Reviewers: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4598 llvm-svn: 213916
* Don't get confused on the number of braces when braces start after the first ↵Ehsan Akhgari2014-07-151-0/+3
| | | | | | | | | | | | | | | | __asm Summary: Without this, we would not consume the closing brace which would cause the parser to start consuming C++ and bad things would happen. Reviewers: majnemer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4505 llvm-svn: 213032
* Add support for nested blocks in Microsoft inline assemblyEhsan Akhgari2014-07-061-0/+11
| | | | | | This fixes http://llvm.org/PR20204. llvm-svn: 212389
* Re-enable ms inline asm parser test.Alp Toker2013-12-081-1/+1
| | | | | | LLVM r196044 should make it pass. llvm-svn: 196734
* Temporarily disabling ms-asm testRenato Golin2013-01-251-0/+1
| | | | llvm-svn: 173510
* Add a triple, per Ben's suggestion.Chad Rosier2013-01-221-2/+1
| | | | llvm-svn: 173198
* Second attempt to fix ppc bots.Chad Rosier2013-01-221-1/+1
| | | | llvm-svn: 173193
* Add x86 requirement to hopefully fix ppc bots.Chad Rosier2013-01-221-0/+1
| | | | llvm-svn: 173190
* [ms-inline asm] Remove a warning about ms-style inline assembly not beingChad Rosier2013-01-221-14/+14
| | | | | | supported. llvm-svn: 173177
* [driver, ms-inline asm] MS-Style inline assembly is controlled by theChad Rosier2012-12-051-1/+1
| | | | | | | -fasm-blocks flag, not the -fms-extensions flag. rdar://12808010 llvm-svn: 169422
* [ms-inline asm] Change the -fenable-experimental-ms-inline-asm option from a Chad Rosier2012-08-241-4/+4
| | | | | | | | | CodeGen option to a LangOpt option. In turn, hoist the guard into the parser so that we avoid the new (and fairly unstable) Sema/AST/CodeGen logic. This should restore the behavior of clang to that prior to r158325. <rdar://problem/12163681> llvm-svn: 162602
* [ms-inline asm] MSVC parses multiple __asm statements on a single line as oneChad Rosier2012-08-151-2/+2
| | | | | | | | | | | | statement. For example, if (x) __asm out dx, ax __asm out dx, ax results in a single inline asm statement (i.e., both "out dx, ax" statements are predicated on if(x)). llvm-svn: 161986
* [ms-inline asm] Add a helpful assert.Chad Rosier2012-08-141-5/+5
| | | | llvm-svn: 161890
* [ms-style asm] Change the fatal error to an extension warning. Apparently, thisChad Rosier2012-06-201-12/+12
| | | | | | | error was asserting on anything that included Windows.h. MS-style inline asm is still dropped, but at least now we're not completely silent about it. llvm-svn: 158833
* [ms-inline-asm] The __asm keyword is a statement separator, so multiple asmChad Rosier2012-06-121-0/+6
| | | | | | statements are allowed on the same line. llvm-svn: 158372
* [ms-inline-asm] Cleanup MS style inline assembly parsing.Chad Rosier2012-06-121-1/+8
| | | | | | | | | | Specifically, improve the handling of whitespace, stop saving tokens that are in comments and fix the case where we have a comment followed by a closing brace on the next line. Unfortunately, there's no easy way of testing this code. llvm-svn: 158367
* Some fixes for MS-style asm parsing: specifically, add some error checking, ↵Eli Friedman2011-09-301-0/+25
and handle asm comments using semicolons correctly. (The comments are actually surprisingly tricky.) llvm-svn: 140837
OpenPOWER on IntegriCloud