1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

18 Commits

Author SHA1 Message Date
Bill Wendling
a2eec46242 We need to pass the TargetMachine object to the InstPrinter if we are printing
the alias of an InstAlias instead of the thing being aliased. Because we need to
know the features that are valid for an InstAlias.

This is part of a work-in-progress.

llvm-svn: 127986
2011-03-21 04:13:46 +00:00
Benjamin Kramer
feccb33180 Plug some leaks in edis.
- Don't leak parsed operands during tokenization.
- Don't leak printed insts in llvm-mc.

llvm-svn: 126381
2011-02-24 11:03:19 +00:00
Sean Callanan
d7e66a8942 Fixed a bug in the enhanced disassembly tester that
caused it to only parse one line of input.

llvm-svn: 126301
2011-02-23 03:29:41 +00:00
Sean Callanan
2fd268300e Fixed llvm-mc in edis mode to use the result of
operand.evaluate as an error code, not as the
contents of the operand.

llvm-svn: 126181
2011-02-22 02:09:15 +00:00
Rafael Espindola
64814fff0b Correctly disassemble truncated asm.
Patch by Richard Simth.

llvm-svn: 122962
2011-01-06 16:48:42 +00:00
Benjamin Kramer
cd6c025b08 Push twines deeper into SourceMgr's error handling methods.
llvm-svn: 114847
2010-09-27 17:42:11 +00:00
Dan Gohman
bef725be86 Use the new tool_output_file in several tools. This fixes a variety
of problems with output files being left behind or output streams
being left unclosed. Fix llvm-mc to respect the -o option in all
modes, rather than hardcoding outs() in some cases.

llvm-svn: 111603
2010-08-20 01:07:01 +00:00
Chris Lattner
1ac58ea0f3 start straightening out libedis's dependencies and make it fit
better in the llvm world.  Among other things, this changes:

1. The guts of libedis are now moved into lib/MC/MCDisassembler
2. llvm-mc now depends on lib/MC/MCDisassembler, not tools/edis,
   so edis and mc don't have to be built in series.
3. lib/MC/MCDisassembler no longer depends on the C api, the C
   API depends on it.
4. Various code cleanup changes. 

There is still a lot to be done to make edis fit with the llvm
design, but this is an incremental step in the right direction.

llvm-svn: 108869
2010-07-20 18:25:19 +00:00
Sean Callanan
e79322802a Extended the edis "IsBranch" property to call
instructions as well.  Added support for checking
this to the llvm-mc tester as well.

llvm-svn: 103454
2010-05-11 01:27:08 +00:00
Sean Callanan
7edf493591 Fixed a sign-extension bug in the X86 disassembler
that was causing PC-relative branch targets to be
evaluated incorrectly.  Also added support for
checking operand values to the llvm-mc tester.

llvm-svn: 103128
2010-05-05 22:47:27 +00:00
Chris Lattner
f3ed0658ed Make the disassembler respect the assembler dialect when printing instructions,
patch by Marius Wachtler!

llvm-svn: 101160
2010-04-13 18:41:17 +00:00
Sean Callanan
033fde84b5 Second try at integrating the edis tester. This
time I use the LIBS variable, which is not subject
to a %.a -> -l% transformation, to link llvm-mc
against libEnhancedDisassembly.

llvm-mc -edis works the same as llvm-mc
-disassemble, but outputs tokens and operands.

llvm-svn: 101058
2010-04-12 19:43:00 +00:00
Chris Lattner
bc47db9f8e revert r100842 which broke several of the build bots.
llvm-svn: 100848
2010-04-09 04:24:20 +00:00
Sean Callanan
6a94ce3daf Added a tester for the enhanced disassembler,
integrated into the llvm-mc testing tool.

llvm-svn: 100842
2010-04-09 01:43:16 +00:00
Chris Lattner
8fb6be1886 fix an ugly wart in the MCInstPrinter api where the
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.

llvm-svn: 100307
2010-04-04 05:04:31 +00:00
Daniel Dunbar
78c65dad40 llvm-mc: Fix MCInstPrinter memory leaks.
llvm-svn: 99101
2010-03-20 22:36:35 +00:00
Sean Callanan
0139e2193d 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
57141e5548 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