Commit Graph

44 Commits

Author SHA1 Message Date
Chandler Carruth
fec0c6fa56 As a (rather delayed) followup to r136738 which stopped building the
edis shared library in the Makefile build, also stop building it in the
CMake build.

Patch by arrowdodger!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139108 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-04 23:32:05 +00:00
Evan Cheng
a9362caccb Kill the export list as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136814 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-03 21:07:01 +00:00
Evan Cheng
779fa1b0b7 lldb doesn't need the edis dylib any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136738 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-02 22:53:48 +00:00
Douglas Gregor
3401a90287 Switch the CMake edis build over to add_llvm_library_dependencies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136463 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 15:41:39 +00:00
Oscar Fuentes
b56130f96b Build EnhancedDisassembly as a shared library too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127555 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-12 22:01:47 +00:00
NAKAMURA Takumi
2fcc17e3ba CMake: LLVM_NO_RTTI must be obsolete now!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125274 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-10 09:13:39 +00:00
Oscar Fuentes
3c00a83c33 Add some platform checks. Also fix a typo on a Makefile.
Patch by arrowdodger!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123659 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-17 16:35:14 +00:00
Daniel Dunbar
b259c01376 build: Don't pass -avoid-version or -no-undefined on Darwin, they don't do
anything.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109957 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-31 21:32:56 +00:00
Chris Lattner
c510a7097b there is now no reason to link in TARGETS_TO_BUILD since we list
arm explicitly.  X86 and ARM are the only two targets that support
disassembly, so our explicit list is enough.  These other targets
weren't getting pulled in anyway though, since there were no 
references to their symbols.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108934 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 21:26:27 +00:00
Chris Lattner
6f2cea0186 fix edis to only try to link in the x86 parts if the x86 backend is
enabled.  Add direct ARM support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108933 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 21:23:57 +00:00
Douglas Gregor
aad9c4cf67 Fix edis makefile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108931 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 21:21:27 +00:00
Chris Lattner
56ff3f15e7 this logic is handled by tools/makefile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108919 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 20:33:59 +00:00
Chris Lattner
ce61aed551 edis needs to link in mcdisassembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108876 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 18:35:23 +00:00
Chris Lattner
9ae2e3384e update cmake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108875 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 18:33:29 +00:00
Chris Lattner
feb9cf4581 edinfo doesn't need to be built here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108873 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 18:31:54 +00:00
Chris Lattner
847da55716 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108869 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 18:25:19 +00:00
Daniel Dunbar
d73ada7d24 Target: Give the TargetAsmParser access to the TargetMachine.
- Unfortunate, but necessary for now to handle subtarget instruction matching. Eventually we should factor out the lower level target machine information so we don't need to do this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108664 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 00:33:49 +00:00
Daniel Dunbar
0261243f6e edis: Save the TargetMachine in the EDDisassembler object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108663 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 00:33:43 +00:00
Daniel Dunbar
9fbb37e10d MC: Move several clients to using AsmParser constructor function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108645 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 18:31:33 +00:00
Bob Wilson
8f70c3d97c Remove some broken code to check the DISABLE_EDIS flag (edis is now in the
DIRS list, so it does no good to filter it from PARALLEL_DIRS), and replace
it with a check to disable building the shared library version of edis when
the flag is set.  Disabling it entirely does not work because MC uses it now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108367 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-14 22:41:51 +00:00
Daniel Dunbar
9186fa6b0c MC: Pass the target instance to the AsmParser constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107426 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-01 20:41:56 +00:00
Sean Callanan
972bf8dea1 Extended the edis "IsBranch" property to call
instructions as well.  Added support for checking
this to the llvm-mc tester as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103454 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11 01:27:08 +00:00
Sean Callanan
a870256d7d Fixed edis to tokenize instructions with no
operands correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102227 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-24 01:00:16 +00:00
Sean Callanan
a0f914b6c1 Fixes to edis that mark x86 call targets as
memory operands rather than immediate operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102217 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-23 22:17:17 +00:00
Sean Callanan
d8993a3f92 Fixed EDOperand to use the operand type, not the
flags, to determine whether or not the operand is
a memory operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102158 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-23 01:56:36 +00:00
Dan Gohman
7c52f2ee06 Make the export files absolute paths, and change Makefile.rules
to expect them this way, to fix srcdir!=objdir builds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101414 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 23:08:00 +00:00
Dan Gohman
b16b53b181 Generalize the EXPORTED_SYMBOL_FILE concept in the Makefiles to work with
native linking export files, including running sed to prepend underscores
on darwin, and make use of it in libLTO and libEnhancedDisassembly.

