summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
Commit message (Collapse)AuthorAgeFilesLines
* Fix gcc warning (enumeral and non-enumeral type in conditional expression)Patrik Hagglund2014-06-091-1/+2
| | | | llvm-svn: 210450
* AsmMatchers: Use unique_ptr to manage ownership of MCParsedAsmOperandDavid Blaikie2014-06-081-19/+12
| | | | | | | | | | | | I saw at least a memory leak or two from inspection (on probably untested error paths) and r206991, which was the original inspiration for this change. I ran this idea by Jim Grosbach a few weeks ago & he was OK with it. Since it's a basically mechanical patch that seemed sufficient - usual post-commit review, revert, etc, as needed. llvm-svn: 210427
* MC: fix text section characteristics for WoASaleem Abdulrasool2014-06-081-0/+3
| | | | | | | | | | link.exe requires that the text section has the IMAGE_SCN_MEM_16BIT flag set. Otherwise, it will treat the function as ARM. If this occurs, then jumps to the function will fail, switching from thumb to ARM mode execution. With this change, it is possible to link using the MSVC linker as well. llvm-svn: 210415
* MC: make ELF .type handling more GNU AS compatibleSaleem Abdulrasool2014-06-081-38/+34
| | | | | | | | | | | | | | GAS documents the .type directive as having an optional comma following the key symbol name when using the STT_<TYPE_IN_UPPER_CASE> form. However, it treats the comma as optional in all cases. This makes the IAS support both forms of inputs. Furthermore, the prefixed forms take either the upper case name or the lower case alias. The tests are split into two separate sets as the hash character serves as a comment character on x86, which is tested in the second set by using arm-elf which uses the at symbol as a comment character. llvm-svn: 210407
* MC: fix ctor/dtor section for windows-itaniumSaleem Abdulrasool2014-06-081-1/+1
| | | | | | | | This adjusts the section setup for the windows-itanium environment. This environment does not report to be a known windows msvc environment, even though it is (nearly) identical to the MSVC environment for C code. llvm-svn: 210406
* MC: whitespace, grouping for COFF section setupSaleem Abdulrasool2014-06-081-26/+33
| | | | | | | | Add some whitespace, combine two sequential conditionals into a single one. Reformat some section definitions to maintain uniformity in the function. NFC. llvm-svn: 210405
* MC: prevent early DCE of empty sectionsSaleem Abdulrasool2014-06-061-7/+3
| | | | | | | | | | | | | | | | Prevent the early elimination of sections in the object writer. There may be references to the section itself by other symbols, which may potentially not be possible to resolve. ML (Visual Studio's Macro Assembler) also seems to retain empty sections. The elimination of symbols and sections which are unused should really occur at the link phase. This will not cause any change in the resulting binary, simply in the generated object files. The adjustments to the other unit tests account for the fluctuating section index caused by the appearance of sections which were previously discarded. llvm-svn: 210373
* Fix a few issues with comdat handling on COFF.Rafael Espindola2014-06-064-57/+47
| | | | | | | | | | | | | | | | | | | | | * Section association cannot use just the section name as many sections can have the same name. With this patch, the comdat symbol in an assoc section is interpreted to mean a symbol in the associated section and the mapping is discovered from it. * Comdat symbols were not being set correctly. Instead we were getting whatever was output first for that section. A consequence is that associative sections now must use .section to set the association. Using .linkonce would not work since it is not possible to change a sections comdat symbol (it is used to decide if we should create a new section or reuse an existing one). This includes r210298, which was reverted because it was asserting on an associated section having the same comdat as the associated section. llvm-svn: 210367
* Revert r210298 'Correctly set the comdat symbol on COFF' as it asserts on ↵Timur Iskhodzhanov2014-06-061-13/+2
| | | | | | Windows llvm-svn: 210317
* Correctly set the comdat symbol on COFF.Rafael Espindola2014-06-051-2/+13
| | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 210298
* Fix MIPS exception personality encoding.Logan Chien2014-05-301-0/+7
| | | | | | | | | 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. llvm-svn: 209907
* MachO: support N_INDR aliases in assembly files.Tim Northover2014-05-301-9/+41
| | | | | | | | | This makes LLVM create N_INDR aliases (to be resolved by the linker) when appropriate. rdar://problem/15125513 llvm-svn: 209894
* [mips][mips64r6] Add Relocations R_MIPS_PCHI16, R_MIPS_PCLO16 Zoran Jovanovic2014-05-271-0/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D3860 llvm-svn: 209659
* AArch64/ARM64: move ARM64 into AArch64's placeTim Northover2014-05-241-4/+6
| | | | | | | | | | | | | | | 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. llvm-svn: 209577
* MC: initialise MCAsmParser variableSaleem Abdulrasool2014-05-221-2/+2
| | | | | | | Properly initialise HadError to false during construction. Detected as use-of-uninitialised variable by MSan! llvm-svn: 209393
* MC: formalise some assertions into proper errorsSaleem Abdulrasool2014-05-221-8/+23
| | | | | | | | | 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. llvm-svn: 209387
* Revert "DebugInfo: Don't put fission type units in comdat sections."David Blaikie2014-05-211-7/+7
| | | | | | | | | 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. llvm-svn: 209338
* MC: introduce ability to restrict recorded relocationsSaleem Abdulrasool2014-05-211-1/+2
| | | | | | | | | 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. llvm-svn: 209336
* MC: loosen an overzealous assertionSaleem Abdulrasool2014-05-211-1/+2
| | | | | | | | 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. llvm-svn: 209309
* MC: mark COFF .drectve section as REMOVESaleem Abdulrasool2014-05-211-1/+1
| | | | | | | | | 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. llvm-svn: 209273
* Move the verbose asm option to be part of the options struct andEric Christopher2014-05-201-1/+1
| | | | | | set appropriately. llvm-svn: 209258
* Fix hardcoded slash to native path seperator which was exposed from ↵Yaron Keren2014-05-161-1/+1
| | | | | | | | llvm::sys::path. http://reviews.llvm.org/D3687 llvm-svn: 208980
* MC: Add DwarfTypesDWOSection also to MCCOFF.NAKAMURA Takumi2014-05-161-0/+4
| | | | llvm-svn: 208975
* Move more MC options into the MCTargetOptions structure.Eric Christopher2014-05-151-1/+2
| | | | | | No functional change. llvm-svn: 208932
* DebugInfo: Don't put fission type units in comdat sections.David Blaikie2014-05-151-7/+3
| | | | | | | | | 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. llvm-svn: 208930
* Fix typosAlp Toker2014-05-151-1/+1
| | | | llvm-svn: 208839
* Move the TargetMachine MC options to MCTargetOptions. No functionalEric Christopher2014-05-151-1/+3
| | | | | | change. llvm-svn: 208832
* Make the split function use StringRef::split.Eric Christopher2014-05-131-19/+3
| | | | llvm-svn: 208723
* Check explicitly for EHABI and just use the default settings.Joerg Sonnenberger2014-05-131-0/+4
| | | | | | Code depends on the assembler and linker to fix things up... llvm-svn: 208715
* Move EmitDwarfAdvanceLineAddr and EmitDwarfAdvanceFrameAddr to the obj streamer.Rafael Espindola2014-05-122-27/+0
| | | | | | This lets us delete the MCAsmStreamer implementation. No functionality change. llvm-svn: 208570
* Pass a MCObjectStreamer instead of a MCStreamer when possible.Rafael Espindola2014-05-121-9/+9
| | | | | | No functionality change. llvm-svn: 208569
* Pass a MCObjectStreamer instead of a MCStreamer when possible.Rafael Espindola2014-05-121-6/+6
| | | | | | No functionality change. llvm-svn: 208567
* Move EH/Debug frame handling to the object streamer.Rafael Espindola2014-05-122-19/+23
| | | | | | | Now that the asm streamer doesn't use it, the MCStreamer doesn't need to know about it. llvm-svn: 208562
* Remove always true argument and unused field.Rafael Espindola2014-05-122-20/+6
| | | | llvm-svn: 208561
* Remove always true argument and field.Rafael Espindola2014-05-121-10/+7
| | | | llvm-svn: 208559
* Remove always true argument.Rafael Espindola2014-05-122-4/+4
| | | | llvm-svn: 208558
* Remove an always true argument.Rafael Espindola2014-05-123-5/+5
| | | | llvm-svn: 208557
* Remove write only field.Rafael Espindola2014-05-121-8/+0
| | | | llvm-svn: 208555
* Remove now empty method.Rafael Espindola2014-05-121-5/+0
| | | | llvm-svn: 208554
* Remove the always true UseCFI member.Rafael Espindola2014-05-121-90/+1
| | | | llvm-svn: 208553
* Remove the useCFI constructor argument to MCAsmStreamer.Rafael Espindola2014-05-121-5/+4
| | | | llvm-svn: 208551
* Remove the UseCFI option from createAsmStreamer.Rafael Espindola2014-05-071-5/+4
| | | | | | We were already always passing true, this just removes the option. llvm-svn: 208205
* Allow using normal .eh_frame based unwinding on ARM. Use the sameJoerg Sonnenberger2014-05-071-0/+4
| | | | | | encodings as x86. Use this exception model for NetBSD. llvm-svn: 208166
* Use a range based for loop for the SubtargetFeatures print function.Eric Christopher2014-05-061-2/+2
| | | | llvm-svn: 208132
* Fix odd formatting that snuck into last patch.Eric Christopher2014-05-061-3/+3
| | | | llvm-svn: 208130
* ArrayRef-ize the Feature and Processor tables for SubtargetFeatures.Eric Christopher2014-05-062-71/+52
| | | | | | | | This removes arguments passed everywhere and allows the use of standard iteration over lists. Should be no functional change. llvm-svn: 208127
* Have the SubtargetFeature help routine just not return a number andEric Christopher2014-05-061-6/+4
| | | | | | | | 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. llvm-svn: 208102
* Revert "Walk back commits for unused function parameters - they're still being"Eric Christopher2014-05-061-19/+5
| | | | | | this reapplies 208012 and 208002. llvm-svn: 208037
* Walk back commits for unused function parameters - they're still beingEric Christopher2014-05-051-5/+19
| | | | | | used via dragonegg for now. llvm-svn: 208016
* Remove a now unnecessary function since all calls have one versionEric Christopher2014-05-051-17/+4
| | | | | | and inline it into its caller. llvm-svn: 208012
OpenPOWER on IntegriCloud