summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mc
Commit message (Collapse)AuthorAgeFilesLines
...
* Line this up as well.Nick Lewycky2009-11-011-1/+1
| | | | llvm-svn: 85748
* Fix whitespace.Nick Lewycky2009-11-011-2/+2
| | | | llvm-svn: 85747
* Move DataTypes.h to include/llvm/System, update all users. This breaks the lastChandler Carruth2009-10-261-1/+1
| | | | | | direct inclusion edge from System to Support. llvm-svn: 85086
* MC: Remove unneeded context argument to MCExpr::Evaluate*.Daniel Dunbar2009-10-161-1/+1
| | | | llvm-svn: 84233
* MC: Tweak variable assignment diagnostics, and make reassignment of non-absoluteDaniel Dunbar2009-10-161-7/+18
| | | | | | variables and symbols invalid. llvm-svn: 84232
* MC: When parsing a variable reference, substitute absolute variables immediatelyDaniel Dunbar2009-10-161-4/+15
| | | | | | since they are allowed to be redefined. llvm-svn: 84230
* add a new DirectiveMap stringmap, which allows more efficient dispatchingChris Lattner2009-09-272-23/+35
| | | | | | | | to directive handlers and allows for easier extensibility. I only switched a few over for now. llvm-svn: 82926
* avoid copying MCAsmInfo by value, add an (extremely low prio) fixme.Chris Lattner2009-09-272-5/+3
| | | | llvm-svn: 82911
* Add an intel syntax MCInstPrinter implementation. You can nowChris Lattner2009-09-201-3/+5
| | | | | | transcode from AT&T to intel syntax with "llvm-mc foo.s -output-asm-variant=1" llvm-svn: 82385
* Fixed some problems with the logic of parsing line comments by addingKevin Enderby2009-09-162-9/+13
| | | | | | | isAtStartOfComment and using that instead in two places where a loop to check if the char was in MAI.getCommentString(). llvm-svn: 82059
* use an accessor to simplify code.Chris Lattner2009-09-161-5/+2
| | | | llvm-svn: 81997
* Change MCAsmStreamer to take an MCInstPrinter instead of a Chris Lattner2009-09-141-5/+8
| | | | | | | | | | | full AsmPrinter, and change TargetRegistry to keep track of registered MCInstPrinters. llvm-mc is still linking in the entire target foo to get the code emitter stuff, but this is an important step in the right direction. llvm-svn: 81754
* Added the ParseInstruction() hook for target specific assembler directives soKevin Enderby2009-09-102-2/+6
| | | | | | | | that things like .word can be parsed as target specific. Moved parsing .word out of AsmParser.cpp into X86AsmParser.cpp as it is 2 bytes on X86 and 4 bytes for other targets that support the .word directive. llvm-svn: 81461
* MC: Give target specific parsers access to the MCStreamer.Daniel Dunbar2009-09-101-0/+2
| | | | llvm-svn: 81416
* Fix an integer truncation noticed by MSVC.Benjamin Kramer2009-09-061-1/+1
| | | | llvm-svn: 81109
* Added AsmToken enum constants to MCAsmLexer.h for '[', ']', '{', and '}' inKevin Enderby2009-09-041-0/+4
| | | | | | | preparation of supporting other targets. Then changed the lexer to parse these as tokens. llvm-svn: 81050
* Added the AsmToken::Hash enum constant to MCAsmLexer.h in preparation ofKevin Enderby2009-09-044-25/+48
| | | | | | | | supporting other targets. Changed the code to pass MCAsmInfo to the parser and the lexer. Then changed the lexer to use CommentString from MCAsmInfo instead of a literal '#' character. llvm-svn: 81046
* Removed the non-target independent AsmToken::Register enum constantKevin Enderby2009-09-033-16/+1
| | | | | | | | | | from MCAsmLexer.h in preparation of supporting other targets. Changed the X86AsmParser code to reflect this by removing AsmLexer::LexPercent and looking for AsmToken::Percent when parsing in places that used AsmToken::Register. Then changed X86ATTAsmParser::ParseRegister to parse out registers as an AsmToken::Percent followed by an AsmToken::Identifier. llvm-svn: 80929
* TAI -> MAIChris Lattner2009-09-031-4/+4
| | | | llvm-svn: 80899
* llvm-mc: Pass values to MCStreamer as MCExprs, not MCValues.Daniel Dunbar2009-08-311-27/+10
| | | | llvm-svn: 80578
* llvm-mc: Simplify EmitAssignment ('.set' is identical to '=').Daniel Dunbar2009-08-312-5/+5
| | | | llvm-svn: 80577
* llvm-mc: Remove MCAsmParser::Parse[Paren]RelocatableExpression.Daniel Dunbar2009-08-312-37/+27
| | | | llvm-svn: 80576
* llvm-mc: Add MCAsmParser::Parse[Paren]Expression forms which return an MCExpr.Daniel Dunbar2009-08-312-0/+10
| | | | llvm-svn: 80574
* llvm-mc: Add MCAsmParser::getContext.Daniel Dunbar2009-08-312-18/+13
| | | | llvm-svn: 80571
* llvm-mc: Switch MCExpr construction to using static member functions, and ↵Daniel Dunbar2009-08-312-19/+19
| | | | | | taking the MCContext (which now owns all MCExprs). llvm-svn: 80569
* llvm-mc: Move AsmExpr into MC lib (as MCExpr).Daniel Dunbar2009-08-315-384/+42
| | | | llvm-svn: 80567
* llvm-mc: MCStreamer cleanups. - Remove EmitLocalSymbol, this is unsupported ↵Daniel Dunbar2009-08-301-9/+12
| | | | | | | | for now. - Switch Emit{CommonSymbol,Zerofill} to take alignment in bytes (for consistency). llvm-svn: 80484
* llvm-mc: Emit .lcomm as .zerofill.Daniel Dunbar2009-08-281-1/+7
| | | | llvm-svn: 80343
* llvm-mc: Unique zero fill sections.Daniel Dunbar2009-08-281-17/+9
| | | | llvm-svn: 80342
* Revert r80305, I forgot a dependent change.Daniel Dunbar2009-08-271-9/+17
| | | | | | | --- Reverse-merging r80305 into '.': U tools/llvm-mc/AsmParser.cpp llvm-svn: 80309
* 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
OpenPOWER on IntegriCloud