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

41 Commits

Author SHA1 Message Date
Chris Lattner
7eb3367809 switch to using a smallvector to avoid allocations for most normal size instructions.
llvm-svn: 131837
2011-05-22 04:53:24 +00:00
Chris Lattner
b58a888c57 tidy some things up.
llvm-svn: 131836
2011-05-22 04:52:24 +00:00
Sebastian Redl
0d36a0b806 Give MC/MCDisassembler/Disassembler.h a header guard.
llvm-svn: 130096
2011-04-24 15:46:56 +00:00
Sean Callanan
c550ce0d48 Made the MC disassembler check before accessing
MCInst operands for ARM.  This allows it to be
more tolerant of malformed MCInsts or incorrect
instruction metadata.

llvm-svn: 129840
2011-04-20 00:43:34 +00:00
Chris Lattner
0304b82f80 Fix a ton of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!

llvm-svn: 129558
2011-04-15 05:18:47 +00:00
Kevin Enderby
6e09a5d065 Adding support for printing operands symbolically to llvm's public 'C'
disassembler API.  Hooked this up to the ARM target so such tools as Darwin's
otool(1) can now print things like branch targets for example this:
  blx _puts
instead of this:
  blx #-36
And even print the expression encoded in the Mach-O relocation entried for
things like this:
  movt r0, :upper16:((_foo-_bar)+1234)

llvm-svn: 129284
2011-04-11 18:08:50 +00:00
Benjamin Kramer
3af55c1e2e Fix potential buffer overflow on win32.
llvm-svn: 129214
2011-04-09 14:06:12 +00:00
Sean Callanan
0c1aa958e2 Redirected errors from the AsmParser to the proper
error stream, in cases where the AsmParser is
being invoked by EDDisassembler.  Before, they
were being sent to errs() because no error handler
was installed in the SourceMgr.

llvm-svn: 129177
2011-04-09 00:37:25 +00:00
Sean Callanan
b1e6d05325 Fixed a bug where missing EDInstInfo would cause
tokenization to crash and burn.

llvm-svn: 129051
2011-04-07 01:56:01 +00:00
Shantonu Sen
a1467abb18 An MCDisassembler has the option to not implement
getEDInfo(), in which case this code would dereference
NULL. EDInst can already handle NULL info, so avoid
the dereference and pass NULL through.

Reviewed by Sean Callanan

llvm-svn: 128904
2011-04-05 18:40:45 +00:00
Francois Pichet
b4a845ecbe Fix the MSVC build.
llvm-svn: 128441
2011-03-29 00:30:01 +00:00
Ted Kremenek
737cbac625 Unbreak CMake build.
llvm-svn: 128426
2011-03-28 20:43:53 +00:00
Kevin Enderby
8c488cb152 Again adding a C API to the disassembler for use by such tools as Darwin's
otool(1), this time with the needed fix for case sensitive file systems :) .
This is a work in progress as the interface for producing symbolic operands is
not done.  But a hacked prototype using information from the object file's
relocation entiries and replacing immediate operands with MCExpr's has been
shown to work with no changes to the instrucion printer.  These APIs will be
moved into a dynamic library at some point.

llvm-svn: 128415
2011-03-28 18:25:07 +00:00
Kevin Enderby
b05e6939a0 Remove the files for r128308 as it is causing a buildbot failure.
llvm-svn: 128309
2011-03-26 00:23:05 +00:00
Kevin Enderby
872ebb4fff Adding a C API to the disassembler for use by such tools as Darwin's otool(1).
This is a work in progress as the interface for producing symbolic operands is
not done.  But a hacked prototype using information from the object file's
relocation entiries and replacing immediate operands with MCExpr's has been
shown to work with no changes to the instrucion printer.  These APIs will be
moved into a dynamic library at some point.

llvm-svn: 128308
2011-03-26 00:06:33 +00:00
Bruno Cardoso Lopes
a5de5df6d8 Add asm parsing support w/ testcases for strex/ldrex family of instructions
llvm-svn: 128236
2011-03-24 21:04:58 +00:00
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
Sean Callanan
4f6e58ff09 Fixed the comparison operator for the enhanced
disassembler's disassembler map.

