Re: [Qemu-devel] [PATCH 04/10] disas: Support the Capstone disassembler library

2017-09-16 Thread Peter Maydell
On 14 September 2017 at 19:35, Richard Henderson wrote: > > +/* ??? Capstone requires that we copy the data into a host-addressable > + buffer first and has no call-back to read more. Therefore we need > + an estimate of buffer size. This will work

Re: [Qemu-devel] [PATCH 04/10] disas: Support the Capstone disassembler library

2017-09-16 Thread Peter Maydell
On 14 September 2017 at 19:35, Richard Henderson wrote: > If configured, prefer this over our rather dated copy of the > GPLv2-only binutils. This will be especially apparent with > the proposed vector extensions to TCG, as disas/i386.c does > not handle AVX. > >

Re: [Qemu-devel] [PATCH 04/10] disas: Support the Capstone disassembler library

2017-09-15 Thread Richard Henderson
On 09/14/2017 09:46 PM, Philippe Mathieu-Daudé wrote: >>   +static bool cap_disas(disassemble_info *info, uint64_t pc, size_t size) > > I'd rather use: > > ..,, target_ulong code, ... >> +{ > > uint64_t pc = (uint64_t)code; Why? > >> +    bool ret = false; > > Isn't it cleaner to have a

Re: [Qemu-devel] [PATCH 04/10] disas: Support the Capstone disassembler library

2017-09-14 Thread Philippe Mathieu-Daudé
Hi Richard, see inlined comments. On 09/14/2017 03:35 PM, Richard Henderson wrote: If configured, prefer this over our rather dated copy of the GPLv2-only binutils. This will be especially apparent with the proposed vector extensions to TCG, as disas/i386.c does not handle AVX.

[Qemu-devel] [PATCH 04/10] disas: Support the Capstone disassembler library

2017-09-14 Thread Richard Henderson
If configured, prefer this over our rather dated copy of the GPLv2-only binutils. This will be especially apparent with the proposed vector extensions to TCG, as disas/i386.c does not handle AVX. Signed-off-by: Richard Henderson --- include/disas/bfd.h | 4