summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mc
Commit message (Collapse)AuthorAgeFilesLines
...
* llvm-mc: Unique sections in .zerofill.Daniel Dunbar2009-08-271-17/+9
| | | | llvm-svn: 80305
* llvm-mc/Mach-O: Add MCCodeEmitter support, for encoding instructions.Daniel Dunbar2009-08-271-1/+2
| | | | | | - No relocations yet, of course. llvm-svn: 80235
* llvm-mc: Only show instruction encodings with --show-encoding.Daniel Dunbar2009-08-271-1/+5
| | | | llvm-svn: 80230
* llvm-mc: Tweak MCCodeEmitter skeleton.Daniel Dunbar2009-08-271-1/+1
| | | | llvm-svn: 80193
* Sketch TargetRegistry support for MCCodeEmitter abstract interface.Daniel Dunbar2009-08-271-1/+4
| | | | | | - Of course, nothing actually can provide this interface yet. llvm-svn: 80188
* llvm-mc/Mach-O: Unique sections properly, so we don't get duplicate textDaniel Dunbar2009-08-263-23/+71
| | | | | | | | sections, etc. - The quick and dirty way, just clone the TargetLoweringObjectFile code. Eventually this should be shared... somehow. llvm-svn: 80168
* llvm-mc/Mach-O: Don't put assembler temporary labels in the symbol table.Daniel Dunbar2009-08-262-11/+22
| | | | | | | | - I moved section creation back into AsmParser. I think policy decisions like this should be pushed higher, not lower, when possible (in addition the assembler has flags which change this behavior, for example). llvm-svn: 80162
* llvm-mc: Make MCValue take const MCSymbol*s.Daniel Dunbar2009-08-261-4/+4
| | | | llvm-svn: 80078
* llvm-mc: Make non-sensical max bytes to .align an error.Daniel Dunbar2009-08-261-5/+10
| | | | | | Also, warn about overflow in alignment values. llvm-svn: 80077
* Make LLVM command-line tools overwrite their output files without -f.Dan Gohman2009-08-251-5/+2
| | | | | | | | | | | | | | | | This is conventional command-line tool behavior. -f now just means "enable binary output on terminals". Add a -f option to llvm-extract and llvm-link, for consistency. Remove F_Force from raw_fd_ostream and enable overwriting and truncating by default. Introduce an F_Excl flag to permit users to enable a failure when the file already exists. This flag is currently unused. Update Makefiles and documentation accordingly. llvm-svn: 79990
* Change raw_fd_ostream to take flags as an optional bitmask Chris Lattner2009-08-231-6/+8
| | | | | | | | | | | | | | | | instead of as two bools. Use this to add a F_Append flag which has the obvious behavior. Other unrelated changes conflated into this patch: 1. REmove EH stuff from llvm-dis and llvm-as, the try blocks are dead. 2. Simplify the filename inference code in llvm-as/llvm-dis, because raw_fd_ostream does the right thing with '-'. 3. Switch machine verifier to use raw_ostream instead of ostream (Which is the thing that needed append in the first place). llvm-svn: 79807
* Rename TargetAsmInfo (and its subclasses) to MCAsmInfo.Chris Lattner2009-08-221-1/+1
| | | | llvm-svn: 79763
* llvm-mc: Clean up some handling of symbol/section association to be more correctDaniel Dunbar2009-08-221-21/+5
| | | | | | | | | (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. llvm-svn: 79733
* llvm-mc: Improve handling of implicit alignment for magic section directivesDaniel Dunbar2009-08-211-1/+12
| | | | | | | | (e.g., .objc_message_refs). - Just emit a .align when we see the directive; this isn't exactly what 'as' does but in practice it should be ok, at least for now. See FIXME. llvm-svn: 79697
* llvm-mc: In a .fill directive, still honor .align even if invalid maximum bytesDaniel Dunbar2009-08-211-3/+4
| | | | | | count is given (this matches 'as'). llvm-svn: 79683
* llvm-mc: Accept .fill size of 8.Daniel Dunbar2009-08-211-2/+2
| | | | llvm-svn: 79635
* llvm-mc: Start MCAssembler and MCMachOStreamer.Daniel Dunbar2009-08-211-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Together these form the (Mach-O) back end of the assembler. - MCAssembler is the actual assembler backend, which is designed to have a reasonable API. This will eventually grow to support multiple object file implementations, but for now its Mach-O/i386 only. - MCMachOStreamer adapts the MCStreamer "actions" API to the MCAssembler API, e.g. converting the various directives into fragments, managing state like the current section, and so on. - llvm-mc will use the new backend via '-filetype=obj', which may eventually be, but is not yet, since I hear that people like assemblers which actually assemble. - The only thing that works at the moment is changing sections. For the time being I have a Python Mach-O dumping tool in test/scripts so this stuff can be easily tested, eventually I expect to replace this with a real LLVM tool. - More doxyments to come. I assume that since this stuff doesn't touch any of the things which are part of 2.6 that it is ok to put this in not so long before the freeze, but if someone objects let me know, I can pull it. llvm-svn: 79612
* llvm-mc: Various section parsing fixes.Daniel Dunbar2009-08-212-44/+84
| | | | | | | | | | | | | | | - Add missing flags for various Objective-C sections. - Fix names for [non_]lazy_symbol_pointer (these are misspelled in the manual). - .symbol_stub does not have the self modifying code flag set (this appears to be wrong in the manual?). - Add implicit alignment values; not yet used. Also, call MCStreamer::Finish at the end of a successful parse. llvm-svn: 79611
* Don't install llvm-mc by default.Daniel Dunbar2009-08-211-0/+1
| | | | llvm-svn: 79604
* Fix a commento.Daniel Dunbar2009-08-191-1/+1
| | | | llvm-svn: 79427
* give MCAsmStreamer a TargetAsmInfo.Chris Lattner2009-08-171-9/+9
| | | | llvm-svn: 79222
* llvm-mc: Support escaped characters in string literals (for .ascii and .asciz)Daniel Dunbar2009-08-142-5/+67
| | | | llvm-svn: 79010
* Update llvm-mc / MCAsmStreamer to print the instruction using the actual targetDaniel Dunbar2009-08-141-21/+42
| | | | | | | | | | | 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
* llvm-mc: Move MCAsmToken::getLoc() into MC library where it belongs.Daniel Dunbar2009-08-141-4/+0
| | | | llvm-svn: 78980
* llvm-mc: Fix a crash on invalid due to a typo in relocatable expressionDaniel Dunbar2009-08-111-1/+1
| | | | | | evaluation. llvm-svn: 78692
* llvm-mc: Accept .word as a synonym for .shortDaniel Dunbar2009-08-111-1/+1
| | | | llvm-svn: 78641
* llvm-mc: Honor -o option (and add -f).Daniel Dunbar2009-08-111-2/+35
| | | | llvm-svn: 78640
* llvm-mc: Sketch parsing for .file, .line, and .loc. No streamer hooks for theseDaniel Dunbar2009-08-112-0/+100
| | | | | | yet (I'm not even sure what they do). llvm-svn: 78639
* llvm-mc: Fix darwin .section parsing. It was skipping the section name and a ','Daniel Dunbar2009-08-111-4/+14
| | | | | | | (and outputting a diagnostic pointing at the wrong place), all of which lead to much confusion. llvm-svn: 78637
* split MachO section handling stuff out to its out .h/.cpp file.Chris Lattner2009-08-102-2/+2
| | | | llvm-svn: 78576
* add a fixmeChris Lattner2009-08-101-0/+4
| | | | llvm-svn: 78575
* Make the big switch: Change MCSectionMachO to represent a section *semantically*Chris Lattner2009-08-105-99/+116
| | | | | | | | | | | | | | | | 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
* sink the 'name' and 'isdirective' state out of MCSection into its derived ↵Chris Lattner2009-08-082-5/+5
| | | | | | | | classes. This totally optimizes PIC16 sections by not having an 'isdirective' bit anymore!! ;-) llvm-svn: 78517
* switch this to create coff sections for now, it doesn't really matter for Chris Lattner2009-08-082-5/+5
| | | | | | | llvm-mc's purpose yet and we'll want to switch to creating semantic sections at some point. llvm-svn: 78509
* Always initialize AsmConds.Benjamin Kramer2009-08-081-0/+2
| | | | llvm-svn: 78463
* Added Mac OS X assembler style conditional assembly. I may come back and see ifKevin Enderby2009-08-073-2/+211
| | | | | | | | I can clean this up a bit more and do way with the TheCondState and just use the top element on the TheCondStack if not empty. Also may tweak the code around ParseConditionalAssemblyDirectives() to simplify the AsmParser code. llvm-svn: 78423
* Remove now unused arguments from TargetRegistry::lookupTarget.Daniel Dunbar2009-08-031-5/+1
| | | | llvm-svn: 77950
* Make SectionKind::get() private.Chris Lattner2009-08-021-1/+1
| | | | llvm-svn: 77835
* update for API change.Chris Lattner2009-08-012-4/+5
| | | | llvm-svn: 77804
* All MCSections are now required to have a SectionKind.Chris Lattner2009-08-012-5/+7
| | | | llvm-svn: 77787
* llvm-mc: More quoted identifier support.Daniel Dunbar2009-08-012-43/+63
| | | | llvm-svn: 77761
* llvm-mc: Support quoted identifiers.Daniel Dunbar2009-07-311-5/+7
| | | | | | | | | - Uses MCAsmToken::getIdentifier which returns the (sub)string representing the meaningfull contents a string or identifier token. - Directives aren't done yet. llvm-svn: 77739
* fix some more issues where we expected GetSection to do "get or create"Chris Lattner2009-07-311-2/+12
| | | | llvm-svn: 77700
* fix a bunch of failing tests now that MCContext::GetSection doesn't create ↵Chris Lattner2009-07-312-4/+16
| | | | | | sections. llvm-svn: 77689
* Update CMakeListsDaniel Dunbar2009-07-281-1/+0
| | | | llvm-svn: 77385
* Move X86 instruction parsing into X86/AsmParser.Daniel Dunbar2009-07-284-278/+2
| | | | llvm-svn: 77384
* Make expression parsing and error/warning reporting available through theDaniel Dunbar2009-07-281-24/+15
| | | | | | generic MCAsmParser interface. llvm-svn: 77381
* Provide generic MCAsmParser when constructing target specific parsers.Daniel Dunbar2009-07-282-21/+27
| | | | llvm-svn: 77362
* Switch X86 assembly parser to using the generic lexer interface.Daniel Dunbar2009-07-281-28/+28
| | | | llvm-svn: 77341
* Expose Tokens to target specific assembly parsers.Daniel Dunbar2009-07-282-81/+6
| | | | llvm-svn: 77337
OpenPOWER on IntegriCloud