On 23 May 2014 01:42, Edgar E. Iglesias <[email protected]> wrote:
> From: "Edgar E. Iglesias" <[email protected]>
>
> Avoid using IS_USER directly as the MMU-idx to simplify future
> changes to the MMU layout.
>
> Reviewed-by: Peter Maydell <[email protected]>
> Signed-off-by: Edgar E. Iglesias <[email protected]>
> ---
You can't put this patch at this point in the series,
because the parts like this:
> @@ -8568,7 +8568,11 @@ static void disas_arm_insn(CPUARMState * env,
> DisasContext *s)
> rn = (insn >> 16) & 0xf;
> rd = (insn >> 12) & 0xf;
> tmp2 = load_reg(s, rn);
> - i = (IS_USER(s) || (insn & 0x01200000) == 0x00200000);
> + if (IS_USER(s) || (insn & 0x01200000) == 0x00200000) {
> + i = 0;
> + } else {
> + i = get_mem_index(s);
> + }
are assuming that MMU_USER_IDX is zero, which is
not true til after the following patch is applied.
Also I noticed looking through that you seem to have
missed the calls to gen_aa32_st32() which have a
hard-wired 0 parameter for the index. I think these
should probably just be using get_mem_index().
thanks
-- PMM