llvm-svn: 127527
2011-03-12 03:27:54 +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
e1308394f1 Fixed a bug in the enhanced disassembler that caused
it to ignore valid uses of FS and GS as additional
base registers in address computations.  Added a test
case for this.

llvm-svn: 126302
2011-02-23 03:31:28 +00:00
Shantonu Sen
70e390fa15 Fix comparator used for looking up previously instantiated EDDisassemblers.
Now, Syntax is only used as a tie-breaker if the Arch
matches. Previously, a request for x86_64 disassembler followed by the
i386 disassembler in a single process would return the cached x86_64
disassembler. Fixes <rdar://problem/8958982>

llvm-svn: 125215
2011-02-09 21:03:19 +00:00
Rafael Espindola
0e665e502d Fixed version of 121434 with no new memory leaks.
llvm-svn: 121471
2010-12-10 07:39:47 +00:00
Rafael Espindola
011e168728 Revert my previous patch to make the valgrind bots happy.
llvm-svn: 121461
2010-12-10 04:01:09 +00:00
Rafael Espindola
03ad1e8f1f Initial support for the cfi directives. This is just enough to get
f:
        .cfi_startproc
        nop
        .cfi_endproc

assembled (on ELF).

llvm-svn: 121434
2010-12-09 23:48:29 +00:00
Michael J. Spencer
d5ec932c3a Merge System into Support.
llvm-svn: 120298
2010-11-29 18:16:10 +00:00
Benjamin Kramer
9e988fe81e Make some symbols static, move classes into anonymous namespaces.
llvm-svn: 117111
2010-10-22 17:35:07 +00:00
Sean Callanan
389f8119e1 Fixed a crash in the enhanced disassembler where
because of the lack of a newline, AsmToken::Eof
was being found instead of AsmToken::EndOfStatement.

llvm-svn: 114621
2010-09-23 02:14:12 +00:00
Michael J. Spencer
90f807fda5 Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."
This reverts commit r113632

Conflicts:

	cmake/modules/AddLLVM.cmake

llvm-svn: 113819
2010-09-13 23:59:48 +00:00
Michael J. Spencer
98ad3f2ea7 CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.
llvm-svn: 113632
2010-09-10 21:14:25 +00:00
Owen Anderson
302d0db7c2 Let's get those buildbots green: #include is needed in the header, not just the implementation.
llvm-svn: 108912
2010-07-20 20:16:11 +00:00
Chris Lattner
2acdd8ad4b apparently also missing an include.
llvm-svn: 108908
2010-07-20 20:06:19 +00:00
Chris Lattner
a00e818ad9 this is in System
llvm-svn: 108895
2010-07-20 19:54:01 +00:00
Chris Lattner
d880fa4f2b turn this into a normal header.
llvm-svn: 108891
2010-07-20 19:43:19 +00:00
Chris Lattner
4f8370727d hopefully heal the linux builders
llvm-svn: 108890
2010-07-20 19:40:51 +00:00
Chris Lattner
32df8100f3 there is no reason to dynamically generate a static header.
llvm-svn: 108887
2010-07-20 18:59:58 +00:00
Chris Lattner
a004760c84 drop edinfo.inc into the objdir for src!=objdir builds.
llvm-svn: 108886
2010-07-20 18:53:27 +00:00
Eric Christopher
afecfd5c44 Update header.
llvm-svn: 108883
2010-07-20 18:46:43 +00:00
Chris Lattner
04a14f79da hopefully teach cmake to build the .inc file.
llvm-svn: 108874
2010-07-20 18:33:21 +00:00
Chris Lattner
f5da80b271 cmake too
llvm-svn: 108872
2010-07-20 18:30:37 +00:00
Chris Lattner
51a1edf47f forgot to add a file
llvm-svn: 108870
2010-07-20 18:29:50 +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