search for: createmachostream

Displaying 6 results from an estimated 6 matches for "createmachostream".

Did you mean: createmachostreamer
2012 Jan 09
1
[LLVMdev] FW: generating ELF files on non-ELF platforms with MC
..._ostream &_OS, MCCodeEmitter *_Emitter, bool RelaxAll, bool NoExecStack) { Triple TheTriple(TT); if (TheTriple.isOSDarwin() || TheTriple.getEnvironment() == Triple::MachO) return createMachOStreamer(Ctx, MAB, _OS, _Emitter, RelaxAll); if (TheTriple.isOSWindows()) return createWinCOFFStreamer(Ctx, MAB, *_Emitter, _OS, RelaxAll); return createELFStreamer(Ctx, MAB, _OS, _Emitter, RelaxAll, NoExecStack); } --------------- Would it be OK to add "ELF" to Triple::EnvironmentTyp...
2010 Apr 17
0
[LLVMdev] Intro to the MC Project
...ileType set to CGFT_ObjectFile, and with the triple environment name hack, I am able to create the correct streamer : if (Triple(TargetTriple).getEnvironmentName().equals("JIT")) { AsmStreamer.reset(createJITStreamer(*Context, *TAB, Out, MCE)); } else { AsmStreamer.reset(createMachOStreamer(*Context, *TAB, Out, MCE)); } What do you think ? Do you consider this to be acceptable ? Or just horrible ? - MCObjectWriter::Write8 and MCObjectWriter::WriteBytes are designed to write in a raw_ostream instance, to adapt them to the JIT, I see 2 possibilities : - Add a virtual keyword o...
2012 Jan 04
4
[LLVMdev] generating ELF files on non-ELF platforms with MC
Hello, We're currently working on MC-JIT, focusing on runtime generation and loading of ELF object files, even on non-ELF platforms (i.e. Windows). However, we run into a problem with MC insisting to generate COFF objects on Windows, MachO on Macs and ELF only otherwise, based on the triple. Is there an existing method to generate ELF objects with MC on Windows, without modifying MC? Thanks
2012 Jan 09
0
[LLVMdev] generating ELF files on non-ELF platforms with MC
..._ostream &_OS, MCCodeEmitter *_Emitter, bool RelaxAll, bool NoExecStack) { Triple TheTriple(TT); if (TheTriple.isOSDarwin() || TheTriple.getEnvironment() == Triple::MachO) return createMachOStreamer(Ctx, MAB, _OS, _Emitter, RelaxAll); if (TheTriple.isOSWindows()) return createWinCOFFStreamer(Ctx, MAB, *_Emitter, _OS, RelaxAll); return createELFStreamer(Ctx, MAB, _OS, _Emitter, RelaxAll, NoExecStack); } --------------- Would it be OK to add "ELF" to Triple::EnvironmentTyp...
2010 Apr 16
2
[LLVMdev] Intro to the MC Project
I do have an opinion, but don't have enough time to comment in much depth. The approximate approach I had in mind sounds like what you describe, though, the JITObjectWriter is the core piece, the other pieces probably fall into place as it becomes obvious if they are needed. It should be pretty straightforward to bring up something which works for running code with no external symbols, if you
2013 Sep 25
1
[LLVMdev] arm64 / iOS support
...OSDarwin() ? Reloc::PIC_ : Reloc::Static; } if (CM == CodeModel::Default) @@ -101,6 +107,8 @@ static MCStreamer *createMCStreamer(const Target &T, StringRef TT, bool NoExecStack) { Triple TheTriple(TT); + if (TheTriple.isOSDarwin()) + return createMachOStreamer(Ctx, MAB, OS, Emitter, RelaxAll); return createAArch64ELFStreamer(Ctx, MAB, OS, Emitter, RelaxAll, NoExecStack); } diff --git a/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.h b/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.h index 670e657..c40b3e6 100644 --- a/lib/Target/AArch6...