Update llvm-mc / MCAsmStreamer to print the instruction using the actual target

specific printer (this only works on x86, for now).
 - This makes it possible to do some correctness checking of the parsing and
   matching, since we can compare the results of 'as' on the original input, to
   those of 'as' on the output from llvm-mc.

 - In theory, we could now have an easy ATT -> Intel syntax converter. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78986 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar
2009-08-14 03:48:55 +00:00
parent 575327b77e
commit c22e0b2443
7 changed files with 133 additions and 110 deletions

View File

@@ -17,6 +17,7 @@
#include "llvm/Support/DataTypes.h"
namespace llvm {
class AsmPrinter;
class MCContext;
class MCValue;
class MCInst;
@@ -228,7 +229,10 @@ namespace llvm {
/// createAsmStreamer - Create a machine code streamer which will print out
/// assembly for the native target, suitable for compiling with a native
/// assembler.
MCStreamer *createAsmStreamer(MCContext &Ctx, raw_ostream &OS);
///
/// \arg AP - If given, an AsmPrinter to use for printing instructions.
MCStreamer *createAsmStreamer(MCContext &Ctx, raw_ostream &OS,
AsmPrinter *AP = 0);
// FIXME: These two may end up getting rolled into a single
// createObjectStreamer interface, which implements the assembler backend, and