summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/MachO
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix crashes when assembler directives are used that are notKevin Enderby2014-03-251-0/+24
| | | | | | | | for Mach-O object files by generating an error instead. rdar://16335232 llvm-svn: 204687
* Move codegen test over to MC.Rafael Espindola2014-03-211-0/+8
| | | | llvm-svn: 204490
* Split out the MC part of this test.Rafael Espindola2014-03-211-0/+17
| | | | llvm-svn: 204481
* Convert another CodeGen test into a MC test.Rafael Espindola2014-03-201-0/+29
| | | | llvm-svn: 204412
* Convert CodeGen test into a more specific MC test.Rafael Espindola2014-03-201-0/+14
| | | | llvm-svn: 204406
* Move yet another test that requires ARM to an ARM test directory.NAKAMURA Takumi2014-03-181-0/+0
| | | | llvm-svn: 204198
* Move tests that require ARM to an ARM test directory.Jim Grosbach2014-03-182-0/+70
| | | | llvm-svn: 204197
* Darwin: Add assembler directives to create version-min load commands.Jim Grosbach2014-03-182-0/+20
| | | | | | | | | | | | Allow object files to be tagged with a version-min load command for iOS or MacOSX. Teach macho-dump to understand the version-min load commands for testcases. rdar://11337778 llvm-svn: 204190
* llvm/test/MC/MachO/gen-dwarf-cpp.s: Relax an expression to match DOS pat.NAKAMURA Takumi2014-03-171-1/+1
| | | | llvm-svn: 204030
* DebugInfo: Improve reuse of file table entries in asm debug infoDavid Blaikie2014-03-171-0/+1
| | | | | | | | | | | | | | | | | The previous deduping strategy was woefully inadequate - it only considered the most recent file used and avoided emitting a duplicate in that case - never considering the a/b/a scenario. It was also lacking when it came to directory paths as the previous filename would never match the current if the filename had been split into file and directory components. This change builds caching functionality into the line table at the lowest level in an optional form (a file number of 0 indicates that one should be chosen and returned) and will eventually be reused by the normal source level debugging DWARF emission. llvm-svn: 204027
* Test caseDavid Blaikie2014-03-171-0/+6
| | | | llvm-svn: 204026
* Support DWARF discriminators in object streamer.Diego Novillo2014-02-142-10/+10
| | | | | | | | | | | | | | | Summary: This adds support for emitting DWARF path discriminator values in the object streamer. It also changes the DWARF dumper to show discriminator values in the line table output. Reviewers: echristo CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2794 llvm-svn: 201427
* Fix known typosAlp Toker2014-01-241-1/+1
| | | | | | | Sweep the codebase for common typos. Includes some changes to visible function names that were misspelt. llvm-svn: 200018
* Fixed a bug in getARMFixupKindMachOInfo() where three ARM fixup kindsKevin Enderby2013-12-131-0/+9
| | | | | | | | | | | were falling into the cases for 24-bit branch kinds which are not 24-bit branches. The routine is to return false for fixups are expected to always be resolvable at assembly time. Which these three fixups are as they have limited displacement and are for local references within a function. rdar://15586725 llvm-svn: 197282
* Fix a bug in darwin's 32-bit X86 handling of evaluating fixups. Kevin Enderby2013-12-041-0/+27
| | | | | | | | | | | | | | | Where it would use a scattered relocation entry but falls back to a normal relocation entry because the FixupOffset is more than 24-bits. The bug is in the X86MachObjectWriter::RecordScatteredRelocation() where it changes reference parameter FixedValue but then returns false to indicate it did not create a scattered relocation entry. The fix is simply to save the original value of the parameter FixedValue at the start of the method and restore it if we are returning false in that case. rdar://15526046 llvm-svn: 196432
* Add test I forgot to git add in r191824.Rafael Espindola2013-10-021-0/+17
| | | | llvm-svn: 191831
* Fixed a crash in the integrated assembler for Mach-O when a symbol differenceKevin Enderby2013-09-051-0/+38
| | | | | | | | | | | | | expression uses an assembler temporary symbol from an assignment.  In this case the symbol does not have a fragment so the use of getFragment() would be NULL and caused a crash. In the case of an assembler temporary symbol we want to use the AliasedSymbol (if any) which will create a local relocation entry, but if it is not an assembler temporary symbol then let it use that symbol with an external relocation entry. rdar://9356266 llvm-svn: 190096
* The darwin integrated assembler for X86 in 64-bit mode is not rejectingKevin Enderby2013-08-291-0/+5
| | | | | | | | | | | | 32-bit absolute addressing in instructions likei this: mov $_f, %rsi which is not supported in 64-bit mode. rdar://8827134 llvm-svn: 189543
* The integrated darwin assembler can hang in an infinite loop (or get an assert Kevin Enderby2013-08-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | with a debug build) with this buggy .indirect_symbol directive usage: % cat test.s x: .indirect_symbol _y The assertion is because it is trying to get the symbol index for the symbol _y when it is writing out the indirect symbol table. This line of code in MachObjectWriter::WriteObject() : Write32(Asm.getSymbolData(*it->Symbol).getIndex()); And while there is a symbol _y it does not have any getSymbolData set which is only done in MachObjectWriter::BindIndirectSymbols() for pointer sections or stub sections. I added a check and an error in there to catch this in case something slips through. But to get a better error the parser should detect when a .indirect_symbol directive is used and it is not in a pointer section or stub section. To make that work I moved the handling of the indirect symbol out of the target independent AsmParser code into the DarwinAsmParser code that can check for the proper Mach-O section types. rdar://14825505 llvm-svn: 189497
* [tests] Cleanup initialization of test suffixes.Daniel Dunbar2013-08-162-4/+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
* Fix a crash with X86 Mach-O and a subtraction expression where both symbols areKevin Enderby2013-08-121-0/+5
| | | | | | | | | undefined and produce an error message instead as this is a non-relocatable expression with X86 Mach-O. rdar://8920876 llvm-svn: 188218
* Using the integrated assembler we'd fail to change section to theEric Christopher2013-08-071-0/+33
| | | | | | | | | .tbss section for zerofill thread locals. Make sure we do this before emitting the zerofills. Fixes PR15972. llvm-svn: 187913
* Revert r15266. This fixes llvm.org/pr15266.Rafael Espindola2013-02-141-6/+6
| | | | llvm-svn: 175173
* [ms-inline asm] Add support for lexing binary integers with a [bB] suffix.Chad Rosier2013-02-121-6/+6
| | | | | | | | | | | | | | This is complicated by backward labels (e.g., 0b can be both a backward label and a binary zero). The current implementation assumes [0-9]b is always a label and thus it's possible for 0b and 1b to not be interpreted correctly for ms-style inline assembly. However, this is relatively simple to fix in the inline assembly (i.e., drop the [bB]). This patch also limits backward labels to [0-9]b, so that only 0b and 1b are ambiguous. Part of rdar://12470373 llvm-svn: 174983
* Now that llvm-dwarfdump supports flags to specify which DWARF section to dump,Eli Bendersky2013-01-254-4/+4
| | | | | | | use them in tests that run llvm-dwarfdump. This is in order to make tests as specific as possible. llvm-svn: 173498
* Add a warning when there is a macro defintion that has named parameters butKevin Enderby2013-01-221-0/+14
| | | | | | | | | | | | | the body does not use them and it appears the body has positional parameters. This can cause unexpected results as in the added test case. As the darwin version of gas(1) which only supported positional parameters, happened to ignore the named parameters. Now that we want to support both styles of macros we issue a warning in this specific case. rdar://12861644 llvm-svn: 173199
* Have the integrated assembler give an error if $1 is used as an identifier inKevin Enderby2013-01-221-0/+5
| | | | | | | | | an expression. Currently this bug causes the line to be ignored in a release build and an assert in a debug build. rdar://13062484 llvm-svn: 173195
* [MC/Mach-O] Load commands are supposed to 8-byte aligned on 64-bit.Daniel Dunbar2013-01-221-1/+9
| | | | llvm-svn: 173120
* [MC/Mach-O] Implement integrated assembler support for linker options.Daniel Dunbar2013-01-181-0/+35
| | | | | | - Also, fixup syntax errors in LangRef and missing newline in the MCAsmStreamer. llvm-svn: 172837
* [MC/Mach-O] Add support for linker options in Mach-O files.Daniel Dunbar2013-01-181-0/+25
| | | | llvm-svn: 172779
* [MC/Mach-O] Add AsmParser support for .linker_option directive.Daniel Dunbar2013-01-181-0/+21
| | | | llvm-svn: 172778
* We want the dwarf AT_producer for assembly source files to match clang'sKevin Enderby2013-01-161-0/+8
| | | | | | | | | | | | | | | AT_producer. Which includes clang's version information so we can tell which version of the compiler was used. This is the first of two steps to allow us to do that. This is the llvm-mc change to provide a method to set the AT_producer string. The second step, coming soon to a clang near you, will have the clang driver pass the value of getClangFullVersion() via an flag when invoking the integrated assembler on assembly source files. rdar://12955296 llvm-svn: 172630
* Correct ARM NOP encodingDavid Sehr2012-12-051-1/+1
| | | | | | | | | | The encoding of NOP in ARMAsmBackend.cpp is missing a trailing zero, which causes the emission of a coprocessor instruction rather than "mov r0, r0" as indicated in the comment. The test also checks for the wrong encoding. http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121203/157919.html llvm-svn: 169420
* Test commit.David Sehr2012-12-051-1/+1
| | | | llvm-svn: 169410
* A test in thid directory was not being run because lit.local.cfg didn'tEli Bendersky2012-12-041-1/+1
| | | | | | include .ll files. Fix that. llvm-svn: 169283
* The section is .debug_line.Eric Christopher2012-11-271-1/+1
| | | | llvm-svn: 168666
* Fix for PR14264 cause by commit r167237 which did not take into account aKevin Enderby2012-11-051-0/+17
| | | | | | | | possible buffer change with a .macro directive. rdar://12637628 llvm-svn: 167408
* Add support for generating dwarf debugging info with assembly filesKevin Enderby2012-11-011-0/+22
| | | | | | | | | | run through the 'C' preprocessor. That is pick up the file name and line numbers from the cpp hash file line comments for the dwarf file and line numbers tables. rdar://9275556 llvm-svn: 167237
* MachO: direct-to-object attribute for data-in-code markers.Jim Grosbach2012-10-012-1/+109
| | | | | | | | | | The target backend can support data-in-code load commands even when the assembler doesn't, or vice-versa. Allow targets to opt-in for direct-to-object. PR13973. llvm-svn: 164974
* X86_32: Large Symbol+Offset relocations.Jim Grosbach2012-09-261-0/+36
| | | | | | | | | | If the offset is more than 24-bits, it won't fit in a scattered relocation offset field, so we fall back to using a non-scattered relocation. rdar://12358909 llvm-svn: 164724
* ARM: Darwin BL/BLX relocations to out-of-range symbols.Jim Grosbach2012-09-251-0/+43
| | | | | | | | | | | When a BL/BLX references a symbol in the same translation unit that is out of range, use an external relocation. The linker will use this to generate a branch island rather than a direct reference, allowing the relocation to resolve correctly. rdar://12359919 llvm-svn: 164615
* Assembler: Darwin variables defined via .set are no-dead-strip.Jim Grosbach2012-09-131-0/+158
| | | | | | | | For gas compatibility. rdar://12219394 llvm-svn: 163854
* Add `.pushsection', `.popsection', and `.previous' directives to Darwin ASM.Bill Wendling2012-08-082-0/+29
| | | | | | | | | | | | | | | | | | | | There are situations where inline ASM may want to change the section -- for instance, to create a variable in the .data section. However, it cannot do this without (potentially) restoring to the wrong section. E.g.: asm volatile (".section __DATA, __data\n\t" ".globl _fnord\n\t" "_fnord: .quad 1f\n\t" ".text\n\t" "1:" :::); This may be wrong if this is inlined into a function that has a "section" attribute. The user should use `.pushsection' and `.popsection' here instead. The addition of `.previous' is added for completeness. <rdar://problem/12048387> llvm-svn: 161477
* Fix a bug in ARMMachObjectWriter::RecordRelocation() in ARMMachObjectWriter.cppKevin Enderby2012-07-301-0/+44
| | | | | | | | | where the other_half of the movt and movw relocation entries needs to get set and only with the 16 bits of the other half. rdar://10038370 llvm-svn: 160978
* Refactor data-in-code annotations.Jim Grosbach2012-05-181-0/+33
| | | | | | | | | | | | | | | | | | | | | | Use a dedicated MachO load command to annotate data-in-code regions. This is the same format the linker produces for final executable images, allowing consistency of representation and use of introspection tools for both object and executable files. Data-in-code regions are annotated via ".data_region"/".end_data_region" directive pairs, with an optional region type. data_region_directive := ".data_region" { region_type } region_type := "jt8" | "jt16" | "jt32" | "jta32" end_data_region_directive := ".end_data_region" The previous handling of ARM-style "$d.*" labels was broken and has been removed. Specifically, it didn't handle ARM vs. Thumb mode when marking the end of the section. rdar://11459456 llvm-svn: 157062
* Fixed a bug in llvm-objdump when disassembling using -macho option for a binaryKevin Enderby2012-05-181-0/+5
| | | | | | containing no symbols. Fixed the crash and fixed it not disassembling anything. llvm-svn: 157031
* Add a test case for r156840, a fix to llvm-objdump when disassembling usingKevin Enderby2012-05-151-0/+20
| | | | | | -macho to disassemble the last symbol to the end of the section. llvm-svn: 156850
* Fix issues with the ARM bl and blx thumb instructions and the J1 and J2 bitsKevin Enderby2012-05-031-0/+19
| | | | | | | | | for the assembler and disassembler. Which were not being set/read correctly for offsets greater than 22 bits in some cases. Changes to lib/Target/ARM/ARMAsmBackend.cpp from Gideon Myles! llvm-svn: 156118
* Continue cleanup of LIT, getting rid of the remaining artifacts from dejagnuEli Bendersky2012-03-252-16/+2
| | | | | | | | | | | | | | * 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 llvm-svn: 153408
* ARM non-scattered MachO relocations for movw/movt.Jim Grosbach2012-03-201-0/+23
| | | | | | | | Needed when building -mdynamic-no-pic code. rdar://10459256 llvm-svn: 153097
OpenPOWER on IntegriCloud