summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCAsmInfoCOFF.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Re-commit: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove ↵Daniel Sanders2014-02-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+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/+2
| | | | | | | | | | | | | | | | | | | | | 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
* Make the llvm mangler depend only on DataLayout.Rafael Espindola2014-01-031-2/+0
| | | | | | | | | | | | | | 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
* Refactor the setting of PrivateGlobalPrefix.Rafael Espindola2013-12-021-1/+0
| | | | | | No functionality change. llvm-svn: 196170
* Convert two char* that are only ever used as booleans to bool.Rafael Espindola2013-12-021-1/+1
| | | | llvm-svn: 196168
* The global prefix is always one char. Don't use a string for it.Rafael Espindola2013-11-281-1/+1
| | | | llvm-svn: 195926
* Remove AllowQuotesInName and friends from MCAsmInfo.Rafael Espindola2013-11-131-1/+0
| | | | | | | | | | | Accepting quotes is a property of an assembler, not of an object file. For example, ELF can support any names for sections and symbols, but the gnu assembler only accepts quotes in some contexts and llvm-mc in a few more. LLVM should not produce different symbols based on a guess about which assembler will be reading the code it is printing. llvm-svn: 194575
* Remove unused DwarfSectionOffsetDirective stringMatt Arsenault2013-04-221-1/+1
| | | | | | | The value isn't actually used, and setting it emits a COFF specific directive. llvm-svn: 180064
* Fix alignment of .comm and .lcomm on mingw32.Benjamin Kramer2012-09-071-2/+4
| | | | | | | | For some reason .lcomm uses byte alignment and .comm log2 alignment so we can't use the same setting for both. Fix this by reintroducing the LCOMM enum. I verified this against mingw's gcc. llvm-svn: 163420
* Contrary to what the documentation says, .lcomm alignment on COFF is in ↵Benjamin Kramer2012-09-071-1/+1
| | | | | | bytes, not power of 2. llvm-svn: 163405
* MC: Overhaul handling of .lcommBenjamin Kramer2012-09-071-1/+1
| | | | | | | | | | | | | - Darwin lied about not supporting .lcomm and turned it into zerofill in the asm parser. Push the zerofill-conversion down into macho-specific code. - This makes the tri-state LCOMMType enum superfluous, there are no targets without .lcomm. - Do proper error reporting when trying to use .lcomm with alignment on a target that doesn't support it. - .comm and .lcomm alignment was parsed in bytes on COFF, should be power of 2. - Fixes PR13755 (.lcomm crashes on ELF). llvm-svn: 163395
* Refactor data-in-code annotations.Jim Grosbach2012-05-181-2/+0
| | | | | | | | | | | | | | | | | | | | | | Use a dedicated MachO load command to annotate data-in-code regions. This is the same format the linker produces for final executable images, allowing consistency of representation and use of introspection tools for both object and executable files. Data-in-code regions are annotated via ".data_region"/".end_data_region" directive pairs, with an optional region type. data_region_directive := ".data_region" { region_type } region_type := "jt8" | "jt16" | "jt32" | "jta32" end_data_region_directive := ".end_data_region" The previous handling of ARM-style "$d.*" labels was broken and has been removed. Specifically, it didn't handle ARM vs. Thumb mode when marking the end of the section. rdar://11459456 llvm-svn: 157062
* Tidy up. Trailing whitespace.Jim Grosbach2012-05-111-1/+1
| | | | llvm-svn: 156602
* Prune some includesCraig Topper2012-03-271-1/+0
| | | | llvm-svn: 153502
* Unweaken vtables as per ↵David Blaikie2011-12-201-0/+6
| | | | | | 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-0/+8
| | | | | | | | | | 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
* Teach the MC to output code/data region marker labels in MachO and ELF ↵Owen Anderson2011-10-041-0/+2
| | | | | | modes. These are used by disassemblers to provide better disassembly, particularly on targets like ARM Thumb that like to intermingle data in the TEXT segment. llvm-svn: 141135
* PR10989: Don't print .hidden on Windows.Eli Friedman2011-09-231-1/+2
| | | | llvm-svn: 140356
* Don't drop alignment info on local common symbols.Benjamin Kramer2011-09-011-1/+1
| | | | | | | | | | | - On COFF the .lcomm directive has an alignment argument. - On ELF we fall back to .local + .comm Based on a patch by NAKAMURA Takumi. Fixes PR9337, PR9483 and PR10128. llvm-svn: 138976
* Roll out r126425 and r126450 to see if it fixes the failures on the buildbots.Cameron Zwarich2011-02-251-1/+0
| | | | llvm-svn: 126488
* Enable DebugInfo support for COFF object files.Devang Patel2011-02-241-0/+1
| | | | | | Patch by Nathan Jeffords! llvm-svn: 126425
* Revert part of my last commit. the mingw32 build bot doesn't seem to like it.Michael J. Spencer2010-08-231-1/+0
| | | | llvm-svn: 111793
* Workaround broken jump tables on x86-64 COFF.Michael J. Spencer2010-08-231-0/+1
| | | | llvm-svn: 111792
* eliminate the magic AbsoluteDebugSectionOffsets MAI hook,Chris Lattner2010-04-041-1/+0
| | | | | | | | | which is really a property of the section being referenced. Add a predicate to MCSection to replace it. Yay for reduction in magic. llvm-svn: 100367
* isAbsoluteEHSectionOffsets always returns false, eliminate it Chris Lattner2010-04-041-1/+0
| | | | | | and substitute false at the one call site. llvm-svn: 100354
* move fastcall/stdcall mangling up into Mangler.Chris Lattner2010-03-121-0/+1
| | | | llvm-svn: 98384
* use EmitLinkage for functions as well as globals. One outputChris Lattner2010-01-261-1/+1
| | | | | | | | | change is that we now use ".linkonce discard" for global variables instead of ".linkonce samesize". These should be the same, just less strict. If anyone is interested in mcizing MCSection for COFF targets, this should be easy to fix. llvm-svn: 94623
* Eliminate SetDirective, and replace it with HasSetDirective.Chris Lattner2010-01-261-1/+0
| | | | | | | | | | | Default HasSetDirective to true, since most targets have it. The targets that claim to not have it probably do, or it is spelled differently. These include Blackfin, Mips, Alpha, and PIC16. All of these except pic16 are normal ELF targets, so they almost certainly have it. llvm-svn: 94585
* Emit .comm alignment in bytes but .align in powers of 2 for ARM ELF.Rafael Espindola2010-01-261-1/+1
| | | | | | Original patch by Sandeep Patel and updated by me. llvm-svn: 94582
* coff targets support alignment on .commChris Lattner2010-01-251-1/+0
| | | | llvm-svn: 94410
* mcize lcomm, simplify .comm, extend both to support 64-bit sizes.Chris Lattner2010-01-231-1/+1
| | | | llvm-svn: 94299
* mcize visibility directives.Chris Lattner2010-01-231-1/+3
| | | | llvm-svn: 94295
* revert 93934, removing the MCAsmInfo endianness bit. I can'tChris Lattner2010-01-201-1/+1
| | | | | | | stomache MCAsmInfo having this, and I found a better solution to this layering issue. llvm-svn: 93985
* give MCAsmInfo a 'has little endian' bit. This is unfortunate, butChris Lattner2010-01-191-1/+1
| | | | | | | | | I really want clients of the streamer to be able to say "emit this 64-bit integer" and have it get broken down right by the streamer. I may change this in the future, we'll see how it works out. llvm-svn: 93934
* hookize the cygwin ".linkonce" directive.Chris Lattner2010-01-191-0/+1
| | | | llvm-svn: 93855
* rename COFFMCAsmInfo -> MCAsmInfoCOFF, likewise for darwin.Chris Lattner2009-08-221-2/+2
| | | | llvm-svn: 79773
* move the MCAsmInfo .cpp/.h files into the right Chris Lattner2009-08-221-0/+37
directories and rename them. llvm-svn: 79768
OpenPOWER on IntegriCloud