summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/AsmParser
Commit message (Collapse)AuthorAgeFilesLines
...
* Add support for assigning to . in AsmParser.Anders Waldenborg2014-02-174-4/+53
| | | | | | | | | This is implemented by handling assignments to the '.' pseudo symbol as ".org" directives. Differential Revision: http://llvm-reviews.chandlerc.com/D2625 llvm-svn: 201530
* MCAsmParser: add some mixed argument testsSaleem Abdulrasool2014-02-171-0/+30
| | | | | | | Add some tests to explicitly validate handling of comma and non-comma separated arguments. llvm-svn: 201500
* MCAsmParser: better handling for named argumentsSaleem Abdulrasool2014-02-173-1/+76
| | | | | | | | | | | | | | | | | | | Until this point only macro definition with named parameters were parsed but the names were ignored. This adds support for using that information for named parameter instantiation. In order to support the full semantics of the keyword arguments, the arguments are no longer lazily initialised since the keyword arguments can be specified out of order and partially if they are defaulted. Prepopulate the arguments with the default value for any defaulted parameters, and then parse the specified arguments. This simplies some of the handling of the arguments in the inner loop since empty arguments simply increment the parameter index and move on. Note that keyword and positional arguments cannot be mixed. llvm-svn: 201499
* MCAsmParser: relax declaration parsingSaleem Abdulrasool2014-02-161-0/+10
| | | | | | | | The Linux kernel defines empty macros for compatibility with ARM UAL syntax. The comma after the name is optional, and if present can be safely lexed. This improves compatibility with the GNU assembler. llvm-svn: 201474
* Simplify checks in MC/AsmParser/directive_loc.sDiego Novillo2014-02-131-10/+6
| | | | llvm-svn: 201361
* Fix generation of 'isa' and 'discriminator' keywords.Diego Novillo2014-02-131-2/+11
| | | | | | | | | | | | | | | | | Summary: There should be a space before each of these two keywords to avoid generating invalid assembly files. NOTE: I could not find an obvious maintainers in CODE_OWNERS.TXT, but this seems related to debug info. Reviewers: echristo CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2791 llvm-svn: 201359
* AsmParser: Parse (and ignore) nested .macro definitions.Benjamin Kramer2014-02-091-0/+20
| | | | | | | | | This enables a slightly odd feature of gas. The macro is defined when the outermost macro is instantiated. PR18599 llvm-svn: 201045
* MC: Fix .octa output for APInts with BitWidth > 128David Woodhouse2014-02-011-3/+3
| | | | llvm-svn: 200615
* MC: Add support for .octaDavid Woodhouse2014-02-011-0/+12
| | | | | | | | | | This is a minimal implementation which accepts only constants rather than full expressions, but that should be perfectly sufficient for all known users for now. Patch from PaX Team <pageexec@freemail.hu> llvm-svn: 200614
* Update a .fill test to use the updated semantics.David Majnemer2014-02-011-1/+2
| | | | | | Something funny happened, this should've been part of r200606. llvm-svn: 200607
* MC: Improve the .fill directive's compatibility with GASDavid Majnemer2014-02-011-1/+42
| | | | | | | | | Per the GAS documentation, .fill should permit pattern widths that aren't a power of two. While I was in the neighborhood, I added some sanity checking. This change was motivated by a use of this construct in the Linux Kernel. llvm-svn: 200606
* MC: Better management of macro argumentsDavid Majnemer2014-01-292-20/+16
| | | | | | | | | | | | The linux kernel makes uses of a GAS `feature' which substitutes nothing for macro arguments which aren't specified. Proper support for these kind of macro arguments necessitated a cleanup of differences between `GAS' and `Darwin' dialect macro processing. Differential Revision: http://llvm-reviews.chandlerc.com/D2634 llvm-svn: 200409
* MC: Reorganize macro MC test along dialect linesDavid Majnemer2014-01-292-34/+122
| | | | | | | | | | | This commit seeks to do two things: - Run the surfeit of tests under the Darwin dialect. This ends up affecting tests which assumed that spaces could deliminate arguments. - The GAS dialect tests should limit their surface area to things that could plausibly work under GAS. For example, Darwin style arguments have no business being in such a test. llvm-svn: 200383
* MC: fix test locations/nameSaleem Abdulrasool2014-01-262-24/+0
| | | | | | | Placed the MC variant diagnostics in the wrong directory accidentally. Move them into their respective architecture specific directories. llvm-svn: 200161
* AsmParser: improve diagnostics for invalid variantsSaleem Abdulrasool2014-01-262-0/+24
| | | | | | | | | An emitted diagnostic for an invalid relocation variant would place the caret on the token following the relocation variant indicator or at the end of the line if there was no following token. This change corrects the placement of the caret to point to the token. llvm-svn: 200159
* Mark the 64-bit x86 push/pop instructions as In64BitMode. Mark the ↵Craig Topper2014-01-051-1/+1
| | | | | | corresponding 32-bit versions with the same encodings Not64BitMode. Remove hack from tablegen disassembler table emitter. Fix bad test. llvm-svn: 198530
* AsmParser: cleanup diagnostics for .rep/.reptSaleem Abdulrasool2013-12-281-0/+41
| | | | | | | Avoid double diagnostics for invalid expressions for count. Improve caret location for negative count. llvm-svn: 198099
* IAS: support .rep as an alias for .reptSaleem Abdulrasool2013-12-281-0/+30
| | | | | | | The GNU assembler supports .rep as an alias for .rept. This simply creates the alias for it and introduces a test for both .rept and .rep. llvm-svn: 198097
* AsmParser: add support for .end directiveSaleem Abdulrasool2013-12-182-0/+25
| | | | | | | | | | | | | The .end directive indicates the end of the file. No further instructions are processed after a .end directive is encountered. One potential (glaringly obvious) optimisation that could be pursued here is to extend MCAsmParser with a DiscardRemainder method to avoid processing lexemes to the end of the file. It was unclear at this point if that would be worth adding, and could easily be added in a follow on change. Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> llvm-svn: 197547
* MCParser/Debug info: Accept line number 0 as a legitimate value, sinceAdrian Prantl2013-09-261-0/+1
| | | | | | | | CFE produces it to indicate artificial locations. c.f.: DWARF standard, Table 6.2: line -- An unsigned integer indicating a source line number. Lines are numbered beginning at 1. The compiler may emit the value 0 in cases where an instruction cannot be attributed to any source line. llvm-svn: 191471
* Implements parsing and emitting of .cfi_window_save in MC.Venkatraman Govindaraju2013-09-261-0/+15
| | | | llvm-svn: 191431
* Make the size and expr arguments of .fill directive optional.Roman Divacky2013-09-241-0/+16
| | | | llvm-svn: 191318
* Improve handling of .file, .include and .incbin directives toYunzhong Gao2013-09-053-3/+3
| | | | | | | | | allow escaped octal character sequences. The patch was discussed in Phabricator. See: http://llvm-reviews.chandlerc.com/D1289 llvm-svn: 190089
* [tests] Cleanup initialization of test suffixes.Daniel Dunbar2013-08-161-2/+0
| | | | | | | | | | | | | | | | | - Instead of setting the suffixes in a bunch of places, just set one master list in the top-level config. We now only modify the suffix list in a few suites that have one particular unique suffix (.ml, .mc, .yaml, .td, .py). - Aside from removing the need for a bunch of lit.local.cfg files, this enables 4 tests that were inadvertently being skipped (one in Transforms/BranchFolding, a .s file each in DebugInfo/AArch64 and CodeGen/PowerPC, and one in CodeGen/SI which is now failing and has been XFAILED). - This commit also fixes a bunch of config files to use config.root instead of older copy-pasted code. llvm-svn: 188513
* Add test-case for hex floating-literalsTim Northover2013-08-141-0/+3
| | | | | | Somehow I forgot to test one of the error conditions I'd added. llvm-svn: 188372
* Support C99 hexadecimal floating-point literals in assemblyTim Northover2013-08-141-1/+36
| | | | | | | | It's useful to be able to write down floating-point numbers without having to worry about what they'll be rounded to (as C99 discovered), this extends that ability to the MC assembly parsers. llvm-svn: 188370
* llvm/test/MC/AsmParser/secure_log_unique.s: Use env(1) here. Then r186611 ↵NAKAMURA Takumi2013-07-191-3/+2
| | | | | | can be reverted. llvm-svn: 186643
* test/MC/AsmParser/secure_log_unique.s requires shellHans Wennborg2013-07-181-0/+1
| | | | | | This should fix the chapuni bots. llvm-svn: 186611
* Add a test for .secure_log_unique.Rafael Espindola2013-07-181-0/+9
| | | | | | It also doubles a test that F_Append works. llvm-svn: 186606
* Prefix failing commands with not to make clear they are expected to fail.Rafael Espindola2013-07-033-4/+4
| | | | llvm-svn: 185554
* Fix a bug in the MC asm parser evaluating expressions. It was treating:Kevin Enderby2013-05-071-0/+1
| | | | | | | | | A = 9 B = 3 * A - 2 * A + 1 as B = 3 * A - (2 * A + 1) rdar://13816516 llvm-svn: 181366
* Replace coff-/elf-dump with llvm-readobjNico Rieck2013-04-122-92/+114
| | | | llvm-svn: 179361
* AsmParser: More generic support for integer type suffices.Jim Grosbach2013-02-261-0/+6
| | | | | | | | | | For integer constants, allow 'L', 'UL' as well as 'ULL' and 'LL'. This provides better support for shared headers between .s and .c files that define bunches of constant values. rdar://9321056 llvm-svn: 176118
* MCParser: Reject .balign with non-pow2 alignments.Benjamin Kramer2013-02-161-0/+10
| | | | | | | | GNU as rejects them and there are configure scripts in the wild that check if the assembler rejects ".align 3" to determine whether the alignment is in bytes or powers of two. llvm-svn: 175360
* Derive ELF section type from the name in some cases where GNU as doesJoerg Sonnenberger2013-02-161-0/+62
| | | | | | so. llvm-svn: 175327
* Add support for macro parameters/arguments delimited by spaces,Preston Gurd2012-09-192-8/+50
| | | | | | | | | | to improve compatibility with GNU as. Based on a patch by PaX Team. Fixed assertion failures on non-Darwin and added additional test cases. llvm-svn: 164248
* Support default parameters/arguments for assembler macros.Preston Gurd2012-09-191-2/+10
| | | | | | | | This patch is based on the one by PaX Team. Patch by Andy Zhang! llvm-svn: 164246
* Enhance unmatched '.endr' directive error message in assembler.Preston Gurd2012-09-191-1/+1
| | | | | | | | The directive can be matched with directives other than '.rept' Patch by Andy Zhang! llvm-svn: 164245
* MC: Overhaul handling of .lcommBenjamin Kramer2012-09-072-4/+9
| | | | | | | | | | | | | - Darwin lied about not supporting .lcomm and turned it into zerofill in the asm parser. Push the zerofill-conversion down into macho-specific code. - This makes the tri-state LCOMMType enum superfluous, there are no targets without .lcomm. - Do proper error reporting when trying to use .lcomm with alignment on a target that doesn't support it. - .comm and .lcomm alignment was parsed in bytes on COFF, should be power of 2. - Fixes PR13755 (.lcomm crashes on ELF). llvm-svn: 163395
* Fix macros arguments with an underscore, dot or dollar in them. This is basedRafael Espindola2012-08-211-0/+21
| | | | | | on a patch by Andy/PaX. I added the support for dot and dollar. llvm-svn: 162298
* Make the wording in of the "expected identifier" error in the .macro directiveRafael Espindola2012-08-211-0/+9
| | | | | | | consistent with the other "expected identifier" errors. Extracted from the Andy/PaX patch. I added the test. llvm-svn: 162291
* Keep empty assembly macro argument values in the middle of the list.Jim Grosbach2012-07-301-0/+12
| | | | | | | | | | | | | | | | | | | Empty macro arguments at the end of the list should be as-if not specified at all, but those in the middle of the list need to be kept so as not to screw up the positional numbering. E.g.: .macro foo foo_-bash___: nop .endm foo 1, 2, 3, 4 foo 1, , 3, 4 Should create two labels, "foo_1_2_3_4" and "foo_1__3_4". rdar://11948769 llvm-svn: 161002
* Convert the uses of '|&' to use '2>&1 |' instead, which works on oldChandler Carruth2012-07-021-1/+1
| | | | | | | | | | versions of Bash. In addition, I can back out the change to the lit built-in shell test runner to support this. This should fix the majority of fallout on Darwin, but I suspect there will be a few straggling issues. llvm-svn: 159544
* Implement irpc. Extracted from a patch by the PaX team. I just added the test.Rafael Espindola2012-06-161-0/+9
| | | | llvm-svn: 158604
* Factor macro argument parsing into helper methods and add support for .irp.Rafael Espindola2012-06-152-0/+18
| | | | | | | Patch extracted from a larger one by the PaX team. I added the testcases and tightened error handling a bit. llvm-svn: 158523
* Add support for the .rept directive. Patch by Vladmir Sorokin. I added supportRafael Espindola2012-05-123-0/+35
| | | | | | for nesting. llvm-svn: 156714
* AsmParser: Add support for the .purgem directive.Benjamin Kramer2012-05-121-0/+12
| | | | | | Based on a patch by Team PaX. llvm-svn: 156709
* AsmParser: ignore the .extern directive.Benjamin Kramer2012-05-121-0/+4
| | | | llvm-svn: 156707
* AsmParser: Add support for .ifc and .ifnc directives.Benjamin Kramer2012-05-121-0/+65
| | | | | | Based on a patch from PaX Team. llvm-svn: 156706
* AsmParser: Add support for .ifb and .ifnb directives.Benjamin Kramer2012-05-121-0/+67
| | | | | | Based on a patch from PaX Team. llvm-svn: 156705
OpenPOWER on IntegriCloud