aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC/MCDwarf.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove unused argument.Rafael Espindola2011-04-211-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129955 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't pass address spaces to EmitULEB128IntValue.Rafael Espindola2011-04-211-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129953 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove LastOffset from the asm parser.Rafael Espindola2011-04-121-2/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129378 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the case of a .cfi_rel_offset before any .cfi_def_cfa_offset.Rafael Espindola2011-04-121-71/+103
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129362 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement .cfi_same_value.Rafael Espindola2011-04-121-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129361 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename TargetFrameInfo into TargetFrameLowering. Also, put couple of FIXMEs ↵Anton Korobeynikov2011-01-101-1/+1
| | | | | | and fixes here and there. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123170 91177308-0d34-0410-b5e6-96231b3b80d8
* Make a bunch of symbols internal.Benjamin Kramer2010-12-301-18/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122642 91177308-0d34-0410-b5e6-96231b3b80d8
* Correctly encode pcrel|indirect.Rafael Espindola2010-12-291-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122624 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug when trying to output uint16_t or uint32_t.Rafael Espindola2010-12-291-2/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122615 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement cfi_def_cfa. Also don't convert to dwarf reg numbers twice. LooksRafael Espindola2010-12-291-14/+25
| | | | | | like 6 is a fixed point of that and so the previous tests were OK :-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122614 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't produce a "DW_CFA_advance_loc 0".Rafael Espindola2010-12-281-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122609 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement .cfi_remember_state and .cfi_restore_state.Rafael Espindola2010-12-281-42/+68
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122602 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix warning about size potentially being used uninitializedDuncan Sands2010-12-281-1/+0
| | | | | | | when doing a release build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122594 91177308-0d34-0410-b5e6-96231b3b80d8
* Relax address updates in the eh_frame section.Rafael Espindola2010-12-281-6/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122591 91177308-0d34-0410-b5e6-96231b3b80d8
* Start adding basic support for emitting the call frame instructions.Rafael Espindola2010-12-281-1/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122590 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for .cfi_lsda.Rafael Espindola2010-12-271-45/+114
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122584 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the same encodings of the personality function that gnu asRafael Espindola2010-12-271-6/+45
| | | | | | supports. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122577 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix .cfi_personality on 32 bit systems.Rafael Espindola2010-12-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122570 91177308-0d34-0410-b5e6-96231b3b80d8
* Add basic support for .cfi_personality.Rafael Espindola2010-12-261-7/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122566 91177308-0d34-0410-b5e6-96231b3b80d8
* "Fix" FDE alignment to match what gas does.Rafael Espindola2010-12-171-9/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122006 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed version of 121434 with no new memory leaks.Rafael Espindola2010-12-101-12/+198
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121471 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert my previous patch to make the valgrind bots happy.Rafael Espindola2010-12-101-198/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121461 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial support for the cfi directives. This is just enough to getRafael Espindola2010-12-091-12/+198
| | | | | | | | | | | f: .cfi_startproc nop .cfi_endproc assembled (on ELF). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121434 91177308-0d34-0410-b5e6-96231b3b80d8
* Use const references.Rafael Espindola2010-12-091-10/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121426 91177308-0d34-0410-b5e6-96231b3b80d8
* Second try at making direct object emission produce the same resultsRafael Espindola2010-12-061-10/+3
| | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121006 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert previous two patches while I try to find out how to make bothRafael Espindola2010-12-061-2/+9
| | | | | | linux and darwin assemblers happy :-( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121004 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an EmitAbsValue helper method and use it in cases where we want to be sureRafael Espindola2010-12-061-9/+2
| | | | | | | that no relocations are used (on MochO). Fixes llc producing different output from llc + llvm-mc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121000 91177308-0d34-0410-b5e6-96231b3b80d8
* Remember the contents of leb and dwarfline fragments when relaxing. This avoidsRafael Espindola2010-12-041-8/+0
| | | | | | having to evaluate the expression again when writing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120920 91177308-0d34-0410-b5e6-96231b3b80d8
* There are two reasons why we might want to useRafael Espindola2010-12-041-3/+10
| | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120889 91177308-0d34-0410-b5e6-96231b3b80d8
* Next step: Only pad debug_line when the target is darwin. Add a FIXME to avoidRafael Espindola2010-12-041-3/+4
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120866 91177308-0d34-0410-b5e6-96231b3b80d8
* First step in fixing MC. Make it clear that we are avoiding a bug in theRafael Espindola2010-12-031-11/+8
| | | | | | | | | | | | | darwin9 linker, what is needed to avoid it and where to get more information. Also make the workaround simpler. Just the regular end_sequence we normally create is more than 4 bytes. Tested by building cctools and ld64 from darwin9 on a darwin10 system and using those. I checked that I was able to reproduce the bootstrap failure when the the workaround was disabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120854 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to resolve symbol differences early, and if successful create a plainRafael Espindola2010-12-031-52/+5
| | | | | | | data fragment. This reduces the time to assemble the test in 8711 from 60s to 54s. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120767 91177308-0d34-0410-b5e6-96231b3b80d8
* It may not be an option to skip .debug_line if there are file reference in ↵Devang Patel2010-12-031-1/+19
| | | | | | already emitted debug info. So, for now, emit dummy line table entry to make older linker and assemblers happy. This is not a new behavior, original AsmPrinter emitted similar line table entries. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120760 91177308-0d34-0410-b5e6-96231b3b80d8
* Use set directive for StartMinusEndExpr.Devang Patel2010-12-021-2/+2
| | | | | | | This is a fix for llvm-gcc-i386-darwin9 buildbot failure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120742 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some #includes.Rafael Espindola2010-11-221-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119967 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a MCLineSectionOrder vector so that we produce the line tables in aRafael Espindola2010-11-191-10/+15
| | | | | | deterministic order. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119795 91177308-0d34-0410-b5e6-96231b3b80d8
* Change some methods in MCDwarf.cpp to be able to handle an arbitraryRafael Espindola2010-11-191-24/+35
| | | | | | | | | | | | MCStreamer instead of just MCObjectStreamer. Address changes cannot be as efficient as we have to use DW_LNE_set_addres, but at least most of the logic is shared. This will be used so that, with CodeGen still using EmitDwarfLocDirective, llvm-gcc is able to produce debug_line sections without needing an assembler that supports .loc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119777 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the encoding of negative line deltas.Rafael Espindola2010-11-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118962 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove what looks like dead code in the production of debug lines.Rafael Espindola2010-11-121-45/+2
| | | | | | | | | We only produce debug line information if we have seen a line directive, so this code is dead. Also, if we want to be bug by bug compatible with gas and sometimes produce "empty" .debug_line sections, this will match the content produced by gas. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118914 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for expressions in .sleb/.uleb directives.Rafael Espindola2010-11-021-5/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118023 91177308-0d34-0410-b5e6-96231b3b80d8
* Incorporate suggestions by Daniel Dunbar after his review. Thanks Daniel!Kevin Enderby2010-10-041-1/+1
| | | | | | | | | | | | | | | | | | 1) Changed ValidateDwarfFileNumber() to isValidDwarfFileNumber() to be better named. Since it is just a predicate and isn't actually changing any state. 2) Added a missing return in the comments for setCurrentDwarfLoc() in include/llvm/MC/MCContext.h for fix formatting. 3) Changed clearDwarfLocSeen() to ClearDwarfLocSeen() since it does change state. 4) Simplified the last test in isValidDwarfFileNumber() to just a one line boolean test of MCDwarfFiles[FileNumber] != 0 for the final return statement. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115551 91177308-0d34-0410-b5e6-96231b3b80d8
* This is the last major patch to implement support for the .loc directiveKevin Enderby2010-09-301-0/+469
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and output the dwarf line number tables. This contains the code to emit and encode the dwarf line tables from the previously gathered information in the MCLineSection objects. This contains all the details to encode the line and address deltas into the dwarf line table. To do this an MCDwarfLineAddrFragment has been added. Also this moves the interface code out of Mach-O streamer into MCDwarf so it should be useable by other object file formats. There is now one call to be made from an MCObjectStreamer EmitInstruction() method: MCLineEntry::Make(this, getCurrentSection()); to create a line entry after each instruction is assembled. And one call call to be made from an MCObjectStreamer Finish() method: MCDwarfFileTable::Emit(this, DwarfLineSection); when getContext().hasDwarfFiles() is true and is passed a object file specific MCSection where to emit the dwarf file and the line tables. This appears to now be correct for 32-bit targets, at least x86. But the relocation entries for 64-bit Darwin needs some further work which is next up to work on. So for now the 64-bit Mach-O target does not output the dwarf file and line tables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115157 91177308-0d34-0410-b5e6-96231b3b80d8
* Added first bit of support for the dwarf .file directive. This patch collectsKevin Enderby2010-07-281-0/+21
the info from the .file directive and makes file and directory tables that will eventually be put out as part of the dwarf info in the output file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109651 91177308-0d34-0410-b5e6-96231b3b80d8