[patch] Pass an ArrayRef to MCDisassembler::getInstruction

Eric Christopher echristo at gmail.com
Tue Nov 11 17:26:09 PST 2014


This should be fine. A remote process would be (if I'm reading correctly)
shipping the bytes to disassemble over the wire via an ArrayRef in this
model. I think that's ok, but cc'ing Greg to double check. At the least,
it's no different than what's going on right now.

The existing MemoryObject could be used to do all of that itself and keep a
nice clean virtual interface, but we could also just redo that if we end up
having a need.

Greg? Thoughts?

-eric

On Mon Nov 10 2014 at 10:22:56 AM Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> The attached patches change  MCDisassembler::getInstruction to take an
> ArrayRef<uint8_t> instead of a MemoryObject.
>
> Even on X86 there is a maximum size an instruction can have. Given
> that, it seems way simpler and more efficient to just pass an ArrayRef
> to the disassembler instead of a MemoryObject and have it do a virtual
> call every time it wants some extra bytes.
>
> Cheers,
> Rafael
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141112/24013277/attachment.html>


More information about the llvm-commits mailing list