summaryrefslogtreecommitdiff
path: root/tools/llvm-mc
Commit message (Collapse)AuthorAge
...
* pass "-fasm-verbose" into createAsmStreamer.Chris Lattner2010-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94165 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop building RTTI information for *most* llvm libraries. NotableChris Lattner2010-01-22
| | | | | | | | | | | | | missing ones are libsupport, libsystem and libvmcore. libvmcore is currently blocked on bugpoint, which uses EH. Once it stops using EH, we can switch it off. This #if 0's out 3 unit tests, because gtest requires RTTI information. Suggestions welcome on how to fix this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94164 91177308-0d34-0410-b5e6-96231b3b80d8
* move some files out of the llvm-mc tool into the MCParser library soChris Lattner2010-01-22
| | | | | | | other tools can link it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94131 91177308-0d34-0410-b5e6-96231b3b80d8
* create a new MCParser library and move some stuff into it.Chris Lattner2010-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94129 91177308-0d34-0410-b5e6-96231b3b80d8
* remove some confused code that used strtoullChris Lattner2010-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94128 91177308-0d34-0410-b5e6-96231b3b80d8
* Moved handling of inclusion from the AsmLexer toSean Callanan2010-01-21
| | | | | | | | the AsmParser, breaking AsmLexer's dependence on SourceMgr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94054 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed the AsmParser to handle error messages itselfSean Callanan2010-01-20
| | | | | | | | | rather than passing them off to the AsmLexer to handle. This means the AsmLexer no longer requires a SourceMgr to do error handling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94047 91177308-0d34-0410-b5e6-96231b3b80d8
* Promoted the reference to the SourceMgr from AsmLexerSean Callanan2010-01-20
| | | | | | | | into AsmParser, in preparation for making AsmLexer independent of the SourceMgr git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94043 91177308-0d34-0410-b5e6-96231b3b80d8
* Modified MCAsmLexer to return error information upwardSean Callanan2010-01-20
| | | | | | | | rather than printing it locally, reducing its dependence on SourceMgr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94041 91177308-0d34-0410-b5e6-96231b3b80d8
* give createAsmStreamer an 'isLittleEndian' argument.Chris Lattner2010-01-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93986 91177308-0d34-0410-b5e6-96231b3b80d8
* Promoted the getTok() method to MCAsmParser so thatSean Callanan2010-01-19
| | | | | | | | the two token accessor functions are declared consistently. Modified the clients of MCAsmParser to reflect this change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93916 91177308-0d34-0410-b5e6-96231b3b80d8
* Added a Lex function to the AsmParser, to allow handlingSean Callanan2010-01-19
| | | | | | | | | of include directives to occur within the parser itself. This will break the lexer's dependency on a SourceMgr as input. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93899 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize mcasmstreamer data emission APIs to take an address spaceChris Lattner2010-01-19
| | | | | | | identifier. There is no way to work around it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93896 91177308-0d34-0410-b5e6-96231b3b80d8
* add a "MCStreamer::EmitFill" method, and move the default implementationChris Lattner2010-01-19
| | | | | | | (which just iteratively emits bytes) to MCStreamer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93888 91177308-0d34-0410-b5e6-96231b3b80d8
* fix parsing .comm directives on systems which do not represent alignmentsChris Lattner2010-01-19
| | | | | | | as a power of 2. This fixes MC/AsmParser/directive_comm.s git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93867 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a bug in range information for $42, eliminate an Chris Lattner2010-01-15
| | | | | | | unneeded argument from ParseExpression. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93536 91177308-0d34-0410-b5e6-96231b3b80d8
* extend MCAsmParser::ParseExpression and ParseParenExpressionChris Lattner2010-01-15
| | | | | | | | to return range information for subexpressions. Use this to provide range info for several new X86Operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93534 91177308-0d34-0410-b5e6-96231b3b80d8
* add virtual methods to get the start/end of a MCParsedAsmOperand,Chris Lattner2010-01-14
| | | | | | | the default implementation returns "unknown". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93470 91177308-0d34-0410-b5e6-96231b3b80d8
* Split the TargetAsmParser "ParseInstruction" interface in half:Chris Lattner2010-01-14
| | | | | | | | | | | | the new ParseInstruction method just parses and returns a list of target operands. A new MatchInstruction interface is used to turn the operand list into an MCInst. This requires new/deleting all the operands, but it also gives targets the ability to use polymorphic operands if they want to. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93469 91177308-0d34-0410-b5e6-96231b3b80d8
* prune #includes in TargetAsmParser.hChris Lattner2010-01-14
| | | | | | | | | Pass in SMLoc of instr opcode into ParseInstruction. Make AsmToken be a class, not a struct. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93457 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark some debug variables as 'unused' to quiet compiler and analyzer.Bill Wendling2009-12-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92183 91177308-0d34-0410-b5e6-96231b3b80d8
* rename HexDisassembler -> Disassembler, it works on any inputChris Lattner2009-12-22
| | | | | | | integer encoding (0123, 0b10101, 42, etc). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91934 91177308-0d34-0410-b5e6-96231b3b80d8
* just discard the debug output from the disassembler.Chris Lattner2009-12-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91933 91177308-0d34-0410-b5e6-96231b3b80d8
* specify what is invalid about itChris Lattner2009-12-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91901 91177308-0d34-0410-b5e6-96231b3b80d8
* reject invalid input with a caret, e.g.:Chris Lattner2009-12-22
| | | | | | | | | | | simple-tests.txt:16:1: error: invalid instruction 0xff 0xff ^ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91898 91177308-0d34-0410-b5e6-96231b3b80d8
* various cleanups, make the disassemble reject lines with too muchChris Lattner2009-12-22
| | | | | | | | | | | | | data on them, for example: addb %al, (%rax) simple-tests.txt:11:5: error: excess data detected in input 0 0 0 0 0 ^ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91896 91177308-0d34-0410-b5e6-96231b3b80d8
* If you thought that it didn't make sense for the disassemblerChris Lattner2009-12-22
| | | | | | | to not produce caret diagnostics, you were right! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91895 91177308-0d34-0410-b5e6-96231b3b80d8
* rewrite the file parser for the disassembler, implementing support forChris Lattner2009-12-22
| | | | | | | | comments. Also, check in a simple testcase for the disassembler, including a test for r91864 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91894 91177308-0d34-0410-b5e6-96231b3b80d8
* don't crash on blank lines, rename some variables.Chris Lattner2009-12-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91892 91177308-0d34-0410-b5e6-96231b3b80d8
* Update CMake build to include HexDisassembler.cpp.Chandler Carruth2009-12-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91589 91177308-0d34-0410-b5e6-96231b3b80d8
* Test harness for the LLVM disassembler. When invokedSean Callanan2009-12-17
| | | | | | | | | | | with -disassemble, llvm-mc now accepts lines of the form 0x00 0x00 and passes the resulting bytes to the disassembler for the chosen (or default) target, printing the result. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91579 91177308-0d34-0410-b5e6-96231b3b80d8
* Line this up as well.Nick Lewycky2009-11-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85748 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix whitespace.Nick Lewycky2009-11-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85747 91177308-0d34-0410-b5e6-96231b3b80d8
* Move DataTypes.h to include/llvm/System, update all users. This breaks the lastChandler Carruth2009-10-26
| | | | | | | direct inclusion edge from System to Support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85086 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Remove unneeded context argument to MCExpr::Evaluate*.Daniel Dunbar2009-10-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84233 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Tweak variable assignment diagnostics, and make reassignment of non-absoluteDaniel Dunbar2009-10-16
| | | | | | variables and symbols invalid. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84232 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: When parsing a variable reference, substitute absolute variables immediatelyDaniel Dunbar2009-10-16
| | | | | | since they are allowed to be redefined. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84230 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new DirectiveMap stringmap, which allows more efficient dispatchingChris Lattner2009-09-27
| | | | | | | | | | to directive handlers and allows for easier extensibility. I only switched a few over for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82926 91177308-0d34-0410-b5e6-96231b3b80d8
* avoid copying MCAsmInfo by value, add an (extremely low prio) fixme.Chris Lattner2009-09-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82911 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an intel syntax MCInstPrinter implementation. You can nowChris Lattner2009-09-20
| | | | | | | | transcode from AT&T to intel syntax with "llvm-mc foo.s -output-asm-variant=1" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82385 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed some problems with the logic of parsing line comments by addingKevin Enderby2009-09-16
| | | | | | | | isAtStartOfComment and using that instead in two places where a loop to check if the char was in MAI.getCommentString(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82059 91177308-0d34-0410-b5e6-96231b3b80d8
* use an accessor to simplify code.Chris Lattner2009-09-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81997 91177308-0d34-0410-b5e6-96231b3b80d8
* Change MCAsmStreamer to take an MCInstPrinter instead of a Chris Lattner2009-09-14
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81754 91177308-0d34-0410-b5e6-96231b3b80d8
* Added the ParseInstruction() hook for target specific assembler directives soKevin Enderby2009-09-10
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81461 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Give target specific parsers access to the MCStreamer.Daniel Dunbar2009-09-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81416 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an integer truncation noticed by MSVC.Benjamin Kramer2009-09-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81109 91177308-0d34-0410-b5e6-96231b3b80d8
* Added AsmToken enum constants to MCAsmLexer.h for '[', ']', '{', and '}' inKevin Enderby2009-09-04
| | | | | | | | preparation of supporting other targets. Then changed the lexer to parse these as tokens. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81050 91177308-0d34-0410-b5e6-96231b3b80d8
* Added the AsmToken::Hash enum constant to MCAsmLexer.h in preparation ofKevin Enderby2009-09-04
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81046 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed the non-target independent AsmToken::Register enum constantKevin Enderby2009-09-03
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80929 91177308-0d34-0410-b5e6-96231b3b80d8
* TAI -> MAIChris Lattner2009-09-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80899 91177308-0d34-0410-b5e6-96231b3b80d8