Commit Graph

582 Commits

Author SHA1 Message Date
Daniel Dunbar
3c14ca47fc llvm-mc: Add -show-inst-operands, for dumping the parsed instruction representation before matching.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110791 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11 06:37:09 +00:00
Daniel Dunbar
b3cb696794 MCAsmParser: Add dump() hook to MCParsedAsmOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110790 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11 06:37:04 +00:00
Daniel Dunbar
e25c6b95ce MC/AsmParser: Fix a bug in macro argument parsing, which was dropping
parentheses from argument lists.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110692 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-10 17:38:52 +00:00
Michael J. Spencer
b0f3b3e7de Revert "MC/MachO: Fix possible null pointer dereference."
This reverts commit 110575.

Target.isAbsolute() is true if SD would be null.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110683 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-10 16:00:49 +00:00
Kevin Enderby
b07ce60981 Next bit of support for the dwarf .file directive. This patch takes the
previously collected info from the .file directives and outputs the encoded
bytes for it.  For now this is only in the Mach-O streamer but at some point
will move to a more generic place.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110617 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-09 22:52:14 +00:00
Michael J. Spencer
c1f354dcb8 MC/MachO: Fix possible null pointer dereference.
Discovered by Microsoft Visual Studio 2010 Code Analysis.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110575 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-09 15:28:05 +00:00
Michael J. Spencer
237f8fe5df MC: Fix symbol fragment offsets in COFF.
Patch by Cameron Esfahani!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110104 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-03 05:02:46 +00:00
Michael J. Spencer
a69494ee5e Revert "MC: Fix symbol fragment offsets in COFF."
This reverts commit r110100

Wrong path caps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110103 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-03 04:53:28 +00:00
Michael J. Spencer
ab3de49c48 MC: Add time travel support to COFF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110101 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-03 04:43:33 +00:00
Michael J. Spencer
ef1f8c3cc3 MC: Fix symbol fragment offsets in COFF.
Patch by Cameron Esfahani!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110100 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-03 04:43:24 +00:00
Daniel Dunbar
425f634917 Silence some -Asserts uninitialized variable warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109956 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-31 21:08:54 +00:00
Michael J. Spencer
e2195d8b35 Add relax all support to the COFF object streamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109947 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-31 06:22:29 +00:00
Daniel Dunbar
0ecdb6f3d8 MC: Initialize MCFragment::Offset, noticed by Cameron Esfahani.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109875 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-30 18:32:09 +00:00
Benjamin Kramer
1abcd06856 Plug the remaining MC leaks by giving MCObjectStreamer/MCAsmStreamer ownership of the TargetAsmBackend and the MCCodeEmitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109767 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 17:48:06 +00:00
Benjamin Kramer
3bce5adb32 Stop leaking std::strings in GetDwarfFile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109746 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 13:53:19 +00:00
Benjamin Kramer
808ecfce6a COFFObjectWriter: Don't leak COFFSymbols and COFFSections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109745 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 11:57:59 +00:00
Daniel Dunbar
56491303a6 MC: Destroy Macro instances.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109720 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 01:51:55 +00:00
Kevin Enderby
7cbf73a73f Added first bit of support for the dwarf .file directive. This patch collects
the info from the .file directive and makes file and directory tables that
will eventually be put out as part of the dwarf info in the output file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109651 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-28 20:55:35 +00:00
Daniel Dunbar
36880e704f MC: Put back the MCFragment vtable, so subclasses are destroyed properly (duh).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109649 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-28 20:28:45 +00:00
Douglas Gregor
fd2878c8d0 Fix format-specifier warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109391 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-26 03:55:44 +00:00
Michael J. Spencer
933304ef0c MC: Fix whitespace error from last commit.
A Visual C++ extension that removes trailing new lines? Seriously?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109390 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-26 03:01:28 +00:00
Michael J. Spencer
801a359116 MC: Add WinCOFFObjectWriter implementation.
Origonal Windows COFF implementation by Nathan Jedffords.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109389 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-26 02:17:32 +00:00
Reid Kleckner
c96a82a534 Initial modifications to MCAssembler and TargetMachine for the MCJIT.
Patch by Olivier Meurant!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109080 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 05:58:53 +00:00
Matt Fleming
f525c2a8af Add some more handlers for ELF section directives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108928 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 21:12:46 +00:00
Owen Anderson
8238f02650 Let's get those buildbots green: #include is needed in the header, not just the implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108912 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 20:16:11 +00:00
Chris Lattner
e5b2b88381 apparently also missing an include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108908 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 20:06:19 +00:00
Chris Lattner
8f5880c093 this is in System
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108895 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 19:54:01 +00:00
Chris Lattner
6f0414a407 turn this into a normal header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108891 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 19:43:19 +00:00
Chris Lattner
1c861a0253 hopefully heal the linux builders
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108890 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 19:40:51 +00:00
Chris Lattner
a4f15d66ab there is no reason to dynamically generate a static header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108887 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 18:59:58 +00:00
Chris Lattner
234db004f9 drop edinfo.inc into the objdir for src!=objdir builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108886 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 18:53:27 +00:00
Eric Christopher
aab5b3259f Update header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108883 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 18:46:43 +00:00
Chris Lattner
fed3fed251 hopefully teach cmake to build the .inc file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108874 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 18:33:21 +00:00
Chris Lattner
ca2fcac09d cmake too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108872 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 18:30:37 +00:00
Chris Lattner
bd9de839c4 forgot to add a file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108870 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 18:29:50 +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
96749678c9 MC/Mach-O: Silently ignore .file directives instead of error'ing out on
them. They aren't important enough to abort the entire assembly, and failing
early makes testing more annoying.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108747 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 20:44:20 +00:00
Michael J. Spencer
e5c8d95f1a _[A-Z] identifiers are reserved for the implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108682 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 06:26:19 +00:00
Michael J. Spencer
8067adc271 MC: Add WinCOFFStreamer implementation and merge common code from MachO
into MCObjectStreamer.

