Commit Graph

673 Commits

Author SHA1 Message Date
Benjamin Kramer
82a3171b72 Mark all common symbols external. This is not exactly correct but it lets apps
link for now and can be adjusted later. Patch by Roman Divacky.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112471 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-30 11:56:55 +00:00
Chris Lattner
b188a3789e squish dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112350 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-28 03:21:03 +00:00
Benjamin Kramer
93ded7371f MCELF: Port EmitInstruction changes from MachO streamer. Patch by Roman Divacky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112260 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-27 10:40:51 +00:00
Benjamin Kramer
95c602ade3 MCELF: Always overwrite FixedValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112259 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-27 10:38:39 +00:00
Benjamin Kramer
4ba1b3074b MCELF: Fix a thinko of mine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112203 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-26 18:12:04 +00:00
Benjamin Kramer
63d37b9322 MCELF: Compensate for the addend on i386. Patch by Roman Divacky, with some cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112197 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-26 17:23:02 +00:00
Benjamin Kramer
7b83c26051 MCELF: Use precomputed symbol indices, patch by Roman Divacky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112079 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 20:09:43 +00:00
Michael J. Spencer
bf252bef67 MC: Fix inconsistant naming in COFF object writer. Patch by Cameron Esfahani.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112076 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 19:27:27 +00:00
Kevin Enderby
6d8f1a9a18 Change the parsing of .loc back to allow the LineNumber field to be optional as
it is with other assemblers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111967 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 21:14:47 +00:00
Michael J. Spencer
82c84fdd23 Fix COFF x86-64 relocations. PR7960.
Multiple symbol reloc handling part of the patch by Cameron Esfahani.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111963 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 21:04:52 +00:00
Kevin Enderby
c1840b3da2 First bit of support for the dwarf .loc directive. This patch updates the
needed parsing for the .loc directive and saves the current info from that
into the context.  The next patch will take the current loc info after an
instruction is assembled and save that info into a vector for each section for
use to build the line number tables.  The patch after that will encode the info
from those vectors into the output file as the dwarf line tables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111956 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 20:32:42 +00:00
Daniel Dunbar
e17edff28f MC/AsmParser: Change ParseExpression to use ParseIdentifier(), to support
dollars in identifiers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111946 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 19:13:42 +00:00
Daniel Dunbar
1f1b865c40 MC/Parser: Accept leading dollar signs in identifiers.
- Implemented by manually splicing the tokens. If this turns out to be
   problematically platform specific, a more elegant solution would be to
   implement some context dependent lexing support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111934 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 18:12:12 +00:00
