aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/MachO
Commit message (Collapse)AuthorAgeFilesLines
* MC/Mach-O/i386: Fix a crash in relocation handling.Daniel Dunbar2010-09-171-32/+36
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114176 91177308-0d34-0410-b5e6-96231b3b80d8
* Change section_data dumping to print hex numbers instead of usingRafael Espindola2010-09-1118-34/+34
| | | | | | python's %r. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113685 91177308-0d34-0410-b5e6-96231b3b80d8
* fix the encoding of the "jump on *cx" family of instructions,Chris Lattner2010-09-081-1/+1
| | | | | | | rdar://8061602 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113343 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/X86: Add aliases for Jcc variants.Kevin Enderby2010-05-271-0/+106
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104890 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a quick test of relocations.Eric Christopher2010-05-271-0/+174
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104794 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for initialized global data for darwin tls. Update commentsEric Christopher2010-05-251-87/+125
| | | | | | | and testcases accordingly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104635 91177308-0d34-0410-b5e6-96231b3b80d8
* A more combo tls testcase.Eric Christopher2010-05-191-0/+232
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104163 91177308-0d34-0410-b5e6-96231b3b80d8
* Few more simple tls testcases.Eric Christopher2010-05-193-0/+279
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104148 91177308-0d34-0410-b5e6-96231b3b80d8
* Quick test to make sure we're emitting the tbss section correctly.Eric Christopher2010-05-181-0/+114
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104063 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed the problem with a branch to "0b" that was not parsed by llvm-mcKevin Enderby2010-05-181-12/+15
| | | | | | | | correctly. The Lexer was incorrectly eating the newline casusing it to branch to address 0. Updated the test case to use a "0:" label and a branch to "0b". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104038 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O: Implement support for setting indirect symbol table offset in ↵Daniel Dunbar2010-05-181-0/+188
| | | | | | | | section header. Also, create symbol data for LHS of assignment, to match 'as' symbol ordering better. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104033 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support in MC for Directional Local Labels.Kevin Enderby2010-05-171-0/+92
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103989 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O/x86: Optimal nop sequences should only be used for the .text ↵Daniel Dunbar2010-05-171-7/+73
| | | | | | sections, not all sections in the text segment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103981 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O: Reverse order of SymbolData scanning when emitting instructions.Daniel Dunbar2010-05-171-0/+100
| | | | | | | - This fixes a string table mismatch with 'as' when two new symbols are defined in a single instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103979 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O: Fix some differences in symbol flag handling.Daniel Dunbar2010-05-171-29/+105
| | | | | | | | | | | | | - Don't clear weak reference flag, 'as' was only "trying" to do this, it wasn't actually succeeding. - Clear the "lazy bound" bit when we mark something external. This corresponds roughly to the lazy clearing of the bit that 'as' implements in symbol_table_lookup. - The exact meaning of these flags appears pretty loose, since 'as' isn't very consistent. For now we just try to match 'as', we will clean this up one day hopefully. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103964 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O/x86_64: Darwin's special "signed_N" relocation types should only beDaniel Dunbar2010-05-141-46/+52
| | | | | | used to replace a normal relocation, not a reference to a GOT entry. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103789 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O: Add another zerofill test to improve coverage.Daniel Dunbar2010-05-131-0/+109
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103691 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O/x86_64: Add a new hook for checking whether a particular section canDaniel Dunbar2010-05-121-66/+128
| | | | | | | | be diced into atoms, and adjust getAtom() to take this into account. - This fixes relocations to symbols in fixed size literal sections, for example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103532 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O/x86_64: Fix PCrel adjustment for x86_64, which was using the fixupDaniel Dunbar2010-05-111-78/+90
| | | | | | offset instead of the fixup address as intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103527 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O x86_64: Switch to using fragment atom symbol.Daniel Dunbar2010-05-111-22/+48
| | | | | | | | | - This eliminates getAtomForAddress() (which was a linear search) and simplifies getAtom(). - This also fixes some correctness problems where local labels at the same address as non-local labels could be assigned to the wrong atom. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103480 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O: Fix another mismatch with .weak_definition, we shouldn't use aDaniel Dunbar2010-05-101-25/+29
| | | | | | scattered relocation entry with a .weak_definition. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103443 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix i386 relocations to Weak Definitions. The relocation entries should beKevin Enderby2010-05-071-38/+56
| | | | | | | | external and the item to be relocated should not have the address of the symbol added in. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103302 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O: Mark absolute variable's appropriately, and add Mach-O support forDaniel Dunbar2010-05-051-15/+26
| | | | | | | writing them. - <rdar://problem/7885351> integrated assembler broken for i386 objc code git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103112 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O/x86_64: Relocations in debug sections should use local relocationsDaniel Dunbar2010-05-051-21/+56
| | | | | | | when possible. - <rdar://problem/7934873> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103092 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O/x86_64: Support @GOTPCREL on symbols, even for non-PCrel relocations!Daniel Dunbar2010-03-291-18/+53
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99853 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Fix refacto in MCExpr evaluation, I mistakenly replaced a fragment ↵Daniel Dunbar2010-03-251-24/+166
| | | | | | | | address with a symbol address. - This fixes the integrated-as nightly test regressions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99466 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O: Remove Darwin host specific tests, we don't need them anymore.Daniel Dunbar2010-03-203-758/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99100 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O: Tweak optimal_nop test to be host independent.Daniel Dunbar2010-03-202-6/+232
| | | | | | - This also avoids us running valgrind on /usr/bin/as, which has leaks. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99099 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed the encoding problems of the crc32 instructions. All had the Operand sizeKevin Enderby2010-03-191-0/+11
| | | | | | | | | | override prefix and only the r/m16 forms should have had that. Also for variant one, the AT&T syntax, added suffixes to all forms. Also added the missing 64-bit form for 'CRC32 r64, r/m8'. Plus added test cases for all forms and tweaked one test case to add the needed suffixes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98980 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O/x86_64: Add relocation support.Daniel Dunbar2010-03-193-0/+901
| | | | | | | | - This is "extraordinarily" Darwin 'as' compatible. See the litany of FIXMEs littered about for more information. - There are a few cases which seem to clearly be 'as' bugs which I have left unsupported, and there is one cases where we diverge but should fix if it blocks diffing .o files (Darwin 'as' ends up widening a jump unnecessarily). - 403.gcc build, runs, and diffs equivalently to the 'as' built version now (using llvm-mc). However, it builds so slowly that I wouldn't recommend trying it quite yet. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98974 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O: Factor out isScatteredFixupFullyResolvedSimple predicate, and fix ↵Daniel Dunbar2010-03-191-45/+73
| | | | | | some corner cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98924 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O/x86_64: Temporary labels in cstring sections require symbols (and ↵Daniel Dunbar2010-03-152-0/+2039
| | | | | | external relocations, but we don't have x86_64 relocations yet). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98583 91177308-0d34-0410-b5e6-96231b3b80d8
* xfail properlyChris Lattner2010-03-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98479 91177308-0d34-0410-b5e6-96231b3b80d8
* xfail these tests temporarily to get teh buildbots back to happy land.Chris Lattner2010-03-141-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98476 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/X86_64: Symbol support.Daniel Dunbar2010-03-131-144/+293
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98456 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O: Initial x86_64 support.Daniel Dunbar2010-03-132-7/+564
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98454 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O: PCrel relocations weren't using the right base address, they areDaniel Dunbar2010-03-131-0/+14
| | | | | | | relative to the fragment address, not its offset. This was masked by the text section normally being at address 0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98420 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O: Implement initial support for relaxation.Daniel Dunbar2010-03-122-0/+68
| | | | | | | | | | | | - The implementation is currently very brain dead and inefficient, but I have a clear plan on how to fix it. - The good news is, it works and correctly assembles 403.gcc (when built with Clang, at '-Os', '-Os -g', and '-O3'). Even better, at '-Os' and '-Os -g', the resulting binary is exactly equivalent to that when built with the system assembler. So it probably works! :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98396 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O: Implement "absolutizing" semantics of .set, by evaluating the ↵Daniel Dunbar2010-03-111-0/+71
| | | | | | assembly time value of variables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98241 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O: Use the SECTDIFF relocation type for (A - B + constant) where A ↵Daniel Dunbar2010-03-101-0/+55
| | | | | | | | is external. - I'm not sure why, but this is what 'as' does. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98115 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O: For PCrel relocations, we need to compensate for the PCrel ↵Daniel Dunbar2010-03-091-0/+62
| | | | | | adjustment when determining if we need a scattered relocation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98082 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Macho-O: Align the zerofill section itself to the maximum alignment.Daniel Dunbar2010-03-082-1/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97991 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O: Fix address compution for zero fill sections.Daniel Dunbar2010-03-081-0/+35
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97984 91177308-0d34-0410-b5e6-96231b3b80d8
* This is a patch to the assembler frontend to detect when aligning a textKevin Enderby2010-02-251-0/+156
| | | | | | | | | section with TextAlignFillValue and calls EmitCodeAlignment() instead of calling EmitValueToAlignment(). This allows x86 assembly code to be aligned with optimal nops. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97158 91177308-0d34-0410-b5e6-96231b3b80d8
* MCAssembler/Darwin: Add a test (on Darwin) that we assemble a bunch ofDaniel Dunbar2010-02-022-0/+555
| | | | | | instructions exactly like 'as', and produce equivalent .o files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95143 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O: Set SOME_INSTRUCTIONS bit for sections.Daniel Dunbar2010-02-021-0/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95135 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed MCSectionMachO::ParseSectionSpecifier to allow an attribute of "none" soKevin Enderby2009-10-071-39/+52
| | | | | | | | that a symbol stub section with no attributes can be parsed as in: .section __TEXT,__picsymbolstub4,symbol_stubs,none,16 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83488 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Support .comm emission.Daniel Dunbar2009-08-281-0/+114
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80351 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Support .zerofill emission.Daniel Dunbar2009-08-284-0/+501
| | | | | | - I'm still trying to figure out the cleanest way to implement this and match the assembler, currently there are some substantial differences. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80347 91177308-0d34-0410-b5e6-96231b3b80d8
* For now, only run MC tests if X86 is configured.Daniel Dunbar2009-08-271-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80213 91177308-0d34-0410-b5e6-96231b3b80d8