qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v2 17/17] target/riscv: convert to TranslatorOps
Date: Tue, 10 Apr 2018 11:24:37 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

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;
  if (ctx->base.pc_next - page_start >= TARGET_PAGE_SIZE) {


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]