summaryrefslogtreecommitdiff
path: root/test/MC/AsmParser
Commit message (Collapse)AuthorAge
* llvm/test/MC/AsmParser/secure_log_unique.s: Use env(1) here. Then r186611 ↵NAKAMURA Takumi2013-07-19
| | | | | | can be reverted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186643 91177308-0d34-0410-b5e6-96231b3b80d8
* test/MC/AsmParser/secure_log_unique.s requires shellHans Wennborg2013-07-18
| | | | | | | This should fix the chapuni bots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186611 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a test for .secure_log_unique.Rafael Espindola2013-07-18
| | | | | | It also doubles a test that F_Append works. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186606 91177308-0d34-0410-b5e6-96231b3b80d8
* Prefix failing commands with not to make clear they are expected to fail.Rafael Espindola2013-07-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185554 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in the MC asm parser evaluating expressions. It was treating:Kevin Enderby2013-05-07
| | | | | | | | | | A = 9 B = 3 * A - 2 * A + 1 as B = 3 * A - (2 * A + 1) rdar://13816516 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181366 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace coff-/elf-dump with llvm-readobjNico Rieck2013-04-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179361 91177308-0d34-0410-b5e6-96231b3b80d8
* AsmParser: More generic support for integer type suffices.Jim Grosbach2013-02-26
| | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176118 91177308-0d34-0410-b5e6-96231b3b80d8
* MCParser: Reject .balign with non-pow2 alignments.Benjamin Kramer2013-02-16
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175360 91177308-0d34-0410-b5e6-96231b3b80d8
* Derive ELF section type from the name in some cases where GNU as doesJoerg Sonnenberger2013-02-16
| | | | | | | so. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175327 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for macro parameters/arguments delimited by spaces,Preston Gurd2012-09-19
| | | | | | | | | | | | to improve compatibility with GNU as. Based on a patch by PaX Team. Fixed assertion failures on non-Darwin and added additional test cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164248 91177308-0d34-0410-b5e6-96231b3b80d8
* Support default parameters/arguments for assembler macros.Preston Gurd2012-09-19
| | | | | | | | | | This patch is based on the one by PaX Team. Patch by Andy Zhang! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164246 91177308-0d34-0410-b5e6-96231b3b80d8
* Enhance unmatched '.endr' directive error message in assembler.Preston Gurd2012-09-19
| | | | | | | | | | The directive can be matched with directives other than '.rept' Patch by Andy Zhang! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164245 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Overhaul handling of .lcommBenjamin Kramer2012-09-07
| | | | | | | | | | | | | - 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163395 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix macros arguments with an underscore, dot or dollar in them. This is basedRafael Espindola2012-08-21
| | | | | | on a patch by Andy/PaX. I added the support for dot and dollar. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162298 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the wording in of the "expected identifier" error in the .macro directiveRafael Espindola2012-08-21
| | | | | | | consistent with the other "expected identifier" errors. Extracted from the Andy/PaX patch. I added the test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162291 91177308-0d34-0410-b5e6-96231b3b80d8
* Keep empty assembly macro argument values in the middle of the list.Jim Grosbach2012-07-30
| | | | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161002 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert the uses of '|&' to use '2>&1 |' instead, which works on oldChandler Carruth2012-07-02
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159544 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement irpc. Extracted from a patch by the PaX team. I just added the test.Rafael Espindola2012-06-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158604 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor macro argument parsing into helper methods and add support for .irp.Rafael Espindola2012-06-15
| | | | | | | Patch extracted from a larger one by the PaX team. I added the testcases and tightened error handling a bit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158523 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the .rept directive. Patch by Vladmir Sorokin. I added supportRafael Espindola2012-05-12
| | | | | | for nesting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156714 91177308-0d34-0410-b5e6-96231b3b80d8
* AsmParser: Add support for the .purgem directive.Benjamin Kramer2012-05-12
| | | | | | Based on a patch by Team PaX. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156709 91177308-0d34-0410-b5e6-96231b3b80d8
* AsmParser: ignore the .extern directive.Benjamin Kramer2012-05-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156707 91177308-0d34-0410-b5e6-96231b3b80d8
* AsmParser: Add support for .ifc and .ifnc directives.Benjamin Kramer2012-05-12
| | | | | | Based on a patch from PaX Team. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156706 91177308-0d34-0410-b5e6-96231b3b80d8
* AsmParser: Add support for .ifb and .ifnb directives.Benjamin Kramer2012-05-12
| | | | | | Based on a patch from PaX Team. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156705 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Unknown assembler directives are now hard errors.Jim Grosbach2012-05-01
| | | | | | | | | | | | | | | | Previously, an unsupported/unknown assembler directive issued a warning. That's generally unsafe, and inconsistent with the behaviour of pretty much every system assembler. Now that the MC assemblers are mature enough to be the default on multiple targets, it's reasonable to issue errors for these. For target or platform directives that need to stay warnings, we should add explicit handlers for them in, e.g., ELFAsmParser.cpp, DarwinAsmParser.cpp, et. al., and issue the warning there. rdar://9246275 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155926 91177308-0d34-0410-b5e6-96231b3b80d8
* MC assembly parser handling for trailing comma in macro instantiation.Jim Grosbach2012-04-16
| | | | | | | | | A trailing comma means no argument at all (i.e., as if the comma were not present), not an empty argument to the invokee. rdar://11252521 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154863 91177308-0d34-0410-b5e6-96231b3b80d8
* Continue cleanup of LIT, getting rid of the remaining artifacts from dejagnuEli Bendersky2012-03-25
| | | | | | | | | | | | | | | | | | * Removed test/lib/llvm.exp - it is no longer needed * Deleted the dg.exp reading code from test/lit.cfg. There are no dg.exp files left in the test suite so this code is no longer required. test/lit.cfg is now much shorter and clearer * Removed a lot of duplicate code in lit.local.cfg files that need access to the root configuration, by adding a "root" attribute to the TestingConfig object. This attribute is dynamically computed to provide the same information as was previously provided by the custom getRoot functions. * Documented the config.root attribute in docs/CommandGuide/lit.pod git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153408 91177308-0d34-0410-b5e6-96231b3b80d8
* Assembler should accept redefinitions of unused variable symbols.Jim Grosbach2012-03-20
| | | | | | rdar://11027851 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153137 91177308-0d34-0410-b5e6-96231b3b80d8
* MC asm parser macro argument count was wrong when empty.Jim Grosbach2012-03-17
| | | | | | | | evaluated to '1' when the argument list was empty (should be '0'). rdar://11057257 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152967 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace all instances of dg.exp file with lit.local.cfg, since all tests are ↵Eli Bendersky2012-02-16
| | | | | | | | | | | run with LIT now and now Dejagnu. dg.exp is no longer needed. Patch reviewed by Daniel Dunbar. It will be followed by additional cleanup patches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150664 91177308-0d34-0410-b5e6-96231b3b80d8
* Small improvement to the recursion detection logic from the previous commit.Rafael Espindola2012-01-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149175 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle recursive variable definitions directly. This gives us better errorRafael Espindola2012-01-28
| | | | | | messages and allows us to fix PR11865. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149174 91177308-0d34-0410-b5e6-96231b3b80d8
* The error check for using -g with a .s file already containing dwarf .fileKevin Enderby2012-01-11
| | | | | | | | directives was in the wrong place and getting triggered incorectly with a cpp .file directive. This change fixes that and adds a test case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147951 91177308-0d34-0410-b5e6-96231b3b80d8
* Split Finish into Finish and FinishImpl to have a common place to do end ofRafael Espindola2012-01-07
| | | | | | | | file error checking. Use that to error on an unfinished cfi_startproc. The error is not nice, but is already better than a segmentation fault. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147717 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve the implementation of .incbin directive by replacing a loop by usingKevin Enderby2011-12-14
| | | | | | | getStreamer().EmitBytes. Suggestion by Benjamin Kramer! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146599 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the .incbin directive which takes the binary data from a file and emitsKevin Enderby2011-12-14
| | | | | | | it to the streamer. rdar://10383898 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146592 91177308-0d34-0410-b5e6-96231b3b80d8
* Move test to the X86 directory, note the PR number and only run MC once.Rafael Espindola2011-10-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143352 91177308-0d34-0410-b5e6-96231b3b80d8
* test/MC/AsmParser/2011-09-06-NoNewline.s: Add explicit -mtriple=i386. It ↵NAKAMURA Takumi2011-10-28
| | | | | | | | | uses X86 instruction. FIXME: Would it be reproduced without target-specific operands? FIXME: Why run llvm-mc as the same input by 3 times? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143195 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix parsing of a line with only a # in it.Rafael Espindola2011-10-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142537 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for a new extension to the .file directive:Nick Lewycky2011-10-17
| | | | | | | | | | | .file filenumber "directory" "filename" This removes one join+split of the directory+filename in MC internals. Because bitcode files have independent fields for directory and filenames in debug info, this patch may change the .o files written by existing .bc files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142300 91177308-0d34-0410-b5e6-96231b3b80d8
* Added regression test for bug #10869.Stepan Dyatkovskiy2011-09-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140012 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix AsmParser binary precedence for shift operators.Jim Grosbach2011-08-20
| | | | | | | | rdar://9976729 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138208 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up. Whitespace.Jim Grosbach2011-08-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138207 91177308-0d34-0410-b5e6-96231b3b80d8
* Move some ELF directives into ELF asm parser.Jim Grosbach2011-07-25
| | | | | | | | | | | | | | | The .local, .hidden, .internal, and .protected are not legal for all supported file formats (in particular, they're invalid for MachO). Move the parsing for them into the ELF assembly parser since that's the format they're for. Similarly, .weak is used by COFF and ELF, but not MachO, so move the parsing to the COFF and ELF asm parsers. Previously, using any of these directives on Darwin would result in an assertion failure in the parser; now we get a diagnostic as we should. rdar://9827089 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135921 91177308-0d34-0410-b5e6-96231b3b80d8
* Asm parser range checking on .<size> <value> directives.Jim Grosbach2011-06-29
| | | | | | | | | | For example, ".byte 256" would previously assert() when emitting an object file. Now it generates a diagnostic that the literal value is out of range. rdar://9686950 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134069 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Allow .common as alias for .comm assembler directive. PR10116.Hans Wennborg2011-06-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133349 91177308-0d34-0410-b5e6-96231b3b80d8
* Test that ".byte 1, 2, 3, 4" does the right thing.Roman Divacky2011-06-07
| | | | | | | Requested by nbjoerg! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132716 91177308-0d34-0410-b5e6-96231b3b80d8
* Basic support for macros with explicit arguments.Rafael Espindola2011-06-05
| | | | | | | | | | | We still don't handle * default values * :req * :vararg * \() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132656 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a test for the chained directives that I forgot last time.Charles Davis2011-05-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132110 91177308-0d34-0410-b5e6-96231b3b80d8
* Test .seh_startchained and .seh_endchained parsing.Charles Davis2011-05-26
| | | | | | | | | | | | Rework how the MCWin64EHUnwindInfo instances are stored. Fix issues with chained unwind areas exposed by the test that were related to this. The ChainedParent field had the wrong address, because when the chained unwind info was added, the addresses shifted around. Now we store the pointers to the structures, which are now allocated from the MC heap. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132106 91177308-0d34-0410-b5e6-96231b3b80d8