Origonal Windows COFF implementation by Nathan Jedffords.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108678 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 06:13:10 +00:00
Daniel Dunbar
54074b5f04 TblGen/AsmMatcher: Add support for honoring instruction Requires<[]> attributes as part of the matcher.
- Currently includes a hack to limit ourselves to "In32BitMode" and "In64BitMode", because we don't have the other infrastructure to properly deal with setting SSE, etc. features on X86.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108677 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 05:44:09 +00:00
Eli Friedman
5d68ec2229 Make .align parse correctly on platforms where .align is measured in bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108674 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 04:17:25 +00:00
Daniel Dunbar
1edf6ca2cb MC/AsmParser: Stop playing unsafe member function pointer calls, this isn't
portable enough.
 - Downside is we now double dispatch through a stub function, but this isn't
   performance critical.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108661 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 22:22:07 +00:00
Daniel Dunbar
6a46d571b4 MC/AsmParser: Fix .abort and .secure_log_unique to accept arbitrary token
sequences, not just strings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108655 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 20:15:59 +00:00
Daniel Dunbar
7a570d09ac MC/AsmParser: Add macro argument substitution support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108654 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 19:00:10 +00:00
Daniel Dunbar
c64a0d7c3e MC/AsmParser: Add basic support for macro instantiation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108653 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 18:54:11 +00:00
Daniel Dunbar
6d8cf082f6 MC/AsmParser: Add basic parsing support for .macro definitions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108652 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 18:47:21 +00:00
Daniel Dunbar
3c802de01a MC/AsmParser: Add .macros_{off,on} support, not that makes sense since we don't
support macros.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108649 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 18:38:02 +00:00
Daniel Dunbar
275ce39794 MC/AsmParser: Use Error() instead of calling PrintMessage() directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108648 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 18:31:45 +00:00
Daniel Dunbar
f21e4e9326 MC/AsmParser: Fix TokError() to accept a Twine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108647 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 18:31:42 +00:00
Daniel Dunbar
aef87e3307 MC/AsmParser: Hide the AsmParser implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108646 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 18:31:38 +00:00