Commit Graph

512 Commits

Author SHA1 Message Date
Daniel Dunbar af3d1de891 MC: Add MCAsmParserExtension, a base class for all the target/object specific
classes which want to extend the basic asm parser.

llvm-svn: 108158
2010-07-12 17:27:45 +00:00
Daniel Dunbar 4be8f2ffad MC: Move AsmParser::TokError to MCAsmParser().
llvm-svn: 108155
2010-07-12 17:18:45 +00:00
Daniel Dunbar 4042c33cd8 MC: Move getLoc() to MCAsmLexer().
llvm-svn: 108154
2010-07-12 17:10:00 +00:00
Duncan Sands 41b4a6b36a Convert some tab stops into spaces.
llvm-svn: 108130
2010-07-12 08:16:59 +00:00
Chris Lattner 2c52b7997c introduce WinCOFFObjectWriter, patch by Michael Spencer!
llvm-svn: 108103
2010-07-11 22:07:02 +00:00
Chris Lattner 56725be9ef introduce WinCOFFStreamer.cpp, patch by Michael Spencer!
llvm-svn: 108102
2010-07-11 22:05:00 +00:00
Kevin Enderby ea9207cd7a Revert some unneeded parts of the change in r107886 for the
.weak_def_can_be_hidden directive.  Chris pointed out that the MCAsmInfo.h/.cpp
chunks aren't needed for this until the compiler starts generating these.  And
when that happens it will be more convenient for it to be a bool than a const
char*.

llvm-svn: 107906
2010-07-08 20:30:44 +00:00
Kevin Enderby 082d0fd7ad Added the darwin .weak_def_can_be_hidden directive.
llvm-svn: 107886
2010-07-08 17:22:42 +00:00
Chris Lattner 05ea2a4791 finish up support for callw: PR7195
llvm-svn: 107826
2010-07-07 22:35:13 +00:00
Daniel Dunbar 0e980755d3 MC: Fix some stray hunks I didn't intend to commit.
llvm-svn: 107428
2010-07-01 20:48:51 +00:00
Daniel Dunbar 02877d6e85 MC: Pass the target instance to the AsmParser constructor.
llvm-svn: 107426
2010-07-01 20:41:56 +00:00
Daniel Dunbar 0aa4365e47 MC: Fix an error message.
llvm-svn: 107424
2010-07-01 20:20:01 +00:00
Daniel Dunbar 329d202362 MC: Move COFF enumeration constants to llvm/Support/COFF.h, patch by Michael
Spencer!

llvm-svn: 107418
2010-07-01 20:07:24 +00:00
Bill Wendling 3632171750 Revert r107205 and r107207.
llvm-svn: 107215
2010-06-29 22:34:52 +00:00
Bill Wendling 1767723dbe Introducing the "linker_weak" linkage type. This will be used for Objective-C
metadata types which should be marked as "weak", but which the linker will
remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is
defined like this:

       .globl l_objc_msgSend_fixup_alloc
       .weak_definition l_objc_msgSend_fixup_alloc
       .section __DATA, __objc_msgrefs, coalesced
       .align 3
l_objc_msgSend_fixup_alloc:
        .quad   _objc_msgSend_fixup
        .quad   L_OBJC_METH_VAR_NAME_1

This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".

llvm-svn: 107205
2010-06-29 21:24:00 +00:00
Duncan Sands a85a90773c The variable ValueSize is set to 1 on both code paths, and then
ignored!  Remove it.

llvm-svn: 107138
2010-06-29 13:30:08 +00:00
Duncan Sands 1245e4c07d The variable "Value" is carefully set to Layout.getSymbolAddress,
but then not actually used - maybe a bug?  Remove the variable.

llvm-svn: 107137
2010-06-29 13:26:33 +00:00
Duncan Sands 5667a08468 Remove unused calls to Lexer.getLoc and the pointless variable HasFillExpr.
llvm-svn: 107136
2010-06-29 13:24:40 +00:00
Kevin Enderby e233dda2e2 Added the darwin .secure_log_unique and .secure_log_reset directives.
llvm-svn: 107077
2010-06-28 21:45:58 +00:00
Eric Christopher 7f85520644 Get the addend correct for i386 pic.
Thanks Daniel!

llvm-svn: 106608
2010-06-22 23:51:47 +00:00
Chris Lattner 79d2075e4a "This is just a cosmetic change in MCAsmStreamer.cpp/EmitSymbolAttribute: all attributes have now a \t before and after, as done for '.type'.
This makes the output look consistent, as well as help some third party assemblers expecting the attributes to be in the second column."

Patch by Arnaud de Grandmaison!

llvm-svn: 106469
2010-06-21 20:35:01 +00:00
Eric Christopher 93f16372f9 Update comment.
llvm-svn: 106191
2010-06-17 00:49:46 +00:00
Eric Christopher 74892d4f1f In progress on 32-bit addends.
llvm-svn: 106154
2010-06-16 21:32:38 +00:00
Daniel Dunbar ede8e6d2f0 MC/Mach-O: Rewrite atom association to be a final pass we do in Finish(), instead of tracking as part of emission.
- This allows sharing more code with the MCObjectStreamer.

