[llvm-commits] [llvm] r80188 - in /llvm/trunk: include/llvm/MC/MCCodeEmitter.h include/llvm/MC/MCStreamer.h include/llvm/Target/TargetRegistry.h lib/MC/MCAsmStreamer.cpp tools/llvm-mc/llvm-mc.cpp
Chris Lattner
clattner at apple.com
Wed Aug 26 20:18:05 PDT 2009
On Aug 26, 2009, at 5:51 PM, Daniel Dunbar wrote:
Author: ddunbar
> Date: Wed Aug 26 19:51:57 2009
> New Revision: 80188
>
> URL: http://llvm.org/viewvc/llvm-project?rev=80188&view=rev
> Log:
> Sketch TargetRegistry support for MCCodeEmitter abstract interface.
> - Of course, nothing actually can provide this interface yet.
Very nice Daniel,
The other missing "hard part" from the interface is that
EncodeInstruction needs to return a list of relocations to apply. Do
you have any ideas on how to represent those relo's?
> @@ -241,7 +242,8 @@
> ///
> /// \arg AP - If given, an AsmPrinter to use for printing
> instructions.
> MCStreamer *createAsmStreamer(MCContext &Ctx, raw_ostream &OS,
> - const MCAsmInfo &MAI, AsmPrinter
> *AP = 0);
> + const MCAsmInfo &MAI, AsmPrinter
> *AP = 0,
> + MCCodeEmitter *CE = 0);
Why would createAsmStreamer use a CodeEmitter? I would think that
just ObjFileEmitter would need it?
> + typedef MCCodeEmitter *(*CodeEmitterCtorTy)(const Target &T,
> + TargetMachine &TM,
> + const MCAsmInfo
> &MAI);
It really needs a TM? :(
-Chris
More information about the llvm-commits
mailing list