Re: [Qemu-devel] [PATCH v2 17/17] target/riscv: convert to TranslatorOps

2018-04-13 Thread Richard Henderson
On 04/06/2018 08:20 AM, Emilio G. Cota wrote: > Cc: Michael Clark > Cc: Palmer Dabbelt > Cc: Sagar Karandikar > Cc: Bastian Koppelmann > Signed-off-by: Emilio G. Cota > --- > target/riscv/translate.c | 158 > --- > 1 file changed, 80 insertions(+),

Re: [Qemu-devel] [PATCH v2 17/17] target/riscv: convert to TranslatorOps

2018-04-10 Thread Emilio G. Cota
On Tue, Apr 10, 2018 at 09:05:06 -0500, Eric Blake wrote: > On 04/10/2018 07:59 AM, Emilio G. Cota wrote: > > On Tue, Apr 10, 2018 at 11:24:37 +1000, Richard Henderson wrote: > >> On 04/07/2018 04:20 AM, Emilio G. Cota wrote: > >>> +next_page = (ctx->base.pc_first & TARGET_PAGE_MASK) + > >

Re: [Qemu-devel] [PATCH v2 17/17] target/riscv: convert to TranslatorOps

2018-04-10 Thread Eric Blake
On 04/10/2018 07:59 AM, Emilio G. Cota wrote: > On Tue, Apr 10, 2018 at 11:24:37 +1000, Richard Henderson wrote: >> On 04/07/2018 04:20 AM, Emilio G. Cota wrote: >>> +next_page = (ctx->base.pc_first & TARGET_PAGE_MASK) + >>> TARGET_PAGE_SIZE; >>> +if (ctx->base.pc_next >= next_page

Re: [Qemu-devel] [PATCH v2 17/17] target/riscv: convert to TranslatorOps

2018-04-10 Thread Emilio G. Cota
On Tue, Apr 10, 2018 at 11:24:37 +1000, Richard Henderson wrote: > On 04/07/2018 04:20 AM, Emilio G. Cota wrote: > > +next_page = (ctx->base.pc_first & TARGET_PAGE_MASK) + > > TARGET_PAGE_SIZE; > > +if (ctx->base.pc_next >= next_page) { > > This fails for the last page of the addr

Re: [Qemu-devel] [PATCH v2 17/17] target/riscv: convert to TranslatorOps

2018-04-09 Thread Richard Henderson
On 04/07/2018 04:20 AM, Emilio G. Cota wrote: > +next_page = (ctx->base.pc_first & TARGET_PAGE_MASK) + > TARGET_PAGE_SIZE; > +if (ctx->base.pc_next >= next_page) { This fails for the last page of the address space. Better is page_start = ctx->base.pc_first & TARGET_PAGE_MASK;

[Qemu-devel] [PATCH v2 17/17] target/riscv: convert to TranslatorOps

2018-04-06 Thread Emilio G. Cota
Cc: Michael Clark Cc: Palmer Dabbelt Cc: Sagar Karandikar Cc: Bastian Koppelmann Signed-off-by: Emilio G. Cota --- target/riscv/translate.c | 158 --- 1 file changed, 80 insertions(+), 78 deletions(-) diff --git a/target/riscv/translate.c b/target/