summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
Commit message (Collapse)AuthorAgeFilesLines
* change AsmPrinter to switch sections using AsmStreamer instead ofChris Lattner2009-08-172-7/+5
| | | | | | | | | 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. llvm-svn: 79227
* give MCAsmStreamer a TargetAsmInfo.Chris Lattner2009-08-171-4/+7
| | | | llvm-svn: 79222
* formatting cleanups, no functionality change.Chris Lattner2009-08-171-43/+36
| | | | llvm-svn: 79221
* add support for target-specific ELF section flags, add a new MCSectionXCoreChris Lattner2009-08-151-4/+6
| | | | | | | class which represents the XCore cp/dp section flags. No functionality change yet. llvm-svn: 79077
* llvm-mc: Fix bugs where bytes were unintentionally being printed as signed.Daniel Dunbar2009-08-141-1/+1
| | | | | | | - We now print all of 403.gcc cleanly (llvm-mc -> 'as' as diffed to 'as'), minus two 'rep;movsl' instructions (which I missed before). llvm-svn: 79031
* *try* to use a better name to describe how common symbols are marked on the ↵Bruno Cardoso Lopes2009-08-141-2/+4
| | | | | | elf object file. llvm-svn: 79029
* llvm-mc: When handling a .set, make sure to print subsequent references to theDaniel Dunbar2009-08-141-2/+9
| | | | | | | | 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). llvm-svn: 79025
* llvm-mc: zerofill shouldn't print quotes around the section,segment.Daniel Dunbar2009-08-141-2/+1
| | | | llvm-svn: 79017
* CMake: updated list of source files for library MC.Oscar Fuentes2009-08-141-0/+2
| | | | llvm-svn: 78988
* Update llvm-mc / MCAsmStreamer to print the instruction using the actual targetDaniel Dunbar2009-08-141-43/+21
| | | | | | | | | | | 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. :) llvm-svn: 78986
* Add MCSymbol::{print, dump}Daniel Dunbar2009-08-142-3/+56
| | | | llvm-svn: 78983
* Add MCValue::{print, dump}Daniel Dunbar2009-08-141-0/+30
| | | | llvm-svn: 78982
* llvm-mc: Move MCAsmToken::getLoc() into MC library where it belongs.Daniel Dunbar2009-08-141-0/+5
| | | | llvm-svn: 78980
* Fix MCSectionELF::ShouldOmitSectionDirective's matching of .data andDan Gohman2009-08-131-3/+3
| | | | | | | friends so that it doesn't match sections like .data.rel.local, which should not be emitted as section directives. llvm-svn: 78963
* llvm-mc: Add dummy MCStreamer implementation, (eventually) for use in profiling.Daniel Dunbar2009-08-132-5/+74
| | | | | | | | - Currently unused. - A few other random comment fixes lumped in. llvm-svn: 78960
* Remove HasCrazyBSS and add a flag in TAI to indicate that '.section' Bruno Cardoso Lopes2009-08-131-9/+10
| | | | | | must be emitted for PowerPC-Linux '.bss' section llvm-svn: 78958
* Add a method to return if the ELF section contains only common symbols!Bruno Cardoso Lopes2009-08-131-0/+10
| | | | llvm-svn: 78937
* Change MCSectionELF to represent a section semantically instead ofBruno Cardoso Lopes2009-08-133-85/+124
| | | | | | | syntactically as a string, very similiar to what Chris did with MachO. The parsing support and validation is not introduced yet. llvm-svn: 78890
* sink uniquing of sections out of MCContext into the ELF and PECOFF TLOF ↵Chris Lattner2009-08-132-21/+2
| | | | | | | | implementations. MCContext no longer maintains a string -> section map. llvm-svn: 78874
* add some comments: MCContext owns the MCSections, but it bump pointer allocatesChris Lattner2009-08-131-0/+2
| | | | | | them, so it doesn't have to explicitly free them. llvm-svn: 78870
* split MachO section handling stuff out to its out .h/.cpp file.Chris Lattner2009-08-104-270/+281
| | | | llvm-svn: 78576
* Make the big switch: Change MCSectionMachO to represent a section *semantically*Chris Lattner2009-08-102-12/+261
| | | | | | | | | | | | | | | | 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? llvm-svn: 78547
* always end a section with \n on elf.Chris Lattner2009-08-091-0/+2
| | | | llvm-svn: 78534
* sink the 'name' and 'isdirective' state out of MCSection into its derived ↵Chris Lattner2009-08-082-19/+28
| | | | | | | | classes. This totally optimizes PIC16 sections by not having an 'isdirective' bit anymore!! ;-) llvm-svn: 78517
* 1. Make MCSection an abstract class.Chris Lattner2009-08-081-5/+109
| | | | | | | | | 2. Move section switch printing to MCSection virtual method which takes a TAI. This eliminates textual formatting stuff from TLOF. 3. Eliminate SwitchToSectionDirective, getSectionFlagsAsString, and TLOFELF::AtIsCommentChar. llvm-svn: 78510
* make target-specific TLOF impls (except PIC16) create target-specificChris Lattner2009-08-081-2/+2
| | | | | | MCSection instances. llvm-svn: 78500
* stub out PECOFF/MachO/ELF MCSection classesChris Lattner2009-08-081-2/+20
| | | | llvm-svn: 78499
* Change SectionKind to be a property that is true of a *section*, itChris Lattner2009-08-011-5/+6
| | | | | | | | | | | | | | | | | | should have no state that is specific to particular globals in the section. In this case, it means the removal of the "isWeak" and "ExplicitSection" bits. MCSection uses the new form of SectionKind. To handle isWeak, I introduced a new SectionInfo class, which is SectionKind + isWeak, and it is used by the part of the code generator that does classification of a specific global. The ExplicitSection disappears. It is moved onto MCSection as a new "IsDirective" bit. Since the Name of a section is either a section or directive, it makes sense to keep this bit in MCSection. Ultimately the creator of MCSection should canonicalize (e.g.) .text to whatever the actual section is. llvm-svn: 77803
* All MCSections are now required to have a SectionKind.Chris Lattner2009-08-011-8/+5
| | | | llvm-svn: 77787
* llvm-mc: Fix .s output to quote section & symbol names when necessary.Daniel Dunbar2009-07-311-12/+51
| | | | llvm-svn: 77749
* split MCSection stuff out to its own .cpp file, add a newChris Lattner2009-07-313-12/+32
| | | | | | MCSectionWithKind subclass of MCSection. llvm-svn: 77684
* create sections with MCSection::Create instead of Context->getOrCreateSection.Chris Lattner2009-07-311-8/+15
| | | | | | This is needed to allow polymorphic sections. llvm-svn: 77680
* Expose Tokens to target specific assembly parsers.Daniel Dunbar2009-07-281-1/+1
| | | | llvm-svn: 77337
* llvm-mc: Implement .abort fully in the front endDaniel Dunbar2009-07-271-10/+0
| | | | llvm-svn: 77272
* llvm-mc: Move AsmLexer::getCurStrVal to StringRef based API.Daniel Dunbar2009-07-271-3/+3
| | | | | | - My DFS traversal of LLVM is, at least for now, nearly complete! :) llvm-svn: 77258
* Move MCContext and friends to StringRef based APIs.Daniel Dunbar2009-07-271-6/+6
| | | | llvm-svn: 77251
* Removed the DumpSymbolsandMacros and LoadSymbolsandMacros MCStreamer API asKevin Enderby2009-07-201-12/+0
| | | | | | | | | 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. llvm-svn: 76462
* Add MCAsmLexer interface.Daniel Dunbar2009-07-202-0/+19
| | | | | | - This provides the AsmLexer interface to the target specific assembly parsers. llvm-svn: 76460
* Add MCAsmParser interface.Daniel Dunbar2009-07-202-0/+19
| | | | | | | - This provides the AsmParser interface to the target specific assembly parsers. llvm-svn: 76453
* Update CMake file.Ted Kremenek2009-07-171-0/+1
| | | | llvm-svn: 76264
* llvm-mc: Add -triple, and start fetching the target asm printer.Daniel Dunbar2009-07-171-0/+19
| | | | llvm-svn: 76257
* Removed the SubsectionsViaSymbols MCStreamer API and replaced it with a genericKevin Enderby2009-07-161-3/+6
| | | | | | | EmitAssemblerFlag API which takes a value from the added AssemblerFlag enumerated constants. llvm-svn: 76087
* implement .include in the lexer/parser instead of passing it into the streamer.Chris Lattner2009-07-161-6/+0
| | | | llvm-svn: 75896
* Added llvm-mc support for parsing the .dump and .load directives.Kevin Enderby2009-07-151-0/+12
| | | | llvm-svn: 75786
* Added llvm-mc support for parsing the .include directive.Kevin Enderby2009-07-141-0/+6
| | | | llvm-svn: 75711
* Added llvm-mc support for parsing the .lsym directive.Kevin Enderby2009-07-141-0/+6
| | | | llvm-svn: 75685
* Added llvm-mc support for parsing the .desc directive.Kevin Enderby2009-07-141-0/+6
| | | | llvm-svn: 75645
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-3/+3
| | | | | | | | | 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"). llvm-svn: 75640
* Added llvm-mc support for parsing the .abort directive.Kevin Enderby2009-07-131-0/+10
| | | | llvm-svn: 75545
* add llvm-mc support for parsing the .subsections_via_symbols directive.Kevin Enderby2009-07-131-0/+6
| | | | llvm-svn: 75500
OpenPOWER on IntegriCloud