summaryrefslogtreecommitdiff
path: root/tools/llvm-mc
Commit message (Collapse)AuthorAge
...
* Added a tester for the enhanced disassembler,Sean Callanan2010-04-09
| | | | | | | integrated into the llvm-mc testing tool. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100842 91177308-0d34-0410-b5e6-96231b3b80d8
* tidy #includes.Chris Lattner2010-04-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100489 91177308-0d34-0410-b5e6-96231b3b80d8
* fix an ugly wart in the MCInstPrinter api where theChris Lattner2010-04-04
| | | | | | | | | raw_ostream to print an instruction to had to be specified at MCInstPrinter construction time instead of being able to pick at each call to printInstruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100307 91177308-0d34-0410-b5e6-96231b3b80d8
* remove some extraneous castsChris Lattner2010-04-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100287 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Add a -mc-relax-all option, which relaxes every fixup. We always needDaniel Dunbar2010-03-25
| | | | | | | exactly two passes in that case, and don't ever need to recompute any layout, so this is a nice baseline for relaxation performance. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99563 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Support -filetype=null, for timing purposes.Daniel Dunbar2010-03-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99349 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Fix MCInstPrinter memory leaks.Daniel Dunbar2010-03-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99101 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Fix memory leak of MCAsmInfo.Daniel Dunbar2010-03-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99098 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Fix target selection for --disassemble to use GetTarget.Daniel Dunbar2010-03-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98973 91177308-0d34-0410-b5e6-96231b3b80d8
* fix an MCInstPrinter leak that jyasskin pointed out:Chris Lattner2010-03-19
| | | | | | | createAsmStreamer now takes ownership of the instprinter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98939 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Delete output files on error.Daniel Dunbar2010-03-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98445 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Support -n, useful for comparing -integrated-as output since theDaniel Dunbar2010-03-13
| | | | | | compiler may not lead with the text section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98418 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Support -arch as a simplified form of -triple.Daniel Dunbar2010-03-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98417 91177308-0d34-0410-b5e6-96231b3b80d8
* remove MAI argument from createAsmStreamer since itChris Lattner2010-03-12
| | | | | | | can get it from the context now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98361 91177308-0d34-0410-b5e6-96231b3b80d8
* change MCContext to always have an MCAsmInfo.Chris Lattner2010-03-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98293 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Provide MCAssembler with a TargetAsmBackend.Daniel Dunbar2010-03-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98222 91177308-0d34-0410-b5e6-96231b3b80d8
* give MCCodeEmitters access to the current MCContext.Chris Lattner2010-02-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96038 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Remove --show-fixups and always show as part of --show-encoding.Daniel Dunbar2010-02-10
| | | | | | Also, fix a silly memory leak. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95752 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Add --show-fixups option, for displaying the instruction fixup ↵Daniel Dunbar2010-02-09
| | | | | | information in the asm comments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95710 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Add --show-inst option, for showing the MCInst inline with the assemblyDaniel Dunbar2010-02-03
| | | | | | output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95227 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed the disassembler so it accepts multipleSean Callanan2010-02-03
| | | | | | | | instructions on a single line. Also made it a bit more forgiving when it reports errors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95197 91177308-0d34-0410-b5e6-96231b3b80d8
* make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.Chris Lattner2010-01-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94378 91177308-0d34-0410-b5e6-96231b3b80d8
* 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