summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Convert some more random-comment-printing stuff to use Chris Lattner2010-01-221-33/+30
| | | | | | | AddComment and GetCommentOS. Add a blank line between globals (even in non-verbose mode) to make the assembly more readable. llvm-svn: 94202
* add a new MCAsmStreamer::GetCommentOS method to simplify stuffChris Lattner2010-01-221-6/+2
| | | | | | that doesn't want to use twines. llvm-svn: 94199
* rename addComment -> AddComment for consistency.Chris Lattner2010-01-221-1/+1
| | | | llvm-svn: 94190
* Add the ability for MCStreamer to emit comments on the same line as directives.Chris Lattner2010-01-221-2/+5
| | | | | | | | | | | | Switch over the asm-verbose comment for double values to use it. We now get: _x: .long 343597384 ## double 1.231200e+02 .long 1079953326 For example, note that the comment is on the same line as the .long. Woo. llvm-svn: 94166
* pass "-fasm-verbose" into createAsmStreamer.Chris Lattner2010-01-221-6/+12
| | | | llvm-svn: 94165
* don't send null pointers through the constantexpr codepath unneededly.Chris Lattner2010-01-201-0/+6
| | | | llvm-svn: 94010
* eliminate some uses of AsmPrinter::EmitIntXXXChris Lattner2010-01-201-5/+4
| | | | llvm-svn: 93996
* inline and radically simplify printDataDirective. It will eventuallyChris Lattner2010-01-201-45/+18
| | | | | | go completely away. llvm-svn: 93994
* emit basic block labels with mcstreamer.Chris Lattner2010-01-201-8/+4
| | | | llvm-svn: 93993
* emit integer and fp zeros as (e.g.) .byte 0 instead of .space 1,Chris Lattner2010-01-201-15/+12
| | | | | | for tidiness. llvm-svn: 93992
* signficant cleanups to EmitGlobalConstant (including streamerization Chris Lattner2010-01-201-103/+67
| | | | | | | | of int initializers), change some methods to be static functions, use raw_ostream::write_hex instead of a smallstring dance with APValue::toStringUnsigned(S, 16). llvm-svn: 93991
* switch ConstantFP emission to use MCStreamer, significantly Chris Lattner2010-01-201-34/+18
| | | | | | simplifying the code. llvm-svn: 93988
* make mcasmstreamer handle expanding 8 byte integer constants to Chris Lattner2010-01-201-18/+4
| | | | | | | 4-byte constants if .quad isn't supported. Switch a bunch of methods used by the dwarf writer to use OutStreamer.EmitIntValue. llvm-svn: 93987
* give createAsmStreamer an 'isLittleEndian' argument.Chris Lattner2010-01-201-1/+2
| | | | llvm-svn: 93986
* simplify the rest of fp constant printing.Chris Lattner2010-01-191-108/+34
| | | | llvm-svn: 93929
* simplify the code for printing x86 long double, don't do workChris Lattner2010-01-191-75/+22
| | | | | | for -fverbose-asm unless it's on. llvm-svn: 93926
* eliminate AsmPrinter::EmitZeros: just use MCStreamer directly.Chris Lattner2010-01-191-11/+4
| | | | llvm-svn: 93918
* Generalize mcasmstreamer data emission APIs to take an address spaceChris Lattner2010-01-191-13/+7
| | | | | | identifier. There is no way to work around it. llvm-svn: 93896
* refactor code to be static functions instead of methods on AsmPrinter.Chris Lattner2010-01-191-47/+39
| | | | | | This fixes some bugs handling address spaces. llvm-svn: 93891
* mcstreamerize AsmPrinter::EmitZeros, at least when emitting to the Chris Lattner2010-01-191-8/+6
| | | | | | default address space. llvm-svn: 93890
* remove MAI::ZeroDirectiveSuffix, which is only used by MASM,Chris Lattner2010-01-191-10/+6
| | | | | | which we don't support anymore. llvm-svn: 93886
* mcstreamer'ize the rest of EmitGlobalVariable that is used on Chris Lattner2010-01-191-6/+8
| | | | | | | darwin. The next big piece to get global variables streamerized is EmitGlobalConstant. llvm-svn: 93870
* stop using the .lcomm pseudoop on darwin, instead, directly use theChris Lattner2010-01-191-9/+22
| | | | | | .zerofill directive. Streamerize its generation. llvm-svn: 93868
* Avoid including DebugInfo.h in AsmPrinter.hDevang Patel2010-01-191-2/+2
| | | | llvm-svn: 93864
* mc'ize some stuff, don't comment out .lcomm directive in -fverbose-asm mode.Chris Lattner2010-01-191-7/+4
| | | | llvm-svn: 93860
* factor this code better.Chris Lattner2010-01-191-21/+13
| | | | llvm-svn: 93859
* Now that we have everything nicely factored (e.g. asmprinter is notChris Lattner2010-01-191-2/+122
| | | | | | | | | | | | | | | | | | | | | | | doing global variable classification anymore) and hookized, sink almost all target targets global variable emission code into AsmPrinter and out of each target. Some notes: 1. PIC16 does completely custom and crazy stuff, so it is not changed. 2. XCore has some custom handling for extra directives. I'll look at it next. 3. This switches linux/ppc to use .globl instead of .global. If .globl is actually wrong, let me know and I'll fix it. 4. This makes linux/ppc get a lot of random cases right which were obviously wrong before, it is probably now a bit healthier. 5. Blackfin will probably start getting .comm and other things that it didn't before. If this is undesirable, it should explicitly opt out of these things by clearing the relevant fields of MCAsmInfo. This leads to a nice diffstat: 14 files changed, 127 insertions(+), 830 deletions(-) llvm-svn: 93858
* hoist handling of external globals and special globals up to common code.Chris Lattner2010-01-191-1/+15
| | | | | | | | | | This makes a similar code dead in all the other targets, I'll clean it up in a bit. This also moves handling of lcomm up before acquisition of a section, since lcomm never needs a section. llvm-svn: 93851
* move production of .reference directives for static ctor/dtor list onChris Lattner2010-01-191-0/+8
| | | | | | darwin into common code. llvm-svn: 93849
* now that MCSymbol::print doesn't use it's MAI argument, we can Chris Lattner2010-01-171-50/+28
| | | | | | | remove it and change all the code that prints MCSymbols to use << instead, which is much simpler and cleaner. llvm-svn: 93695
* now that mangler is in libtarget, it can use MCAsmInfo instead of clientsChris Lattner2010-01-171-2/+1
| | | | | | having to pass various fields from it in. Simplify. llvm-svn: 93686
* Switch some functions to take Twines, eliminate uses of StringExtras.h.Benjamin Kramer2010-01-171-23/+10
| | | | llvm-svn: 93680
* move the mangler into libtarget from vmcore.Chris Lattner2010-01-161-2/+2
| | | | llvm-svn: 93664
* unbreak the build.Chris Lattner2010-01-161-6/+0
| | | | llvm-svn: 93654
* rename GetPrivateGlobalValueSymbolStub -> GetSymbolWithGlobalValueBase,Chris Lattner2010-01-161-5/+6
| | | | | | | | and add an explicit ForcePrivate argument. Switch FunctionEHFrameInfo to be MCSymbol based instead of string based. llvm-svn: 93646
* eliminate uses of getMangledName from AsmPrinter.cpp, last up is Chris Lattner2010-01-161-5/+9
| | | | | | dwarf emission which is going to be more invasive. llvm-svn: 93645
* Replace DebugLocTuple with DILocation.Devang Patel2010-01-161-12/+12
| | | | llvm-svn: 93630
* fix inverted conditionalChris Lattner2010-01-161-1/+1
| | | | llvm-svn: 93614
* CurrentFnName is now dead, remove it.Chris Lattner2010-01-161-2/+1
| | | | llvm-svn: 93612
* remove the string form of printVisibility.Chris Lattner2010-01-161-20/+18
| | | | llvm-svn: 93609
* supplement CurrentFnName with CurrentFnSym, which will eventuallyChris Lattner2010-01-151-0/+1
| | | | | | | replace it. Upgrade Alpha, Blackfin, and part of CellSPU to not use mangler anymore. CellSPU needs more invasive surgery. llvm-svn: 93589
* add a version of AsmPrinter::printVisibility that takes an MCSymbol.Chris Lattner2010-01-151-0/+17
| | | | llvm-svn: 93587
* add another helperChris Lattner2010-01-151-0/+11
| | | | llvm-svn: 93577
* add a AsmPrinter::GetGlobalValueSymbol and GetExternalSymbolSymbolChris Lattner2010-01-151-0/+16
| | | | | | helper method, use it to simplify some code. llvm-svn: 93575
* Fix a comment.Dale Johannesen2010-01-141-1/+1
| | | | llvm-svn: 93463
* remove uses of deprecated functions, this generates slightlyChris Lattner2010-01-131-6/+7
| | | | | | | | | different BlockAddress labels, but nothing semantically important. Add a FIXME that BlockAddress codegen is broken if the LLVM BB has an empty name (e.g. strip was run). llvm-svn: 93303
* use the new form of getNameWithPrefix, not makeNameProper.Chris Lattner2010-01-131-1/+1
| | | | | | | | | Among other things, this would do very weird things if the basic block name had (e.g.) a space in it on darwin: makeNameProper would add quotes, then the mcsymbol would escape the quotes. llvm-svn: 93302
* change Mangler::makeNameProper to return its result in a SmallVectorChris Lattner2010-01-131-7/+8
| | | | | | | | | | | | instead of returning it in an std::string. Based on this change: 1. Change TargetLoweringObjectFileCOFF::getCOFFSection to take a StringRef 2. Change a bunch of targets to call makeNameProper with a smallstring, making several of them *much* more efficient. 3. Rewrite Mangler::makeNameProper to not build names and then prepend prefixes, not use temporary std::strings, and to avoid other crimes. llvm-svn: 93298
* fix assert in AsmPrinter::EmitGlobalConstantLargeInt to match reality.Chris Lattner2010-01-131-2/+1
| | | | llvm-svn: 93293
* reduce nesting and code duplication in AsmPrinter::EmitGlobalConstantLargeInt.Chris Lattner2010-01-131-31/+26
| | | | llvm-svn: 93292
OpenPOWER on IntegriCloud