Remove the leading underscores from library export files so that they
work with the new EXPORTED_SYMBOL_FILE support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101399 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 20:54:25 +00:00
Douglas Gregor
533ae9b71d Unbreak CMake build by improving the EnhancedDisassembly makefile a
bit (we're not trying to build a shared library yet) and generating
the X86GenEDInfo.inc and ARMGenEDInfo.inc files as necessary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101188 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 22:47:43 +00:00
Sean Callanan
9899f70a74 Fixed a nasty layering violation in the edis source
code.  It used to #include the enhanced disassembly
information for the targets it supported straight
out of lib/Target/{X86,ARM,...} but now it uses a
new interface provided by MCDisassembler, and (so
far) implemented by X86 and ARM.

Also removed hacky #define-controlled initialization
of targets in edis.  If clients only want edis to
initialize a limited set of targets, they can set
--enable-targets on the configure command line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101179 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 21:21:57 +00:00
Ted Kremenek
0a6f053732 Add CMake support for 'edis'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101177 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 20:52:50 +00:00
Sean Callanan
2fb938fd42 Build system fixes. llvm-mc depends on
libEnhancedDisassembly, so we now build the
static library in all cases (although the shared
library is only built when requested/possible).

Also, fixed a bug where edis wasn't properly
initializing the targets it uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101072 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 21:55:49 +00:00
Sean Callanan
dae9efc23e Bug fix: made the enhanced disassembler's link
flags work properly when EDIS_VERSION is defined


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101063 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 20:23:08 +00:00
Sean Callanan
35a3d3f8cd Updated the edis build mechanism to allow for builds
that do not build some (or all) of the targets that
edis supports.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100910 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10 00:48:10 +00:00
Sean Callanan
4285b294a8 Bugfixes for edis. Code to initialize instruction
state was being executed too lazily, and the LLVM
assembly syntax for the disassembler was not being
written into the proper disassembler state variable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100830 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 00:11:15 +00:00
Sean Callanan
8f993b8c24 Added support for ARM disassembly to edis.
I also added a rule to the ARM target's Makefile to
build the ARM-specific instruction information table
for the enhanced disassembler.

I will add the test harness for all this stuff in
a separate commit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100735 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 00:48:21 +00:00
Chris Lattner
d374087be5 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100307 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-04 05:04:31 +00:00
Sean Callanan
eb3a1ab796 Updated the install location for EnhancedDisassembly
on Mac OS X to use @rpath rather than an absolute
path.  Also allowed the version to be set using an
environment variable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100163 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-02 00:53:42 +00:00
Sean Callanan
e340da73ed Changed install_name for libEnhancedDisassembly.dylib on
Mac OS X to match current install location.  This has no
effect on other platforms.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98773 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-17 22:01:36 +00:00
Chris Lattner
c18409aed8 change MCContext to always have an MCAsmInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98293 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-11 22:53:35 +00:00
Sean Callanan
2d58147ca5 Updated the enhanced disassembly library to produce
whitespace tokens in the right places.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95645 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 01:50:54 +00:00
Sean Callanan
de5dac1c46 Fixed a problem where the enhanced disassembly
library was reporting inaccurate token IDs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95639 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 01:00:18 +00:00
Sean Callanan
01cd79fe1b Added header file declarations and .exports entries
for the new APIs offered by the enhanced disassembler
for inspecting operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95606 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-08 23:34:25 +00:00
Sean Callanan
76706584c2 Filled in a few new APIs for the enhanced
disassembly library that provide access to
instruction information, and fixed ambiguous
wording in the comments for the header.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95274 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-04 01:43:08 +00:00
Sean Callanan
59b9c8879b Renamed the ed directory to edis, as suggested
yesterday.  This eliminates possible confusion
about what exactly in this directory; the name
is still short, though.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95118 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02 20:11:23 +00:00