Displaying 5 results from an estimated 5 matches for "getemitter".
2017 Oct 11
3
TargetRegistry and MC object ownership.
...put together an MC-based assembler the other day, I again
encountered MC's non-obvious memory ownership rules. The most egregious
example of these is MCObjectStreamer's destructor:
MCObjectStreamer::~MCObjectStreamer() {
delete &Assembler->getBackend();
delete &Assembler->getEmitter();
delete &Assembler->getWriter();
delete Assembler;
}
In the depths of a fever from a head-cold, I snapped. I've been hacking MC
to convert these raw pointers (and worse: references!) to unique_ptrs
(apologies to people whose backbends I've broken), but I hit a big blocker
when...
2013 Oct 10
0
[LLVMdev] [PATCH] R600/SI: Embed disassembly in ELF object
...tor<MCFixup, 4> Fixups;
> + SmallVector<char, 16> CodeBytes;
> + raw_svector_ostream CodeStream(CodeBytes);
> +
> + MCObjectStreamer &ObjStreamer = (MCObjectStreamer &)OutStreamer;
> + MCCodeEmitter &InstEmitter = ObjStreamer.getAssembler().getEmitter();
> + InstEmitter.EncodeInstruction(TmpInst, CodeStream, Fixups);
> + CodeStream.flush();
> +
> + HexLines.resize(HexLines.size() + 1);
> + std::string &HexLine = HexLines.back();
> + raw_string_ostream HexStream(HexLine);
> +
> + for (size...
2013 Oct 10
2
[LLVMdev] [PATCH] R600/SI: Embed disassembly in ELF object
Hi,
This patch adds R600/SI disassembly text to compiled object files, when
a code dump is requested, to assist debugging in Mesa clients.
Here's an example of the output in a Mesa client with a corresponding
patch and RADEON_DUMP_SHADERS set:
Shader Disassembly:
S_WQM_B64 EXEC, EXEC ; BEFE0A7E
S_MOV_B32 M0, SGPR6 ; BEFC0306
2010 Jul 16
0
[LLVMdev] Win32 COFF Support - Patch 3
...getSectionData()->setHasInstructions(true);
> +
> + // FIXME: Who owns this memory?
> + MCInstFragment *Fragment =
> + new MCInstFragment(Instruction, getSectionData());
> +
> + {
> + raw_svector_ostream VecOS(Fragment->getCode());
> +
> + getAssembler().getEmitter().EncodeInstruction(Instruction, VecOS, Fragment->getFixups());
> +
> + // VecOS's destructor calls flush.
> + }
The nested block here is unnecessary.
> +
> + AddFragment(Fragment);
> }
>
> void WinCOFFStreamer::Finish() {
--
Thanks again for your work, I...
2010 Jul 14
2
[LLVMdev] Win32 COFF Support - Patch 3
On Sun, Jul 11, 2010 at 6:10 PM, Chris Lattner <clattner at apple.com> wrote:
> This probably needs to be slightly tweaked to work with mainline. I don't see anything objectionable, but I think Daniel needs to review this one.
Updated patch to work with mainline.
http://github.com/Bigcheese/llvm-mirror/commit/d19a4c82c18afc4830c09b70f02d162292231c94
- Michael Spencer