[patch] Pass an ArrayRef to MCDisassembler::getInstruction
Greg Clayton
gclayton at apple.com
Tue Nov 11 17:32:57 PST 2014
That would be fine with us.
> On Nov 11, 2014, at 5:26 PM, Eric Christopher <echristo at gmail.com> wrote:
>
> 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
More information about the llvm-commits
mailing list