summaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86TargetObjectFile.cpp
Commit message (Collapse)AuthorAge
* Move getSymbol to TargetLoweringObjectFile.Rafael Espindola2013-10-29
| | | | | | This allows constructing a Mangler with just a TargetMachine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193630 91177308-0d34-0410-b5e6-96231b3b80d8
* [DebugInfo] Allow getDebugThreadLocalSymbol to return MCExprUlrich Weigand2013-07-02
| | | | | | | | | | | | | This allows getDebugThreadLocalSymbol to return a generic MCExpr instead of just a MCSymbolRefExpr. This is in preparation for supporting debug info for TLS variables on PowerPC, where we need to describe the variable location using a more complex expression than just MCSymbolRefExpr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185460 91177308-0d34-0410-b5e6-96231b3b80d8
* PR16493: DebugInfo with TLS on PPC crashing due to invalid relocationDavid Blaikie2013-07-01
| | | | | | | | Restrict the current TLS support to X86 ELF for now. Test that we don't produce it on PPC & we can flesh that test case out with the right thing once someone implements it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185389 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove heavy and unused #inclues from X86TargetObjectFile.cpp.Jakub Staszak2013-01-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172151 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-03
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
* Use TARGET2 relocation for TType references on ARM.Anton Korobeynikov2012-11-14
| | | | | | | | | Do some cleanup of the code while here. Inspired by patch by Logan Chien! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167904 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename to match other X86_64* names.Bill Wendling2012-06-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159196 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the support for using .init_array from ARM to the genericRafael Espindola2012-06-19
| | | | | | | | | | TargetLoweringObjectFileELF. Use this to support it on X86. Unlike ARM, on X86 it is not easy to find out if .init_array should be used or not, so the decision is made via TargetOptions and defaults to off. Add a command line option to llc that enables it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158692 91177308-0d34-0410-b5e6-96231b3b80d8
* Prune some includesCraig Topper2012-03-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153502 91177308-0d34-0410-b5e6-96231b3b80d8
* Emacs-tag and some comment fix for all ARM, CellSPU, Hexagon, MBlaze, ↵Jia Liu2012-02-18
| | | | | | MSP430, PPC, PTX, Sparc, X86, XCore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150878 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
* Remove an unused variable from this function introduced in r130637,Chandler Carruth2011-05-01
| | | | | | likely a result of copy/paste. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130640 91177308-0d34-0410-b5e6-96231b3b80d8
* GCC uses a different encoding of pointers in the FDE when usingRafael Espindola2011-05-01
| | | | | | -fno-dwarf2-cfi-asm. Implement the same behavior. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130637 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unnecessary argument.Rafael Espindola2011-04-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130343 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename getPersonalityPICSymbol to getCFIPersonalitySymbol, document it, andRafael Espindola2011-04-27
| | | | | | | | | | | | | | | | | | give it a bit more responsibility. Also implement it for MachO. If hacked to use cfi, 32 bit MachO will produce .cfi_personality 155, L___gxx_personality_v0$non_lazy_ptr and 64 bit will produce .cfi_presonality ___gxx_personality_v0 The general idea is that .cfi_personality gets passed the final symbol. It is up to codegen to produce it if using indirect representation (like 32 bit MachO), but it is up to MC to decide which relocations to create. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130341 91177308-0d34-0410-b5e6-96231b3b80d8
* Compute the size of the FDE encoding instead of hard coding it. UpdateRafael Espindola2011-04-22
| | | | | | X8664_ELFTargetObjectFile::getFDEEncoding to match reality. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129959 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Allow modifiers in MCSymbolRefExpr, and eliminate X86MCTargetExpr.Daniel Dunbar2010-03-15
| | | | | | | - Although it would be nice to allow this decoupling, the assembler needs to be able to reason about MCSymbolRefExprs in too many places to make this viable. We can use a target specific encoding of the variant if this becomes an issue. - This patch also extends llvm-mc to support parsing of the modifiers, as opposed to lumping them in with the symbol. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98592 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that the default for Darwin platforms is to place the LSDA into the TEXTBill Wendling2010-03-15
| | | | | | | section, remove the target-specific code that performs this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98580 91177308-0d34-0410-b5e6-96231b3b80d8
* use Mang->getSymbol() Chris Lattner2010-03-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98578 91177308-0d34-0410-b5e6-96231b3b80d8
* Place the LSDA into the TEXT section for x86 Darwin. If the global it's pointingBill Wendling2010-03-15
| | | | | | | | | | | | to is local to the translation unit, we need to place fill the value of that symbol into the non-lazy pointer. This should conclude all Darwin changes for placing the LSDA into the TEXT section. There is some cleanup to do. I.e., there's no longer a special need for target-specific code here. But that can come later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98564 91177308-0d34-0410-b5e6-96231b3b80d8
* rename getSymbolForDwarf* to getExprForDwarf* since it returnsChris Lattner2010-03-11
| | | | | | | | | | | an MCExpr and not an MCSymbol. Change it to take an MCStreamer, which is currently unused. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98278 91177308-0d34-0410-b5e6-96231b3b80d8
* set the temporary bit on MCSymbols correctly.Chris Lattner2010-03-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98124 91177308-0d34-0410-b5e6-96231b3b80d8
* It turned out that we failed to emit proper symbol stubs on non-x86/darwin ↵Anton Korobeynikov2010-02-21
| | | | | | | | | for ages (we emitted a reference to a stub, but no stub was emitted). The code inside x86-32/macho target objfile lowering should actually be the generic one - move it there. This (I really, really hope) should fix EH issues on ppc/darwin and arm/darwin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96755 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert Anton's most recent EH patch (r96637), since it breaks a lot ofBob Wilson2010-02-19
| | | | | | | ARM and Thumb tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96680 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the same encoding for EH stuff uniformly on all MachO targets.Anton Korobeynikov2010-02-19
| | | | | | This hopefulyl should unbreak EH on PPC/Darwin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96637 91177308-0d34-0410-b5e6-96231b3b80d8
* Use pointer-wide encoding for LSDA and FDE on Darwin.Anton Korobeynikov2010-02-17
| | | | | | Hopefully, this will fix the remaining issues seen there. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96454 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a silly darwin-only typo introduced during merge.Anton Korobeynikov2010-02-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96289 91177308-0d34-0410-b5e6-96231b3b80d8
* Preliminary patch to improve dwarf EH generation - Hooks to return ↵Anton Korobeynikov2010-02-15
| | | | | | Personality / FDE / LSDA / TType encoding depending on target / options (e.g. code model / relocation model) - MCIzation of Dwarf EH printer to use encoding information - Stub generation for ELF target (needed for indirect references) - Some other small changes here and there git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96285 91177308-0d34-0410-b5e6-96231b3b80d8
* switch ELF @GOTOFF references to use X86MCTargetExpr.Chris Lattner2010-02-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95593 91177308-0d34-0410-b5e6-96231b3b80d8
* add an x86 implementation of MCTargetExpr forChris Lattner2010-02-08
| | | | | | | | representing @GOT and friends. Use it for personality references as a first use. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95588 91177308-0d34-0410-b5e6-96231b3b80d8
* make MachineModuleInfoMachO hold non-const MCSymbol*'s insteadChris Lattner2010-02-03
| | | | | | | | of const ones. non-const ones aren't very useful, because you can't even, say, emit them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95205 91177308-0d34-0410-b5e6-96231b3b80d8
* move the mangler into libtarget from vmcore.Chris Lattner2010-01-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93664 91177308-0d34-0410-b5e6-96231b3b80d8
* Make a new X8632_MachoTargetObjectFile TLOF implementation whose Chris Lattner2009-09-18
| | | | | | | | | | | | | | | | | | | | | | | getSymbolForDwarfGlobalReference is smart enough to know that it needs to register the stub it references with MachineModuleInfoMachO, so that it gets emitted at the end of the file. Move stub emission from X86ATTAsmPrinter::doFinalization to the new X86ATTAsmPrinter::EmitEndOfAsmFile asmprinter hook. The important thing here is that EmitEndOfAsmFile is called *after* the ehframes are emitted, so we get all the stubs. This allows us to remove a gross hack from the asmprinter where it would "just know" that it needed to output stubs for personality functions. Now this is all driven from a consistent interface. The testcase change is just reordering the expected output now that the stubs come out after the ehframe instead of before. This also unblocks other changes that Bill wants to make. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82269 91177308-0d34-0410-b5e6-96231b3b80d8
* pass machinemoduleinfo down into getSymbolForDwarfGlobalReference, Chris Lattner2009-09-17
| | | | | | | currently unused. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82157 91177308-0d34-0410-b5e6-96231b3b80d8
* Big change #1 for personality function references:Chris Lattner2009-09-16
Eliminate the PersonalityPrefix/Suffix & NeedsIndirectEncoding fields from MAI: they aren't part of the asm syntax, they are related to the structure of the object file. To replace their functionality, add a new TLOF::getSymbolForDwarfGlobalReference method which asks targets to decide how to reference a global from EH in a pc-relative way. The default implementation just returns the symbol. The default darwin implementation references the symbol through an indirect $non_lazy_ptr stub. The bizarro x86-64 darwin specialization handles the weird "foo@GOTPCREL+4" hack. DwarfException.cpp now uses this to emit the reference to the symbol in the right way, and this also eliminates another horrible hack from DwarfException.cpp: - if (strcmp(MAI->getPersonalitySuffix(), "+4@GOTPCREL")) - O << "-" << MAI->getPCSymbol(); git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81991 91177308-0d34-0410-b5e6-96231b3b80d8