summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove X86 .quad workaround for buggy GNU assembler on OpenBSD / Bitrig.Brad Smith2015-01-061-5/+0
| | | | llvm-svn: 225227
* Add the ExceptionHandling::MSVC enumerationReid Kleckner2014-12-191-1/+3
| | | | | | | | | | | | | | | It is intended to be used for a family of personality functions that have similar IR preparation requirements. Typically when interoperating with MSVC personality functions, bits of functionality need to be outlined from the main function into helper functions. There is also usually more than one landing pad per invoke, which does not match the LLVM IR landingpad representation. None of this is implemented yet. This change just adds a new enum that is active for *-windows-msvc and delegates to the EH removal preparation pass. No functionality change for other targets. llvm-svn: 224625
* Allow target to specify prefix for labelsMatt Arsenault2014-12-041-0/+2
| | | | | | | | Use the MCAsmInfo instead of the DataLayout, and allow specifying a custom prefix for labels specifically. HSAIL requires that labels begin with @, but global symbols with &. llvm-svn: 223323
* Tidied up target triple OS detection. NFCSimon Pilgrim2014-11-221-2/+1
| | | | | | Use Triple::isOS*() helper functions where possible. llvm-svn: 222622
* Rename EH related stuff to be more preciseReid Kleckner2014-11-141-2/+2
| | | | | | | | | | | | | | | | | | | | Summary: The current "WinEH" exception handling type is more about Itanium-style LSDA tables layered on top of the Windows native unwind info format instead of .eh_frame tables or EHABI unwind info. Use the name "ItaniumWinEH" to better reflect the hybrid nature of the design. Also rename isExceptionHandlingDWARF to usesItaniumLSDAForExceptions, since the LSDA is part of the Itanium C++ ABI document, and not the DWARF standard. Reviewers: echristo Subscribers: llvm-commits, compnerd Differential Revision: http://reviews.llvm.org/D6279 llvm-svn: 222062
* Move getNonexecutableStackSection up to the base ELF class.Rafael Espindola2014-10-151-6/+0
| | | | | | The .note.GNU-stack section is not SystemZ/X86 specific. llvm-svn: 219796
* CodeGen: indicate Windows unwind data formatSaleem Abdulrasool2014-09-011-0/+2
| | | | | | | | The structures for Windows unwinding are shared across multiple platforms. Indicate the encoding to be used for the particular target. Use this to switch the unwind emitter instantiated by the AsmPrinter. llvm-svn: 216895
* Remove HasLEB128.Rafael Espindola2014-08-151-3/+0
| | | | | | We already require CFI, so it should be safe to require .leb128 and .uleb128. llvm-svn: 215712
* X86: drop relocations on __eh_frame sections globally.Tim Northover2014-07-221-5/+4
| | | | | | | | | | | | | | Without this, we produce non-extern relocations when targeting older OS X versions that ld64 can't cope with in the particular context of __eh_frame sections (who'd want generic relocation-processing anyway?). This means that an updated linker (ld64 from Xcode 3.2.6 or later) may be needed when targeting such platforms with a modern version of LLVM, but this is probably the case anyway and a reasonable requirement. PR20212, rdar://problem/17544795 llvm-svn: 213665
* CodeGen: rename Win64 ExceptionHandling to WinEHSaleem Abdulrasool2014-06-291-2/+2
| | | | | | | | | | This exception format is not specific to Windows x64. A similar approach is taken on nearly all architectures. Generalise the name to reflect reality. This will eventually be used for Windows on ARM data emission as well. Switch the enum and namespace into an enum class. llvm-svn: 212000
* Re-apply r211399, "Generate native unwind info on Win64" with a fix to ↵NAKAMURA Takumi2014-06-251-4/+8
| | | | | | | | | | | | | | | | | | | | | | | ignore SEH pseudo ops in X86 JIT emitter. -- This patch enables LLVM to emit Win64-native unwind info rather than DWARF CFI. It handles all corner cases (I hope), including stack realignment. Because the unwind info is not flexible enough to describe stack frames with a gap of unknown size in the middle, such as the one caused by stack realignment, I modified register spilling code to place all spills into the fixed frame slots, so that they can be accessed relative to the frame pointer. Patch by Vadim Chugunov! Reviewed By: rnk Differential Revision: http://reviews.llvm.org/D4081 llvm-svn: 211691
* Revert r211399, "Generate native unwind info on Win64"NAKAMURA Takumi2014-06-221-8/+4
| | | | | | It broke Legacy JIT Tests on x86_64-{mingw32|msvc}, aka Windows x64. llvm-svn: 211480
* Don't produce eh_frame relocations when targeting the IOS simulator.Rafael Espindola2014-06-201-2/+3
| | | | | | First step for fixing pr19185. llvm-svn: 211404
* Generate native unwind info on Win64Reid Kleckner2014-06-201-4/+8
| | | | | | | | | | | | | | | | | | | | This patch enables LLVM to emit Win64-native unwind info rather than DWARF CFI. It handles all corner cases (I hope), including stack realignment. Because the unwind info is not flexible enough to describe stack frames with a gap of unknown size in the middle, such as the one caused by stack realignment, I modified register spilling code to place all spills into the fixed frame slots, so that they can be accessed relative to the frame pointer. Patch by Vadim Chugunov! Reviewed By: rnk Differential Revision: http://reviews.llvm.org/D4081 llvm-svn: 211399
* [C++] Use 'nullptr'. Target edition.Craig Topper2014-04-251-2/+2
| | | | llvm-svn: 207197
* X86MCAsmInfoGNUCOFF: Set PointerSize as 8 for targeting x64. It caused ↵NAKAMURA Takumi2014-04-081-1/+3
| | | | | | | DW_LNE_set_address was misemitted on x64. FIXME: I haven't investigate whether CalleeSaveStackSlotSize should be 8. llvm-svn: 205772
* Re-commit: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove ↵Daniel Sanders2014-02-131-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hasRawTextSupport() call Summary: AsmPrinter::EmitInlineAsm() will no longer use the EmitRawText() call for targets with mature MC support. Such targets will always parse the inline assembly (even when emitting assembly). Targets without mature MC support continue to use EmitRawText() for assembly output. The hasRawTextSupport() check in AsmPrinter::EmitInlineAsm() has been replaced with MCAsmInfo::UseIntegratedAs which when true, causes the integrated assembler to parse inline assembly (even when emitting assembly output). UseIntegratedAs is set to true for targets that consider any failure to parse valid assembly to be a bug. Target specific subclasses generally enable the integrated assembler in their constructor. The default value can be overridden with -no-integrated-as. All tests that rely on inline assembly supporting invalid assembly (for example, those that use mnemonics such as 'foo' or 'hello world') have been updated to disable the integrated assembler. Changes since review (and last commit attempt): - Fixed test failures that were missed due to configuration of local build. (fixes crash.ll and a couple others). - Fixed tests that happened to pass because the local build was on X86 (should fix 2007-12-17-InvokeAsm.ll) - mature-mc-support.ll's should no longer require all targets to be compiled. (should fix ARM and PPC buildbots) - Object output (-filetype=obj and similar) now forces the integrated assembler to be enabled regardless of default setting or -no-integrated-as. (should fix SystemZ buildbots) Reviewers: rafael Reviewed By: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2686 llvm-svn: 201333
* Revert r201237+r201238: Demote EmitRawText call in ↵Daniel Sanders2014-02-121-10/+0
| | | | | | | | AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call It introduced multiple test failures in the buildbots. llvm-svn: 201241
* Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove ↵Daniel Sanders2014-02-121-0/+10
| | | | | | | | | | | | | | | | | | | | | hasRawTextSupport() call Summary: AsmPrinter::EmitInlineAsm() will no longer use the EmitRawText() call for targets with mature MC support. Such targets will always parse the inline assembly (even when emitting assembly). Targets without mature MC support continue to use EmitRawText() for assembly output. The hasRawTextSupport() check in AsmPrinter::EmitInlineAsm() has been replaced with MCAsmInfo::UseIntegratedAs which when true, causes the integrated assembler to parse inline assembly (even when emitting assembly output). UseIntegratedAs is set to true for targets that consider any failure to parse valid assembly to be a bug. Target specific subclasses generally enable the integrated assembler in their constructor. The default value can be overridden with -no-integrated-as. All tests that rely on inline assembly supporting invalid assembly (for example, those that use mnemonics such as 'foo' or 'hello world') have been updated to disable the integrated assembler. Reviewers: rafael Reviewed By: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2686 llvm-svn: 201237
* [patch] Adjust behavior of FDE cross-section relocs for targets that don't ↵Iain Sandoe2014-01-081-0/+5
| | | | | | | | | | | | support abs-differences. Modern versions of OSX/Darwin's ld (ld64 > 97.17) have an optimisation present that allows the back end to omit relocations (and replace them with an absolute difference) for FDE some text section refs. This patch allows a backend to opt-in to this behaviour by setting "DwarfFDESymbolsUseAbsDiff". At present, this is only enabled for modern x86 OSX ports. test changes by David Fang. llvm-svn: 198744
* Make the llvm mangler depend only on DataLayout.Rafael Espindola2014-01-031-8/+2
| | | | | | | | | | | | | | Before this patch any program that wanted to know the final symbol name of a GlobalValue had to link with Target. This patch implements a compromise solution where the mangler uses DataLayout. This way, any tool that already links with Target (llc, clang) gets the exact behavior as before and new IR files can be mangled without linking with Target. With this patch the mangler is constructed with just a DataLayout and DataLayout is extended to include the information the Mangler needs. llvm-svn: 198438
* on darwin<10, fallback to .weak_definition (PPC,X86)David Fang2013-12-101-0/+6
| | | | | | .weak_def_can_be_hidden was not yet supported by the system assembler llvm-svn: 196970
* Don't add suffixes for stdcall/fastcall on 64 coff.Rafael Espindola2013-12-091-0/+2
| | | | | | This matches the behavior of both msvc and mingw. llvm-svn: 196814
* Refactor the setting of PrivateGlobalPrefix.Rafael Espindola2013-12-021-2/+0
| | | | | | No functionality change. llvm-svn: 196170
* The global prefix is always one char. Don't use a string for it.Rafael Espindola2013-11-281-2/+2
| | | | llvm-svn: 195926
* MC asm parser: allow ?'s in symbol names, and handle @'s in names in MS asmHans Wennborg2013-10-181-0/+2
| | | | | | | | | | | | | | | | | | | | This is another (final?) stab at making us able to parse our own asm output on Windows. Symbols on Windows often contain @'s and ?'s in their names. Our asm parser didn't like this. ?'s were not allowed, and @'s were intepreted as trying to reference PLT/GOT/etc. We can't just add quotes around the bad names, since e.g. for MinGW, we use gas to assemble, and it doesn't like quotes in some places (notably in .def directives). This commit makes us allow ?'s in symbol names, and @'s in symbol names for MS assembly. Differential Revision: http://llvm-reviews.chandlerc.com/D1978 llvm-svn: 193000
* Add a MCAsmInfoELF class and factor some code into it.Rafael Espindola2013-10-161-2/+0
| | | | | | We had a MCAsmInfoCOFF, but no common class for all the ELF MCAsmInfos before. llvm-svn: 192760
* Move .ident handling to MCStreamer.Rafael Espindola2013-10-161-0/+1
| | | | | | | | No functionality change, but exposes the API so that codegen can use it too. Patch by Katya Romanova. llvm-svn: 192757
* MC: Remove vestigial PCSymbol field from AsmInfoDavid Majnemer2013-09-251-2/+0
| | | | llvm-svn: 191362
* Remove support for the .debug_inlined section. No known softwareEric Christopher2013-08-281-1/+0
| | | | | | in use supports it. llvm-svn: 189439
* Initial patch for x32 ABI support.Eli Bendersky2013-01-221-3/+11
| | | | | | | | Add the x32 environment kind to the triple, and separate the concept of pointer size and callee save stack slot size, since they're not equal on x32. llvm-svn: 173175
* Mark jump tables in code sections with DataRegion directives.Jim Grosbach2012-09-241-0/+5
| | | | | | | | | Even out-of-line jump tables can be in the code section, so mark them as data-regions for those targets which support the directives. rdar://12362871&12362974 llvm-svn: 164571
* Add support for the OpenBSD for Bitrig.Eric Christopher2012-08-061-3/+4
| | | | | | Patch by David Hill. llvm-svn: 161344
* Nuke a few dead remnants of the CBE.Jim Grosbach2012-05-051-17/+0
| | | | llvm-svn: 156241
* Target/X86/MCTargetDesc/X86MCAsmInfo.cpp: Enable DwarfCFI (aka DW2) on Cygming.NAKAMURA Takumi2012-04-071-0/+3
| | | | | | | Cygwin-1.7 supports dw2. Some recent mingw distros support one, too. I have confirmed test-suite/SingleSource/Benchmarks/Shootout-C++/except.cpp can pass on Cygwin. llvm-svn: 154247
* Unweaken vtables as per ↵David Blaikie2011-12-201-0/+8
| | | | | | http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 146960
* MC/X86/COFF: Allow quotes in names when targeting MS/Windows,Michael J. Spencer2011-11-291-1/+13
| | | | | | | | | | as MC is the only assembler we support. This splits MS/Windows and GNU/Windows ASM infos into two seperate classes. While there is currently only one difference, full MS C++ ABI support will require many more. llvm-svn: 145409
* Remove an unnecessary header from this file. I don't think this headerChandler Carruth2011-07-151-1/+0
| | | | | | | | | | was really intended, and it may have been required prior to some of the recent refactors. Including it however causes LLVMX86Desc to need symbols from LLVMX86CodeGen, forming a dependency cycle. This was masked in almost all builds: Clang, and GCC w/ optimizations didn't actually emit the symbols! llvm-svn: 135242
* Move some parts of TargetAsmInfo down to MCAsmInfo. This is not the greatestEvan Cheng2011-07-151-14/+19
| | | | | | | solution but it is a small step towards removing the horror that is TargetAsmInfo. llvm-svn: 135237
* Rename createAsmInfo to createMCAsmInfo and move registration code to ↵Evan Cheng2011-07-141-0/+134
MCTargetDesc to prepare for next round of changes. llvm-svn: 135219
OpenPOWER on IntegriCloud