summaryrefslogtreecommitdiff
path: root/lib/MC/MCDwarf.cpp
Commit message (Collapse)AuthorAge
* Add support for .cfi_register now that it is easy to extent the representationRafael Espindola2012-11-25
| | | | | | | to support it. Original patch with the parsing and plumbing by the PaX team and Roman Divacky. I added the bits in MCDwarf.cpp and the test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168565 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the representation of MCCFIInstruction.Rafael Espindola2012-11-24
| | | | | | | We now store the Register and Offset directly. MachineLocation is gone (from this file)! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168536 91177308-0d34-0410-b5e6-96231b3b80d8
* Give each MCCFIInstruction its own opcode.Rafael Espindola2012-11-24
| | | | | | | This untangles the switch cases of the old Move and RelMove opcodes a bit and makes it clear how to add new instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168534 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor how MCCFIInstructions are created.Rafael Espindola2012-11-24
| | | | | | | | | | Give MCCFIInstruction a single, private constructor and add helper static methods that create each type of cfi instruction. This is is preparation for changing its representation. The representation with a pair MachineLocations older than MC and has been abused quiet a bit to support more cfi instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168532 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement .cfi_undefined. Based on a patch from PaX team, updated byRafael Espindola2012-11-23
| | | | | | Roman Divacky. I just added the testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168520 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit relocations from .debug_aranges to .debug_info for asm filesAlexey Samsonov2012-11-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167926 91177308-0d34-0410-b5e6-96231b3b80d8
* Release build: guard dump functions withManman Ren2012-09-12
| | | | | | | | | "#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)" No functional change. Update r163344. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163679 91177308-0d34-0410-b5e6-96231b3b80d8
* Release build: guard dump functions with "ifndef NDEBUG"Manman Ren2012-09-06
| | | | | | | No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163344 91177308-0d34-0410-b5e6-96231b3b80d8
* When emitting the PC range in an FDE, use the same data encoding for both endsNick Lewycky2012-08-12
| | | | | | | of the range. Fixes PR13581! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161739 91177308-0d34-0410-b5e6-96231b3b80d8
* Move [SU]LEB128 encoding to a utility header.Jim Grosbach2012-08-08
| | | | | | | These functions are very generic. There's no reason for them to be tied to MCObjectWriter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161545 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo (the the => the)Sylvestre Ledru2012-07-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160621 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a FIXME: DwarfRequiresRelocationForSectionOffset is the same asRafael Espindola2012-06-22
| | | | | | DwarfUsesRelocationsAcrossSections. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158992 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up. Trailing whitespace.Jim Grosbach2012-05-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156602 91177308-0d34-0410-b5e6-96231b3b80d8
* Compute hashes directly with hash_combine instead of taking a detour through ↵Benjamin Kramer2012-04-11
| | | | | | FoldingSetNodeID. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154495 91177308-0d34-0410-b5e6-96231b3b80d8
* On ELF, create relocations to the abbreviation and line sections when producingRafael Espindola2012-02-28
| | | | | | | | | | debug info for assembly files. We were already doing the right thing when producing debug info for C/C++. ELF linkers don't know dwarf, so they depend on these relocations to produce valid dwarf output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151655 91177308-0d34-0410-b5e6-96231b3b80d8
* Grammar-o.Eric Christopher2012-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151418 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert assert(0) to llvm_unreachableCraig Topper2012-02-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149967 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for .cfi_signal_frame. Fixes pr11762.Rafael Espindola2012-01-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148733 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing breaks to switch.Benjamin Kramer2012-01-20
| | | | | | Found by the clang static analyzer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148543 91177308-0d34-0410-b5e6-96231b3b80d8
* This is the matching change for the data structure name changes for theKevin Enderby2012-01-10
| | | | | | | | functional change in r147860 to use DW_TAG_label's instead TAG_subprogram's. This only changes names and updates comments. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147877 91177308-0d34-0410-b5e6-96231b3b80d8
* Various crash reporting tools have a problem with the dwarf generated forKevin Enderby2012-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147860 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement cfi_restore. Patch by Brian Anderson!Rafael Espindola2011-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147356 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename Remember and Restore to RememberState and RestoreState for consistency.Rafael Espindola2011-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147354 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement .cfi_escape. Patch by Brian Anderson!Rafael Espindola2011-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147352 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-re-enable compact unwind after fixing a failure in ↵Bill Wendling2011-12-15
| | | | | | SingleSource/Benchmarks/Shootout-C++/except.cpp and friends. It was encoding the stored registers in the wrong order. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146617 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable to review some failures.Bill Wendling2011-12-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146545 91177308-0d34-0410-b5e6-96231b3b80d8
* The second part of support for generating dwarf for assembly source files. ThisKevin Enderby2011-12-09
| | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146262 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-enable compact unwind. It seems to work now. <rdar://problem/10441838>Bill Wendling2011-12-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145977 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable generation of compact unwind encodings. <rdar://problem/10441578>Bob Wilson2011-11-14
| | | | | | | This still seems to be causing some failures. It needs more testing before it gets enabled again. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144543 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove FIXME comment that should have been removed with r144351.Bob Wilson2011-11-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144392 91177308-0d34-0410-b5e6-96231b3b80d8
* Reenable compact unwinding now that <rdar://problem/10430076> is fixed.Bill Wendling2011-11-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144351 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable compact unwind generation until I can solve the codegen problems.Bill Wendling2011-11-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144346 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify code. No functionality change.Benjamin Kramer2011-11-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144186 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit the compact unwind *if* we have a compact unwind encoding.Bill Wendling2011-11-08
| | | | | | | *headdesk* git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144138 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify some uses of utohexstr.Benjamin Kramer2011-11-07
| | | | | | As a side effect hex is printed lowercase instead of uppercase now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144013 91177308-0d34-0410-b5e6-96231b3b80d8
* As a first step, emit both the compact unwind and CIE/FDEs for a function.Bill Wendling2011-09-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139152 91177308-0d34-0410-b5e6-96231b3b80d8
* Some autoconf tests use module level inline asm to test compiler's handling ofEvan Cheng2011-08-24
| | | | | | | | | | | | | | | | | .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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138504 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit the __compact_unwind section first. If there are any frames which weren'tBill Wendling2011-07-22
| | | | | | | emitted, emit them next as CIE/FDEs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135807 91177308-0d34-0410-b5e6-96231b3b80d8
* Goodbye TargetAsmInfo. This eliminate last bit of CodeGen and Target in llvm-mc.Evan Cheng2011-07-20
| | | | | | | | There is still a bit more refactoring left to do in Targets. But we are now very close to fixing all the layering issues in MC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135611 91177308-0d34-0410-b5e6-96231b3b80d8
* Add MCObjectFileInfo and sink the MCSections initialization code fromEvan Cheng2011-07-20
| | | | | | | | | TargetLoweringObjectFileImpl down to MCObjectFileInfo. TargetAsmInfo is done to one last method. It's *almost* gone! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135569 91177308-0d34-0410-b5e6-96231b3b80d8
* Micro-opt: Only emit compact unwind if there is a compact unwind encoding to ↵Bill Wendling2011-07-19
| | | | | | emit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135452 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the CompactUnwindEncoding from the Frame, if it's defined.Bill Wendling2011-07-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135451 91177308-0d34-0410-b5e6-96231b3b80d8
* Move getInitialFrameState from TargetFrameInfo to MCAsmInfo (suggestions forEvan Cheng2011-07-18
| | | | | | | better location welcome). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135438 91177308-0d34-0410-b5e6-96231b3b80d8
* Sink getDwarfRegNum, getLLVMRegNum, getSEHRegNum from TargetRegisterInfo downEvan Cheng2011-07-18
| | | | | | | | | | to MCRegisterInfo. Also initialize the mapping at construction time. This patch eliminate TargetRegisterInfo from TargetAsmInfo. It's another step towards fixing the layering violation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135424 91177308-0d34-0410-b5e6-96231b3b80d8
* Move some parts of TargetAsmInfo down to MCAsmInfo. This is not the greatestEvan Cheng2011-07-15
| | | | | | | | solution but it is a small step towards removing the horror that is TargetAsmInfo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135237 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove setting the bit for personality function. It should be set by the linker.Bill Wendling2011-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135236 91177308-0d34-0410-b5e6-96231b3b80d8
* Encode that we have a personality function.Bill Wendling2011-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135227 91177308-0d34-0410-b5e6-96231b3b80d8
* * If we have an LSDA, we need to mark it in the encoding.Bill Wendling2011-07-14
| | | | | | | * The personality function should be encoded as an absolute pointer to the function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135215 91177308-0d34-0410-b5e6-96231b3b80d8
* Unfortunately several files in MC are badly violating layering rule by usingEvan Cheng2011-07-14
| | | | | | | | | | TargetAsmInfo, which in turn pulls in TargetRegisterInfo, etc. :-( There are other cases of violations, but this is probably the worst. This patch is but one small step towards fixing this. 500 more steps to go. :-( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135131 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't emit the FDE end label if the last thing emitted was a compact unwind andBill Wendling2011-07-13
| | | | | | | not the FDE git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135020 91177308-0d34-0410-b5e6-96231b3b80d8