Benjamin Kramer
2f6e0e68a4 Relocate against parent if the symbol is not in section or it's a common symbol, from Roman Divacky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111925 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 17:34:39 +00:00
Chris Lattner
a78c67e9bb fix rdar://7997827 - Accept and ignore LL and ULL suffixes on integer literals.
Also fix 0b010 syntax to actually work while we're at it :-)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111876 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 00:43:25 +00:00
Benjamin Kramer
c522f6e70b Fix thinko. Having no tests is great ...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111848 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23 21:32:00 +00:00
Benjamin Kramer
36c6dc22bc Reduce code duplication.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111846 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23 21:23:52 +00:00
Benjamin Kramer
0b6cbfe04c ELFObjectWriter: Run ComputeSymbolTable before recording relocations. This way we can use the information it has computed and don't have to recompute the same stuff over and over again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111844 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23 21:19:37 +00:00
Benjamin Kramer
bcf2db60dd Add the symbol offset to the relocation value when we relocate against section. By Roman Divacky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111824 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23 19:05:46 +00:00
Benjamin Kramer
30dc1ee78a Use the proper relocation section + cleanup, from Roman Divacky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111819 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23 18:24:20 +00:00
Michael J. Spencer
69c59218dc Revert part of my last commit. the mingw32 build bot doesn't seem to like it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111793 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23 05:25:23 +00:00
Michael J. Spencer
3464cec4d8 Workaround broken jump tables on x86-64 COFF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111792 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23 04:45:37 +00:00
Michael J. Spencer
da0bfcdaf9 MC: Add partial x86-64 support to COFF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111728 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-21 05:58:13 +00:00
Benjamin Kramer
44cbde85ba MCELF: Count the section orders properly. Patch by Roman Divacky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111517 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-19 13:44:49 +00:00
Daniel Dunbar
c983b20661 MC/ELF: Allow null values in virtual sections, ELF doesn't use special
directives for putting contents in .bss, for example.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111376 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 18:22:37 +00:00
Benjamin Kramer
81cfb8529b Remove dead code. Fixes a GCC warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111271 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 19:45:05 +00:00
Benjamin Kramer
e5b57347e9 Sketch i386 relocations handling, from Roman Divacky.
Hello world builds & runs now on i386/ELF with -integrated-as.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111264 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 18:20:28 +00:00
Benjamin Kramer
299fbe3a5a Use the correct entry size for relocation entries, from Roman Divacky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111259 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 17:56:13 +00:00
Benjamin Kramer
377a572d9b Differentiate between RELA and REL relocations, from Roman Divacky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111252 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 17:30:07 +00:00
Benjamin Kramer
eb97677764 One baby step towards i386 ELF, from Roman Divacky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111247 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 17:02:29 +00:00
Benjamin Kramer
172d7d6a12 Try to silence a overeager GCC warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111214 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 00:33:24 +00:00
Benjamin Kramer
368ae7e4ec A round of minor cleanups for ELFObjectWriter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111213 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 00:00:46 +00:00
Benjamin Kramer
1f8aa7bf08 Silence warnings and simplify code. Eliminate a 32/64 bit portability issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111201 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-16 23:00:12 +00:00
Eli Friedman
a44fa2473a Fixes for generation of ELF relocations. Patch by Roman Divacky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111183 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-16 21:17:09 +00:00
Eli Friedman
f8020a3978 Fix a few warnings in and detabify MCELFStreamer and ELFObjectWriter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111175 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-16 19:15:06 +00:00
Matt Fleming
3565a06ebf Add ELF ObjectWriter and Streamer support.
I forgot to add these files in commit 111172.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111174 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-16 18:57:57 +00:00
Matt Fleming
6b2e257e74 Add ELF ObjectWriter and Streamer support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111172 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-16 18:35:43 +00:00
Matt Fleming
a8bf473fb1 Layout helper function.
Introduce a helper method to add a section to the end of a layout. This
will be used by the ELF ObjectWriter code to add the metadata sections
(symbol table, etc) to the end of an object file.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111171 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-16 18:35:06 +00:00
Matt Fleming
6c8b3d2f1f Record a symbol's size which is needed for ELF symbol tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111170 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-16 18:34:31 +00:00
Chris Lattner
abf8f9cbb8 silence a vc2010 warning: " result of 32-bit shift implicitly converted to
64 bits (was 64-bit shift intended?)", pointed out by 'nobled' on llvmdev


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111148 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-16 16:35:20 +00:00
Daniel Dunbar
f1e29d4c21 MC/AsmParser: Push the burdon of emitting diagnostics about unmatched
instructions onto the target specific parser, which can do a better job.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110889 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 00:55:38 +00:00
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
Eli Friedman
dc1ad22d53 Start of .sleb128/.uleb128 parsing support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108612 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 06:27:28 +00:00
Eli Friedman
21444efae0 Work-in-progress parsing for ELF .section directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108609 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 04:29:04 +00:00
Eli Friedman
f82ccf5a0d Add support for parsing .size directives for ELF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108606 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 03:09:18 +00:00
Daniel Dunbar
d1e3b44d6c MC/AsmParser: Lift Run() and TargetParser to base class.
Also, add constructor function for creating AsmParser instances.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108604 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 02:26:10 +00:00
Chris Lattner
a955853961 fix indentation and 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108460 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-15 21:19:31 +00:00
Benjamin Kramer
38e59891ee Don't pass StringRef by reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108366 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-14 22:38:02 +00:00
Daniel Dunbar
5146a0970d MC/AsmParser: Move ELF specific parser to ELFAsmParser.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108196 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-12 21:23:32 +00:00
Daniel Dunbar
9c23d7f25e MC/AsmParser: Move Darwin specific parse to DarwinAsmParser.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108193 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-12 20:51:51 +00:00
Daniel Dunbar
4d5fe97c47 MC/AsmParser: Move .section parsing to Darwin specific parser.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108190 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-12 20:42:34 +00:00