Commit Graph

19 Commits

Author SHA1 Message Date
Rafael Espindola b746531c2c Avoid code duplication in the many unsupported EmitGPRel32Value implementations.
llvm-svn: 120243
2010-11-28 15:09:24 +00:00
Rafael Espindola 3c227b0b89 Add basic CFI methods to the streamer interface.
llvm-svn: 119972
2010-11-22 14:27:24 +00:00
Rafael Espindola c653a895c8 Add .loc methods to the streamer.
Next: Add support for the !HasDotLocAndDotFile case to the MCAsmStreamer
and then switch codegen to use it.

llvm-svn: 119384
2010-11-16 21:20:32 +00:00
Rafael Espindola 5e874982f2 Add support for expressions in .sleb/.uleb directives.
llvm-svn: 118023
2010-11-02 17:22:24 +00:00
Rafael Espindola 1614597873 Implement .weakref.
llvm-svn: 117911
2010-11-01 14:28:48 +00:00
Kevin Enderby e46564a4a8 This is the last major patch to implement support for the .loc directive
and output the dwarf line number tables.  This contains the code to emit and
encode the dwarf line tables from the previously gathered information in the
MCLineSection objects.  This contains all the details to encode the line and
address deltas into the dwarf line table.

To do this an MCDwarfLineAddrFragment has been added.

Also this moves the interface code out of Mach-O streamer into
MCDwarf so it should be useable by other object file formats.

There is now one call to be made from an MCObjectStreamer
EmitInstruction() method:
   MCLineEntry::Make(this, getCurrentSection());
to create a line entry after each instruction is assembled.

And one call call to be made from an MCObjectStreamer Finish() method:
   MCDwarfFileTable::Emit(this, DwarfLineSection);
when getContext().hasDwarfFiles() is true and is passed a object file specific
MCSection where to emit the dwarf file and the line tables.

This appears to now be correct for 32-bit targets, at least x86.  But the
relocation entries for 64-bit Darwin needs some further work which is next
up to work on.  So for now the 64-bit Mach-O target does not output the
dwarf file and line tables.

llvm-svn: 115157
2010-09-30 16:52:03 +00:00
Benjamin Kramer e39017cb97 Add AsmParser support for the ELF .previous directive. Patch by Roman Divacky.
llvm-svn: 112849
2010-09-02 18:53:37 +00:00
Michael J. Spencer 2ed9f4bd39 _[A-Z] identifiers are reserved for the implementation.
llvm-svn: 108682
2010-07-19 06:26:19 +00:00
Matt Fleming 141791c6d1 Grammar fix. This is a test commit.
llvm-svn: 104264
2010-05-20 19:45:09 +00:00
Chris Lattner 1716721df1 add a twine form of MCStreamer::EmitRawText, and mc'ize
a few more things in AsmPrinter.cpp.

llvm-svn: 100294
2010-04-03 22:12:35 +00:00
Chris Lattner 6ec72d2e8f add <cstdlib> header for abort() on linux builders.
llvm-svn: 100290
2010-04-03 21:48:59 +00:00
Chris Lattner 8a87fb7633 add a new EmitInlineAsm function to asmprinter to handle inline asm.
If we have an MCAsmStreamer, we continue to emit asm textually, 
otherwise we (currently) emit an error to errs and ignore it.

llvm-svn: 100289
2010-04-03 21:35:55 +00:00
Chris Lattner b14490d912 add a EmitSymbolValue convenience method to MCStreamer.
llvm-svn: 98017
2010-03-09 00:39:24 +00:00
Chris Lattner 8fa0e35f97 add a new MCAsmStreamer::GetCommentOS method to simplify stuff
that doesn't want to use twines.

llvm-svn: 94199
2010-01-22 19:17:48 +00:00
Chris Lattner dc50e5d128 add a new EmitIntValue method that MCStreamer impls can optionally define
and that clients can use.

llvm-svn: 93923
2010-01-19 22:03:38 +00:00
Chris Lattner c35681b298 Generalize mcasmstreamer data emission APIs to take an address space
identifier.  There is no way to work around it.

llvm-svn: 93896
2010-01-19 19:46:13 +00:00
Chris Lattner 0c65fd4902 add a "MCStreamer::EmitFill" method, and move the default implementation
(which just iteratively emits bytes) to MCStreamer.

llvm-svn: 93888
2010-01-19 18:45:47 +00:00
Chris Lattner 0adae25ec1 Make AsmStreamer maintain a notion of the current section, pushing it up from the
MCAsmStreamer.  Based on this, eliminate the current section from AsmPrinter.

While I'm at it, clean up the last of the horrible "switch to null section" stuff
and add an assert.  This change is in preparation for completely eliminating 
asmprinter::switchtosection.

llvm-svn: 79324
2009-08-18 06:15:16 +00:00
Daniel Dunbar 9faf273fc4 Start MCAsmStreamer implementation.
llvm-svn: 74044
2009-06-24 01:03:06 +00:00