qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] target-arm: fix LDMIA bug on page boundary


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] target-arm: fix LDMIA bug on page boundary
Date: Sun, 24 Apr 2011 16:25:55 +0100

2011/4/24 오유연 <address@hidden>:
> When consecutive memory locations are on page boundary, a base register may be
> loaded before page fault occurs. After page fault handling, it losts the 
> memory
> location information. To solve this problem, loading a base register has to 
> put back.

Thanks for finding this. I agree the fix is required, but I think I'd
prefer it if the thumb code for this case handled it in the same way
the disas_arm_insn() code does:

   loaded_base = 0;
   TCGV_UNUSED(loaded_var);
  [...]
       tmp = gen_ld32(addr, IS_USER(s));
       if (i == 15) {
           gen_bx(s, tmp);
       } else if (i == rn) {
           loaded_var = tmp;
           loaded_base = 1;
       } else {
           store_reg(s, i, tmp);
       }
 [...]
  if (loaded_base) {
      store_reg(s, rn, loaded_var);
  }

-- PMM



reply via email to

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