summaryrefslogtreecommitdiff
path: root/lib/MC
Commit message (Collapse)AuthorAge
...
* Correctly set the comdat symbol on COFF.Rafael Espindola2014-06-05
| | | | | | | | | | | | | | | | | | | | | We extended the .section syntax to allow multiple sections with the same name but different comdats, but currently we don't make sure that the output section has that comdat symbol. That happens to work with the code llc produces currently because it looks like .section secName, "dr", one_only, "COMDATSym" .globl COMDATSym COMDATSym: .... but that is not very friendly to anyone coding in assembly or even to llc once we get comdat support in the IR. This patch changes the coff object writer to make sure the comdat symbol is output just after the section symbol, as required by the coff spec. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210298 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix MIPS exception personality encoding.Logan Chien2014-05-30
| | | | | | | | | | For MIPS, we have to encode the personality routine with an indirect pointer to absptr; otherwise, some link warning warning will be raised, and the program might crash in some early MIPS Android device. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209907 91177308-0d34-0410-b5e6-96231b3b80d8
* MachO: support N_INDR aliases in assembly files.Tim Northover2014-05-30
| | | | | | | | | This makes LLVM create N_INDR aliases (to be resolved by the linker) when appropriate. rdar://problem/15125513 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209894 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips][mips64r6] Add Relocations R_MIPS_PCHI16, R_MIPS_PCLO16 Zoran Jovanovic2014-05-27
| | | | | | | Differential Revision: http://reviews.llvm.org/D3860 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209659 91177308-0d34-0410-b5e6-96231b3b80d8
* AArch64/ARM64: move ARM64 into AArch64's placeTim Northover2014-05-24
| | | | | | | | | | | | | | | This commit starts with a "git mv ARM64 AArch64" and continues out from there, renaming the C++ classes, intrinsics, and other target-local objects for consistency. "ARM64" test directories are also moved, and tests that began their life in ARM64 use an arm64 triple, those from AArch64 use an aarch64 triple. Both should be equivalent though. This finishes the AArch64 merge, and everyone should feel free to continue committing as normal now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209577 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: initialise MCAsmParser variableSaleem Abdulrasool2014-05-22
| | | | | | | Properly initialise HadError to false during construction. Detected as use-of-uninitialised variable by MSan! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209393 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: formalise some assertions into proper errorsSaleem Abdulrasool2014-05-22
| | | | | | | | | Now that clang can be used as an assembler via the IAS, invalid assembler inputs would cause the assertions to trigger. Although we cannot recover from the errors here, nor provide caret diagnostics, attempt to handle them slightly more gracefully by reporting a fatal error. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209387 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "DebugInfo: Don't put fission type units in comdat sections."David Blaikie2014-05-21
| | | | | | | | | This reverts commit r208930, r208933, and r208975. It seems not all fission consumers are ready to handle this behavior. Reverting until tools are brought up to spec. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209338 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: introduce ability to restrict recorded relocationsSaleem Abdulrasool2014-05-21
| | | | | | | | | Add support to allow a target specific COFF object writer to restrict the recorded resolutions in the emitted object files. This is motivated by the need in Windows on ARM, where an intermediate relocation needs to be prevented from being emitted in the object file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209336 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: loosen an overzealous assertionSaleem Abdulrasool2014-05-21
| | | | | | | | Permit active macro expansions when terminating the assembler if there were errors during the expansion. This would only trigger on invalid input when built with assertions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209309 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: mark COFF .drectve section as REMOVESaleem Abdulrasool2014-05-21
| | | | | | | | | The .drectve section should be marked as IMAGE_SCN_LNK_REMOVE. This matches what the MSVC toolchain does and accurately reflects that this section should not be emitted into the final binary. This section is merely information for the linker, comprising of additional linker directives. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209273 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the verbose asm option to be part of the options struct andEric Christopher2014-05-20
| | | | | | set appropriately. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209258 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix hardcoded slash to native path seperator which was exposed from ↵Yaron Keren2014-05-16
| | | | | | | | | | llvm::sys::path. http://reviews.llvm.org/D3687 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208980 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Add DwarfTypesDWOSection also to MCCOFF.NAKAMURA Takumi2014-05-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208975 91177308-0d34-0410-b5e6-96231b3b80d8
* Move more MC options into the MCTargetOptions structure.Eric Christopher2014-05-15
| | | | | | No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208932 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Don't put fission type units in comdat sections.David Blaikie2014-05-15
| | | | | | | | | Since type units in the dwo file are handled by a debug aware tool, they don't need to leverage the ELF comdat grouping to implement deduplication. Avoid creating all the .group sections for these as a space optimization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208930 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typosAlp Toker2014-05-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208839 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the TargetMachine MC options to MCTargetOptions. No functionalEric Christopher2014-05-15
| | | | | | change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208832 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the split function use StringRef::split.Eric Christopher2014-05-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208723 91177308-0d34-0410-b5e6-96231b3b80d8
* Check explicitly for EHABI and just use the default settings.Joerg Sonnenberger2014-05-13
| | | | | | | Code depends on the assembler and linker to fix things up... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208715 91177308-0d34-0410-b5e6-96231b3b80d8
* Move EmitDwarfAdvanceLineAddr and EmitDwarfAdvanceFrameAddr to the obj streamer.Rafael Espindola2014-05-12
| | | | | | This lets us delete the MCAsmStreamer implementation. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208570 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass a MCObjectStreamer instead of a MCStreamer when possible.Rafael Espindola2014-05-12
| | | | | | No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208569 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass a MCObjectStreamer instead of a MCStreamer when possible.Rafael Espindola2014-05-12
| | | | | | No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208567 91177308-0d34-0410-b5e6-96231b3b80d8
* Move EH/Debug frame handling to the object streamer.Rafael Espindola2014-05-12
| | | | | | | Now that the asm streamer doesn't use it, the MCStreamer doesn't need to know about it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208562 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove always true argument and unused field.Rafael Espindola2014-05-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208561 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove always true argument and field.Rafael Espindola2014-05-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208559 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove always true argument.Rafael Espindola2014-05-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208558 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove an always true argument.Rafael Espindola2014-05-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208557 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove write only field.Rafael Espindola2014-05-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208555 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove now empty method.Rafael Espindola2014-05-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208554 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the always true UseCFI member.Rafael Espindola2014-05-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208553 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the useCFI constructor argument to MCAsmStreamer.Rafael Espindola2014-05-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208551 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the UseCFI option from createAsmStreamer.Rafael Espindola2014-05-07
| | | | | | We were already always passing true, this just removes the option. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208205 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow using normal .eh_frame based unwinding on ARM. Use the sameJoerg Sonnenberger2014-05-07
| | | | | | | encodings as x86. Use this exception model for NetBSD. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208166 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a range based for loop for the SubtargetFeatures print function.Eric Christopher2014-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208132 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix odd formatting that snuck into last patch.Eric Christopher2014-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208130 91177308-0d34-0410-b5e6-96231b3b80d8
* ArrayRef-ize the Feature and Processor tables for SubtargetFeatures.Eric Christopher2014-05-06
| | | | | | | | This removes arguments passed everywhere and allows the use of standard iteration over lists. Should be no functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208127 91177308-0d34-0410-b5e6-96231b3b80d8
* Have the SubtargetFeature help routine just not return a number andEric Christopher2014-05-06
| | | | | | | | fall back to the normal path without a cpu. While doing this fix llc to just exit when we don't have a module to process instead of asserting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208102 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Walk back commits for unused function parameters - they're still being"Eric Christopher2014-05-06
| | | | | | this reapplies 208012 and 208002. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208037 91177308-0d34-0410-b5e6-96231b3b80d8
* Walk back commits for unused function parameters - they're still beingEric Christopher2014-05-05
| | | | | | used via dragonegg for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208016 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a now unnecessary function since all calls have one versionEric Christopher2014-05-05
| | | | | | and inline it into its caller. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208012 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a call to std::exit in a library. Make "Help" returnEric Christopher2014-05-05
| | | | | | a 0 as a default answer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208009 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused argument from AddFeature.Eric Christopher2014-05-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208002 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix pr19645.Rafael Espindola2014-05-03
| | | | | | | | | | | | | | | | The fix itself is fairly simple: move getAccessVariant to MCValue so that we replace the old weak expression evaluation with the far more general EvaluateAsRelocatable. This then requires that EvaluateAsRelocatable stop when it finds a non trivial reference kind. And that in turn requires the ELF writer to look harder for weak references. Last but not least, this found a case where we were being bug by bug compatible with gas and accepting an invalid input. I reported pr19647 to track it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207920 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: place .file records into the correct sectionSaleem Abdulrasool2014-05-02
| | | | | | | | | .file records are supposed to have a section identifier of 65534 (IMAGE_SCN_DEBUG) rather than 0. This is spelt out clearly within the PE/COFF specification. Fix this minor oversight with the implementation for support for .file records. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207851 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix uninitialized variable introduced in r207739.David Blaikie2014-05-01
| | | | | | | | | | This was initialized by llvm-mc (calling setDwarfVersion) but other clients (such as clang, llc, etc) aren't necessarily initializing this so we were getting garbage DWARF version values in the output. Initialize it to a reasonable default (the same default used in llvm-mc, though this is higher than it was (2) previously). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207788 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't propagate StorageClass and ComplexType to aliases.Rafael Espindola2014-05-01
| | | | | | | | | This matches gas' behaviour on COFF. I think that this yak is now sufficiently shaved for aliases with offset to work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207786 91177308-0d34-0410-b5e6-96231b3b80d8
* Compute the correct section for zed = foo + 1 in COFF.Rafael Espindola2014-05-01
| | | | | | | | | This fixes pr19147. There are a few more related issues to fix, but the testcase in the bug now passes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207763 91177308-0d34-0410-b5e6-96231b3b80d8
* Move getBaseSymbol somewhere the COFF writer can use.Rafael Espindola2014-05-01
| | | | | | I will use it there in a second. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207761 91177308-0d34-0410-b5e6-96231b3b80d8
* Make getBaseSymbol non recursive.Rafael Espindola2014-05-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207759 91177308-0d34-0410-b5e6-96231b3b80d8