llvm-svn: 106143
2010-06-16 20:04:32 +00:00
Daniel Dunbar aa627c39e4 MC: Simplify MCAssembler::isSymbolLinkerVisible to only take an MCSymbol.
llvm-svn: 106142
2010-06-16 20:04:29 +00:00
Daniel Dunbar b2347fe504 MC: Lift SwitchSection() and Finish() into MCObjectStreamer.
llvm-svn: 106141
2010-06-16 20:04:25 +00:00
Daniel Dunbar 8a3c9d9bc4 MC: Factor out an MCObjectStreamer class, which will be shared by the concrete
object file format writers.

llvm-svn: 106140
2010-06-16 20:04:22 +00:00
Eric Christopher 2092dc2acd Fix indentation.
llvm-svn: 106072
2010-06-16 00:26:36 +00:00
Eric Christopher a86c2bdd2c Some more work on mach-o TLV relocations.
llvm-svn: 106062
2010-06-15 22:59:05 +00:00
Dan Gohman a76715fc88 Don't call flush() at a library level which isn't checking for errors
and doesn't know where the output is going.

llvm-svn: 105274
2010-06-01 16:31:34 +00:00
Eric Christopher eaddfac539 Rearrange conditionals so we don't get caught with the correct type as wrong.
llvm-svn: 104793
2010-05-27 00:52:31 +00:00
Daniel Dunbar b889fc987e MC: When running with -mc-relax-all, we can eagerly relax instructions and avoid creating unnecessary MCInstFragments.
llvm-svn: 104736
2010-05-26 20:37:03 +00:00
Daniel Dunbar 9d40ef162b MC/Mach-O: Factor out EmitInstTo{Fragment,Data} for emitting MCInst's as MCInstFragments or appending onto an MCDataFragment.
llvm-svn: 104735
2010-05-26 20:37:00 +00:00
Daniel Dunbar 7c8bd0fc98 MC: Change RelaxInstruction to only take the input and output instructions.
llvm-svn: 104713
2010-05-26 18:15:06 +00:00
Daniel Dunbar 388ff9b1a2 MC: Eliminate an unnecessary copy.
llvm-svn: 104709
2010-05-26 17:50:16 +00:00
Daniel Dunbar a19838e107 MC: Simplify MayNeedRelaxation to not provide the fixups, so we can query it
before encoding.

llvm-svn: 104707
2010-05-26 17:45:29 +00:00
Daniel Dunbar b34440a6a8 MC: Eliminate MCAsmFixup, replace with MCFixup.
llvm-svn: 104699
2010-05-26 15:18:56 +00:00
Daniel Dunbar 353a91ff76 MC: Use accessors for access to MCAsmFixup.
llvm-svn: 104697
2010-05-26 15:18:31 +00:00
Daniel Dunbar 3627af5da4 MC: Change MCInst::dump_pretty to not include a trailing newline.
llvm-svn: 104696
2010-05-26 15:18:13 +00:00
Daniel Dunbar 870e5759e7 MC: Eliminate MCFragment vtable, which was unnecessary.
llvm-svn: 104689
2010-05-26 06:50:57 +00:00
Eric Christopher e7b64dcc1e Start adding mach-o tls reloc support.
llvm-svn: 104651
2010-05-26 00:02:12 +00:00
Daniel Dunbar 6738a2e39e llvm-mc: Use EmitIntValue where possible, which makes the API calls from the AsmParser and CodeGen line up better.
llvm-svn: 104467
2010-05-23 18:36:38 +00:00
Daniel Dunbar 8271d1bb4a llvm-mc: Use AddBlankLine in asm parser. This makes transliteration match the input much more closely, and also makes the API calls from the AsmParser and CodeGen line up better.
llvm-svn: 104466
2010-05-23 18:36:34 +00:00
Daniel Dunbar 3ff1a06de6 MC: Add an MCLoggingStreamer, for use in debugging integrated-as mismatches.
llvm-svn: 104463
2010-05-23 17:44:06 +00:00
Eric Christopher 09d47031b1 Expand on comment.
llvm-svn: 104396
2010-05-21 23:03:53 +00:00
Eric Christopher 3dca28d0e2 Fix section attribute name.
llvm-svn: 104381
2010-05-21 21:08:52 +00:00
Matt Fleming ec9d6faef0 Add support for parsing the ELF .type assembler directive.
llvm-svn: 104316
2010-05-21 11:36:59 +00:00
Matt Fleming 141791c6d1 Grammar fix. This is a test commit.
llvm-svn: 104264
2010-05-20 19:45:09 +00:00
Benjamin Kramer 7c3e230cd1 Reduce string trashing.
llvm-svn: 104223
2010-05-20 14:14:22 +00:00
Eric Christopher 27e7ffc7d4 Partial code for emitting thread local bss data.
llvm-svn: 104197
2010-05-20 00:49:07 +00:00