summaryrefslogtreecommitdiff
path: root/lib/MC/MCAsmStreamer.cpp
Commit message (Collapse)AuthorAge
* Thread an MCAsmInfo pointer through the various MC printing APIs, Chris Lattner2009-09-03
| | | | | | | | and fix a few things using << on MCSymbols to use ->print(). No functionality change other than unbreaking my previous patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80890 91177308-0d34-0410-b5e6-96231b3b80d8
* inline insertion operators.Chris Lattner2009-09-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80888 91177308-0d34-0410-b5e6-96231b3b80d8
* output alignment value in hex so that we get:Chris Lattner2009-09-03
| | | | | | | | | | | | .align 3, 0x90 instead of, .align 3, 144 suggested by eric. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80875 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Pass values to MCStreamer as MCExprs, not MCValues.Daniel Dunbar2009-08-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80578 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Simplify EmitAssignment ('.set' is identical to '=').Daniel Dunbar2009-08-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80577 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Switch MCInst to storing an MCExpr* instead of an MCValue.Daniel Dunbar2009-08-31
| | | | | | Also, use MCInst::print instead of custom code in MCAsmPrinter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80575 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: MCStreamer cleanups. - Remove EmitLocalSymbol, this is unsupported ↵Daniel Dunbar2009-08-30
| | | | | | | | for now. - Switch Emit{CommonSymbol,Zerofill} to take alignment in bytes (for consistency). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80484 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Emit .lcomm as .zerofill.Daniel Dunbar2009-08-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80343 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Add const to EmitZeroFill section argument.Daniel Dunbar2009-08-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80341 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Print encodings after the instruction, and only when we have an asmDaniel Dunbar2009-08-27
| | | | | | | printer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80233 91177308-0d34-0410-b5e6-96231b3b80d8
* Sketch TargetRegistry support for MCCodeEmitter abstract interface.Daniel Dunbar2009-08-27
| | | | | | | - Of course, nothing actually can provide this interface yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80188 91177308-0d34-0410-b5e6-96231b3b80d8
* rename TAI -> MAI, being careful not to make MAILJMP instructions :)Chris Lattner2009-08-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79777 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename TargetAsmInfo (and its subclasses) to MCAsmInfo.Chris Lattner2009-08-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79763 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Clean up some handling of symbol/section association to be more correctDaniel Dunbar2009-08-22
| | | | | | | | | (external was really undefined and there wasn't an explicit representation for absolute symbols). - This still needs some cleanup to how the absolute "pseudo" section is dealt with, but I haven't figured out the nicest approach yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79733 91177308-0d34-0410-b5e6-96231b3b80d8
* fix asmstreaming of 2/4 byte elements with pow-2 alignments.Chris Lattner2009-08-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79408 91177308-0d34-0410-b5e6-96231b3b80d8
* switch asmprinter to emit alignments through OutStreamer.Chris Lattner2009-08-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79406 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate AsmPrinter::SwitchToSection and just have clientsChris Lattner2009-08-19
| | | | | | | talk to the MCStreamer directly instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79405 91177308-0d34-0410-b5e6-96231b3b80d8
* Make AsmStreamer maintain a notion of the current section, pushing it up ↵Chris Lattner2009-08-18
| | | | | | | | | | | | | from the MCAsmStreamer. Based on this, eliminate the current section from AsmPrinter. While I'm at it, clean up the last of the horrible "switch to null section" stuff and add an assert. This change is in preparation for completely eliminating asmprinter::switchtosection. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79324 91177308-0d34-0410-b5e6-96231b3b80d8
* change AsmPrinter to switch sections using AsmStreamer instead ofChris Lattner2009-08-17
| | | | | | | | | | doing it directly. This requires const'izing a bunch of stuff that took sections, but this seems like the right semantic thing to do: emitting a label to a section shouldn't mutate the MCSection object itself, for example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79227 91177308-0d34-0410-b5e6-96231b3b80d8
* give MCAsmStreamer a TargetAsmInfo.Chris Lattner2009-08-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79222 91177308-0d34-0410-b5e6-96231b3b80d8
* formatting cleanups, no functionality change.Chris Lattner2009-08-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79221 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Fix bugs where bytes were unintentionally being printed as signed.Daniel Dunbar2009-08-14
| | | | | | | | - We now print all of 403.gcc cleanly (llvm-mc -> 'as' as diffed to 'as'), minus two 'rep;movsl' instructions (which I missed before). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79031 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: When handling a .set, make sure to print subsequent references to theDaniel Dunbar2009-08-14
| | | | | | | | | symbol as the symbol name itself, not the expression it was defined to. These have different semantics due to the quirky .set behavior (which absolutizes an expression that would otherwise be treated as a relocation). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79025 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: zerofill shouldn't print quotes around the section,segment.Daniel Dunbar2009-08-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79017 91177308-0d34-0410-b5e6-96231b3b80d8
* Update llvm-mc / MCAsmStreamer to print the instruction using the actual targetDaniel Dunbar2009-08-14
| | | | | | | | | | | | specific printer (this only works on x86, for now). - This makes it possible to do some correctness checking of the parsing and matching, since we can compare the results of 'as' on the original input, to those of 'as' on the output from llvm-mc. - In theory, we could now have an easy ATT -> Intel syntax converter. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78986 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Add dummy MCStreamer implementation, (eventually) for use in profiling.Daniel Dunbar2009-08-13
| | | | | | | | | - Currently unused. - A few other random comment fixes lumped in. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78960 91177308-0d34-0410-b5e6-96231b3b80d8
* split MachO section handling stuff out to its out .h/.cpp file.Chris Lattner2009-08-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78576 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the big switch: Change MCSectionMachO to represent a section *semantically*Chris Lattner2009-08-10
| | | | | | | | | | | | | | | | | | instead of syntactically as a string. This means that it keeps track of the segment, section, flags, etc directly and asmprints them in the right format. This also includes parsing and validation support for llvm-mc and "attribute(section)", so we should now start getting errors about invalid section attributes from the compiler instead of the assembler on darwin. Still todo: 1) Uniquing of darwin mcsections 2) Move all the Darwin stuff out to MCSectionMachO.[cpp|h] 3) there are a few FIXMEs, for example what is the syntax to get the S_GB_ZEROFILL segment type? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78547 91177308-0d34-0410-b5e6-96231b3b80d8
* sink the 'name' and 'isdirective' state out of MCSection into its derived ↵Chris Lattner2009-08-08
| | | | | | | | | classes. This totally optimizes PIC16 sections by not having an 'isdirective' bit anymore!! ;-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78517 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Fix .s output to quote section & symbol names when necessary.Daniel Dunbar2009-07-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77749 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Implement .abort fully in the front endDaniel Dunbar2009-07-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77272 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Move AsmLexer::getCurStrVal to StringRef based API.Daniel Dunbar2009-07-27
| | | | | | | - My DFS traversal of LLVM is, at least for now, nearly complete! :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77258 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed the DumpSymbolsandMacros and LoadSymbolsandMacros MCStreamer API asKevin Enderby2009-07-20
| | | | | | | | | | the parsing of the .dump and .load should be done in the assembly parser and not have any need for an MCStreamer API. Changed the code for now so these just produce an error saying these specific directives are not yet implemented since they are likely no longer used and may never need to be implemented. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76462 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed the SubsectionsViaSymbols MCStreamer API and replaced it with a genericKevin Enderby2009-07-16
| | | | | | | | EmitAssemblerFlag API which takes a value from the added AssemblerFlag enumerated constants. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76087 91177308-0d34-0410-b5e6-96231b3b80d8
* implement .include in the lexer/parser instead of passing it into the streamer.Chris Lattner2009-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75896 91177308-0d34-0410-b5e6-96231b3b80d8
* Added llvm-mc support for parsing the .dump and .load directives.Kevin Enderby2009-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75786 91177308-0d34-0410-b5e6-96231b3b80d8
* Added llvm-mc support for parsing the .include directive.Kevin Enderby2009-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75711 91177308-0d34-0410-b5e6-96231b3b80d8
* Added llvm-mc support for parsing the .lsym directive.Kevin Enderby2009-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75685 91177308-0d34-0410-b5e6-96231b3b80d8
* Added llvm-mc support for parsing the .desc directive.Kevin Enderby2009-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75645 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-14
| | | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75640 91177308-0d34-0410-b5e6-96231b3b80d8
* Added llvm-mc support for parsing the .abort directive.Kevin Enderby2009-07-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75545 91177308-0d34-0410-b5e6-96231b3b80d8
* add llvm-mc support for parsing the .subsections_via_symbols directive.Kevin Enderby2009-07-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75500 91177308-0d34-0410-b5e6-96231b3b80d8
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-11
| | | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75379 91177308-0d34-0410-b5e6-96231b3b80d8
* add support for .zerofill, patch by Kevin Enderby!Chris Lattner2009-07-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75301 91177308-0d34-0410-b5e6-96231b3b80d8
* add llvm-mc support for parsing the .lcomm directive, patch by Kevin Enderby!Chris Lattner2009-07-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75148 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement parsing support for the .comm directive. Patch byChris Lattner2009-07-07
| | | | | | | Kevin Enderby! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74944 91177308-0d34-0410-b5e6-96231b3b80d8
* Dump MCInsts in the MC .s printer, for now.Daniel Dunbar2009-07-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74593 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Parse .{,b,p2}align{,w,l} directives.Daniel Dunbar2009-06-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74478 91177308-0d34-0410-b5e6-96231b3b80d8
* Initialize CurSection in constructor.Torok Edwin2009-06-29
| | | | | | | Not doing so causes some unittests to fail, because CurSection is uninitialized. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74442 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename MCValue::getCst to getConstant and add MCValue::isConstant.Daniel Dunbar2009-06-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74440 91177308-0d34-0410-b5e6-96231b3b80d8