Chris Lattner
9f59b3dd9b
remove some extraneous casts
...
llvm-svn: 100287
2010-04-03 21:03:50 +00:00
Daniel Dunbar
d821f4ac60
llvm-mc: Add a -mc-relax-all option, which relaxes every fixup. We always need
...
exactly two passes in that case, and don't ever need to recompute any layout,
so this is a nice baseline for relaxation performance.
llvm-svn: 99563
2010-03-25 22:49:09 +00:00
Daniel Dunbar
b09b8906cb
llvm-mc: Support -filetype=null, for timing purposes.
...
llvm-svn: 99349
2010-03-23 23:47:12 +00:00
Daniel Dunbar
d9d5b315ab
llvm-mc: Fix MCInstPrinter memory leaks.
...
llvm-svn: 99101
2010-03-20 22:36:35 +00:00
Daniel Dunbar
c5621ed07a
llvm-mc: Fix memory leak of MCAsmInfo.
...
llvm-svn: 99098
2010-03-20 22:36:25 +00:00
Daniel Dunbar
abf6e3657e
llvm-mc: Fix target selection for --disassemble to use GetTarget.
...
llvm-svn: 98973
2010-03-19 18:07:50 +00:00
Chris Lattner
90a7859ebc
fix an MCInstPrinter leak that jyasskin pointed out:
...
createAsmStreamer now takes ownership of the instprinter.
llvm-svn: 98939
2010-03-19 05:48:53 +00:00
Daniel Dunbar
144873437c
llvm-mc: Delete output files on error.
...
llvm-svn: 98445
2010-03-13 19:31:47 +00:00
Daniel Dunbar
322fec671b
llvm-mc: Support -n, useful for comparing -integrated-as output since the
...
compiler may not lead with the text section.
llvm-svn: 98418
2010-03-13 02:20:57 +00:00
Daniel Dunbar
4689211583
llvm-mc: Support -arch as a simplified form of -triple.
...
llvm-svn: 98417
2010-03-13 02:20:38 +00:00
Chris Lattner
ac77bf5d1e
remove MAI argument from createAsmStreamer since it
...
can get it from the context now.
llvm-svn: 98361
2010-03-12 18:28:53 +00:00
Chris Lattner
768ea2add2
change MCContext to always have an MCAsmInfo.
...
llvm-svn: 98293
2010-03-11 22:53:35 +00:00
Daniel Dunbar
c5ddbad237
MC: Provide MCAssembler with a TargetAsmBackend.
...
llvm-svn: 98222
2010-03-11 01:34:27 +00:00
Chris Lattner
741580a5bd
give MCCodeEmitters access to the current MCContext.
...
llvm-svn: 96038
2010-02-12 23:12:47 +00:00
Daniel Dunbar
75c9a4eeae
llvm-mc: Remove --show-fixups and always show as part of --show-encoding.
...
Also, fix a silly memory leak.
llvm-svn: 95752
2010-02-10 01:41:14 +00:00
Daniel Dunbar
9a0a46163d
llvm-mc: Add --show-fixups option, for displaying the instruction fixup information in the asm comments.
...
llvm-svn: 95710
2010-02-09 23:00:14 +00:00
Daniel Dunbar
e3ee332fe0
llvm-mc: Add --show-inst option, for showing the MCInst inline with the assembly
...
output.
llvm-svn: 95227
2010-02-03 18:18:30 +00:00
Sean Callanan
6a6f9cc634
Fixed the disassembler so it accepts multiple
...
instructions on a single line. Also made it a
bit more forgiving when it reports errors.
llvm-svn: 95197
2010-02-03 03:46:41 +00:00
Chris Lattner
823aed16f9
make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.
...
llvm-svn: 94378
2010-01-24 20:43:08 +00:00
Chris Lattner
0522eb2160
pass "-fasm-verbose" into createAsmStreamer.
...
llvm-svn: 94165
2010-01-22 07:06:15 +00:00
Chris Lattner
7ba0661f27
Stop building RTTI information for *most* llvm libraries. Notable
...
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.
llvm-svn: 94164
2010-01-22 06:49:46 +00:00
Chris Lattner
5b0e01c54e
move some files out of the llvm-mc tool into the MCParser library so
...
other tools can link it.
llvm-svn: 94131
2010-01-22 01:58:08 +00:00
Chris Lattner
00646cfbd4
create a new MCParser library and move some stuff into it.
...
llvm-svn: 94129
2010-01-22 01:44:57 +00:00
Chris Lattner
6401c883c4
remove some confused code that used strtoull
...
llvm-svn: 94128
2010-01-22 01:17:12 +00:00
Sean Callanan
7a77eae2f3
Moved handling of inclusion from the AsmLexer to
...
the AsmParser, breaking AsmLexer's dependence on
SourceMgr.
llvm-svn: 94054
2010-01-21 00:19:58 +00:00
Sean Callanan
177934e021
Changed the AsmParser to handle error messages itself
...
rather than passing them off to the AsmLexer to handle.
This means the AsmLexer no longer requires a SourceMgr
to do error handling.
llvm-svn: 94047
2010-01-20 23:19:55 +00:00
Sean Callanan
1a0eeb6e06
Promoted the reference to the SourceMgr from AsmLexer
...
into AsmParser, in preparation for making AsmLexer
independent of the SourceMgr
llvm-svn: 94043
2010-01-20 22:45:23 +00:00
Sean Callanan
70855e42e6
Modified MCAsmLexer to return error information upward
...
rather than printing it locally, reducing its dependence
on SourceMgr.
llvm-svn: 94041
2010-01-20 22:18:24 +00:00
Chris Lattner
38caaf14c1
give createAsmStreamer an 'isLittleEndian' argument.
...
llvm-svn: 93986
2010-01-20 06:39:07 +00:00
Sean Callanan
936b0d3144
Promoted the getTok() method to MCAsmParser so that
...
the two token accessor functions are declared consistently.
Modified the clients of MCAsmParser to reflect this change.
llvm-svn: 93916
2010-01-19 21:44:56 +00:00
Sean Callanan
686ed8d248
Added a Lex function to the AsmParser, to allow handling
...
of include directives to occur within the parser itself.
This will break the lexer's dependency on a SourceMgr as
input.
llvm-svn: 93899
2010-01-19 20:22:31 +00:00
Chris Lattner
c35681b298
Generalize mcasmstreamer data emission APIs to take an address space
...
identifier. There is no way to work around it.
llvm-svn: 93896
2010-01-19 19:46:13 +00:00
Chris Lattner
0c65fd4902
add a "MCStreamer::EmitFill" method, and move the default implementation
...
(which just iteratively emits bytes) to MCStreamer.
llvm-svn: 93888
2010-01-19 18:45:47 +00:00
Chris Lattner
ab9cd3e132
fix parsing .comm directives on systems which do not represent alignments
...
as a power of 2. This fixes MC/AsmParser/directive_comm.s
llvm-svn: 93867
2010-01-19 06:22:22 +00:00
Chris Lattner
e17df0b7f0
fix a bug in range information for $42, eliminate an
...
unneeded argument from ParseExpression.
llvm-svn: 93536
2010-01-15 19:39:23 +00:00
Chris Lattner
528d00b913
extend MCAsmParser::ParseExpression and ParseParenExpression
...
to return range information for subexpressions. Use this to
provide range info for several new X86Operands.
llvm-svn: 93534
2010-01-15 19:28:38 +00:00
Chris Lattner
14bf521792
add virtual methods to get the start/end of a MCParsedAsmOperand,
...
the default implementation returns "unknown".
llvm-svn: 93470
2010-01-14 22:29:57 +00:00
Chris Lattner
f29c0b6880
Split the TargetAsmParser "ParseInstruction" interface in half:
...
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.
llvm-svn: 93469
2010-01-14 22:21:20 +00:00
Chris Lattner
77fd677111
prune #includes in TargetAsmParser.h
...
Pass in SMLoc of instr opcode into ParseInstruction.
Make AsmToken be a class, not a struct.
llvm-svn: 93457
2010-01-14 21:32:45 +00:00
Bill Wendling
ae606a1d1d
Mark some debug variables as 'unused' to quiet compiler and analyzer.
...
llvm-svn: 92183
2009-12-28 01:34:57 +00:00
Chris Lattner
b257d24f62
rename HexDisassembler -> Disassembler, it works on any input
...
integer encoding (0123, 0b10101, 42, etc).
llvm-svn: 91934
2009-12-22 22:50:29 +00:00
Chris Lattner
e3437b33f5
just discard the debug output from the disassembler.
...
llvm-svn: 91933
2009-12-22 22:47:43 +00:00
Chris Lattner
778f92ab02
specify what is invalid about it
...
llvm-svn: 91901
2009-12-22 07:03:21 +00:00
Chris Lattner
502f0f11e0
reject invalid input with a caret, e.g.:
...
simple-tests.txt:16:1: error: invalid instruction
0xff 0xff
^
llvm-svn: 91898
2009-12-22 06:58:29 +00:00
Chris Lattner
dd0c01b5de
various cleanups, make the disassemble reject lines with too much
...
data on them, for example:
addb %al, (%rax)
simple-tests.txt:11:5: error: excess data detected in input
0 0 0 0 0
^
llvm-svn: 91896
2009-12-22 06:56:51 +00:00
Chris Lattner
8879918722
If you thought that it didn't make sense for the disassembler
...
to not produce caret diagnostics, you were right!
llvm-svn: 91895
2009-12-22 06:45:48 +00:00
Chris Lattner
dc9845b79a
rewrite the file parser for the disassembler, implementing support for
...
comments. Also, check in a simple testcase for the disassembler,
including a test for r91864
llvm-svn: 91894
2009-12-22 06:37:58 +00:00
Chris Lattner
72cbaa2ecb
don't crash on blank lines, rename some variables.
...
llvm-svn: 91892
2009-12-22 06:24:00 +00:00
Chandler Carruth
187220e3f5
Update CMake build to include HexDisassembler.cpp.
...
llvm-svn: 91589
2009-12-17 06:35:17 +00:00
Sean Callanan
7e64550747
Test harness for the LLVM disassembler. When invoked
...
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.
llvm-svn: 91579
2009-12-17 01:49:59 +00:00