summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/MachO
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix flags for test in MC/MachO/ARM/empty-function-nop.llRichard Trieu2012-03-011-4/+4
| | | | llvm-svn: 151778
* ARM implement TargetInstrInfo::getNoopForMachoTarget()Jim Grosbach2012-02-281-0/+15
| | | | | | | | | | | | | | Without this hook, functions w/ a completely empty body (including no epilogue) will cause an MCEmitter assertion failure. For example, define internal fastcc void @empty_function() { unreachable } rdar://10947471 llvm-svn: 151673
* Replace all instances of dg.exp file with lit.local.cfg, since all tests are ↵Eli Bendersky2012-02-164-11/+26
| | | | | | | | 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. llvm-svn: 150664
* Fixed a crash in llvm-mc for Mach-O when a symbol difference expression uses aKevin Enderby2012-01-311-0/+27
| | | | | | | | | symbol from an assignment. In this case the symbol did not have a fragment so MCObjectWriter::IsSymbolRefDifferenceFullyResolved() should not have been calling IsSymbolRefDifferenceFullyResolvedImpl() with a NULL fragment and should just have returned false in that case. llvm-svn: 149442
* ARM Darwin symbol ref differences w/o subsection-via-symbols.Jim Grosbach2012-01-241-0/+18
| | | | | | | | When not using subsections via symbols, the assembler can resolve symbol differences (including pcrel references) to non-local labels at assembly time, not just those in the same atom. llvm-svn: 148865
* Add testcase.Jim Grosbach2012-01-191-0/+13
| | | | llvm-svn: 148454
* Thumb2 relaxation for LDR(literal).Jim Grosbach2012-01-181-0/+13
| | | | | | | | | If the fixup is out of range for the Thumb1 instruction, relax it to the Thumb2 encoding instead. rdar://10711829 llvm-svn: 148424
* MC tweak symbol difference resolution for non-local symbols.Jim Grosbach2012-01-173-5/+7
| | | | | | | | | | | | | | When the non-local symbol in the expression is in the same fragment as the second symbol, the assembler can still evaluate the expression without needing a relocation. For example, on ARM: _foo: ldr lr, (_foo - 4) rdar://10348687 llvm-svn: 148341
* Tidy up.Jim Grosbach2012-01-171-2/+2
| | | | llvm-svn: 148339
* Various crash reporting tools have a problem with the dwarf generated forKevin Enderby2012-01-101-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | assembly source when it generates the TAG_subprogram dwarf debug info for the labels that have nothing between them as in this bit of assembly source: % cat ZeroLength.s _func1: _func2: nop One solution would be to not emit the subsequent labels with the same address and use the next label with a different address or the end of the section for the AT_high_pc value of the TAG_subprogram. Turns out in llvm-mc it is not possible in all cases to determine of two symbols have the same value at the point we put out the TAG_subprogram dwarf debug info. So we will have llvm-mc instead of putting out TAG_subprogram's put out DW_TAG_label's. And the DW_TAG_label does not have a AT_high_pc value which avoids the problem. This commit is only the functional change to make the diffs clear as to what is really being changed. The next commit will be to clean up the names of such things like MCGenDwarfSubprogramEntry to something like MCGenDwarfLabelEntry. rdar://10666925 llvm-svn: 147860
* Don't rely on a particular version string for llvm.Nick Lewycky2011-12-131-1/+1
| | | | llvm-svn: 146456
* Don't assume things about the exact details of the LLVM version number,Chandler Carruth2011-12-101-1/+1
| | | | | | such as what VCS information is attached. llvm-svn: 146333
* The second part of support for generating dwarf for assembly source files. ThisKevin Enderby2011-12-091-0/+113
| | | | | | | | | | generates the dwarf Compile Unit DIE and a dwarf subprogram DIE for each non-temporary label. The next part will be to get the clang driver to enable this when assembling a .s file. rdar://9275556 llvm-svn: 146262
* Darwin assembler improved relocs when w/o subsections_via_symbols.Jim Grosbach2011-12-073-1/+7
| | | | | | | | When the file isn't being built with subsections-via-symbols, symbol differences involving non-local symbols can be resolved more aggressively. Needed for gas compatibility. llvm-svn: 146054
* Tidy up. Move MachO tests to MachO directory.Jim Grosbach2011-12-077-0/+371
| | | | llvm-svn: 146038
* test/MC: Introduce MC/MachO/ARM, and relocate relax-thumb2-branches.s into it.NAKAMURA Takumi2011-12-062-0/+19
| | | | | FIXME: Restore more other arch-dependent MachO tests. (eg. r126401 and r133856) llvm-svn: 145925
* test/MC: Move relax-thumb2-branches.s from MC/MachO/ to MC/ARM.NAKAMURA Takumi2011-12-061-14/+0
| | | | | | MC/MachO assumes x86. llvm-svn: 145916
* Fix ARM handling of tBcc branch relaxation.Jim Grosbach2011-12-061-0/+14
| | | | | | rdar://10069056 llvm-svn: 145885
* Fixed a bug in the code to create a dwarf file and directory table entires whenKevin Enderby2011-11-011-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | it is separating the directory part from the basename of the FileName. Noticed that this: .file 1 "dir/foo" when assembled got the two parts switched. Using the Mac OS X dwarfdump tool it can be seen easily: % dwarfdump -a a.out include_directories[ 1] = 'foo' Dir Mod Time File Len File Name ---- ---------- ---------- --------------------------- file_names[ 1] 1 0x00000000 0x00000000 dir ... Which should be: ... include_directories[ 1] = 'dir' Dir Mod Time File Len File Name ---- ---------- ---------- --------------------------- file_names[ 1] 1 0x00000000 0x00000000 foo llvm-svn: 143521
* Fix a Darwin x86_64 special case of a jmp to a temporary symbol from an atomKevin Enderby2011-09-081-0/+58
| | | | | | without a base symbol that must not have a relocation entry. llvm-svn: 139316
* Some autoconf tests use module level inline asm to test compiler's handling ofEvan Cheng2011-08-241-3/+12
| | | | | | | | | | | | | | | | .cfi_startproc. e.g. libffi: $ cat confopt.c asm (".cfi_startproc\n\t.cfi_endproc"); int main () { return 0; } Teach MC / dwarf emission to handle these cfi directives which essentially create an empty frame. rdar://10017184 llvm-svn: 138504
* MachOWriter: Don't crash on fixups with arithmetic, emit a relocation ↵Benjamin Kramer2011-08-121-0/+21
| | | | | | instead. This matches what as does. llvm-svn: 137414
* Move ARM-specific test to ARM directory.Jim Grosbach2011-06-251-17/+0
| | | | | | Hopefully make the x86-target-only Windows bots happy. llvm-svn: 133856
* Testcase for r133818Jim Grosbach2011-06-241-0/+17
| | | | llvm-svn: 133823
* On MachO, unlike ELF, there should be no relocation to produce the CIE pointer.Rafael Espindola2011-05-101-0/+38
| | | | llvm-svn: 131149
* MCAsmLayout: Add support for computing the symbol offset of variables. NotDaniel Dunbar2011-04-291-0/+8
| | | | | | currently used, because variables don't get reported as being "defined". llvm-svn: 130524
* MC: Change variable symbols to be recognized as defined, by assigning their ↵Daniel Dunbar2011-04-291-0/+446
| | | | | | sections based on FindAssociatedSection(). llvm-svn: 130523
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-151-1/+1
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129558
* MC: Add support for disabling "temporary label" behavior. Useful for debuggingDaniel Dunbar2011-03-281-0/+33
| | | | | | on Darwin. llvm-svn: 128430
* MC/Mach-O: Fix regression introduced in r126127, this assignment shouldn't haveDaniel Dunbar2011-03-171-0/+7
| | | | | | been removed. llvm-svn: 127812
* Move arch specific tests in arch specific directories.Devang Patel2011-02-242-310/+0
| | | | llvm-svn: 126401
* MC/Mach-O/Thumb: Set the thumb bit in the symbol table.Daniel Dunbar2010-12-291-1/+1
| | | | llvm-svn: 122630
* MC/Mach-O/Thumb: Select appropriate relocation types for Thumb.Daniel Dunbar2010-12-271-1/+1
| | | | llvm-svn: 122583
* MC/Mach-O/ARM: Start handling some Thumb branches.Daniel Dunbar2010-12-241-0/+139
| | | | llvm-svn: 122547
* MC/Mach-O/ARM: Don't try to use scattered relocs for BR24 fixups.Daniel Dunbar2010-12-221-24/+38
| | | | llvm-svn: 122441
* Add reduced test from 8845.Rafael Espindola2010-12-221-0/+25
| | | | llvm-svn: 122438
* MC/Mach-O/ARM: We always use the SECTDIFF reloc type on ARM, which isDaniel Dunbar2010-12-221-17/+72
| | | | | | esp. important given that the LOCAL_SECTDIFF enumeration got redefined. llvm-svn: 122412
* MC/Mach-O/ARM: Add enough relocation logic to get BR24 relocations.Daniel Dunbar2010-12-221-0/+102
| | | | llvm-svn: 122407
* MC/Expr: Implemnt more aggressive folding during symbol evaluation usingDaniel Dunbar2010-12-171-0/+129
| | | | | | | | | | | | | | | | IsSymbolRefDifferenceFullyResolved(). For example, we will now fold away something like: -- _a: ... L0: ... L1: ... .long (L1 - L0) / 2 -- llvm-svn: 122043
* Relax alignment fragments.Rafael Espindola2010-12-151-5/+5
| | | | | | | | | | | With this we don't need the EffectiveSize field anymore. Without that field LayoutFragment only updates offsets and we don't need to invalidate the current fragment when it is relaxed (only the ones following it). This is also a very small improvement in the accuracy of the layout info as we now use the after relaxation size immediately. llvm-svn: 121857
* Patch by David Meyer to avoid a O(N^2) behaviour when relaxing fragments.Rafael Espindola2010-12-151-5/+5
| | | | | | | Since we now don't update addresses so early, we might relax a bit more than we need to. This is simillar to the issue in PR8467. llvm-svn: 121856
* Fix absolute recording of differences of symbols in two sections. Reduced ↵Rafael Espindola2010-12-071-0/+64
| | | | | | from ctor_dtor_count-2.cpp. llvm-svn: 121152
* Fix relocations with weak definitions.Rafael Espindola2010-12-071-0/+141
| | | | llvm-svn: 121114
* Fix pcrel relocations that cross sections.Rafael Espindola2010-12-071-0/+107
| | | | llvm-svn: 121107
* Fix a crash reduced from gcc produced assembly.Rafael Espindola2010-12-071-0/+122
| | | | llvm-svn: 121085
* Second try at making direct object emission produce the same resultsRafael Espindola2010-12-061-2/+2
| | | | | | | as llc + llvm-mc. This time ELF is not changed and I tested that llvm-gcc bootstrap on darwin10 using darwin9's assembler and linker. llvm-svn: 121006
* There are two reasons why we might want to useRafael Espindola2010-12-041-1/+1
| | | | | | | | | | | | | | | | foo = a - b .long foo instead of just .long a - b First, on darwin9 64 bits the assembler produces the wrong result. Second, if "a" is the end of the section all darwin assemblers (9, 10 and mc) will not consider a - b to be a constant but will if the dummy foo is created. Split how we handle these cases. The first one is something MC should take care of. The second one has to be handled by the caller. llvm-svn: 120889
* Next step: Only pad debug_line when the target is darwin. Add a FIXME to avoidRafael Espindola2010-12-041-0/+25
| | | | | | | | | | | doing that if the target is darwin10 or newer. This fixes *) Direct object emission was producing objects without the workaround on darwin9. *) Assembly printing was producing objects with the workaround on linux. llvm-svn: 120866
* macho-dump: Fix typo.Daniel Dunbar2010-11-2728-29/+29
| | | | llvm-svn: 120185
* Use multiple 0x66 prefixes so that all nops up to 15 bytes are a single ↵Rafael Espindola2010-11-251-1/+1
| | | | | | instruction. llvm-svn: 120147
OpenPOWER on IntegriCloud