[Top][All Lists]

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

Re: [Qemu-devel] [PATCH, MIPS] Code translation improvement

From: Thiemo Seufer
Subject: Re: [Qemu-devel] [PATCH, MIPS] Code translation improvement
Date: Mon, 25 Jun 2007 18:46:14 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Aurelien Jarno wrote:
> Hi,
> The patch below makes a few improvement to the code translation, and fixes
> a small bug:
> - The check for the bit ERL in CP0 Status register implies that the CPU
>   is in kernel mode, so there is no need to further check for user mode.


> - Checking for the bit UM in CP0 Status register is not enough to detect
>   the user mode, the patch below changes that to a check for 
>   MIPS_HFLAG_UM in hflags.


> - Currently checking if CP0 is accessible, ie either the CPU is in kernel
>   mode or the bit CU0 in CP0 Status register enabled, is done in the
>   translated code. The patch below moves the check for user mode at 
>   translation time to improve a bit the execution time. It also saves a 
>   call to save_cpu_state() if the CPU is in kernel mode. A few CP0
>   instructions then needs to explicitely save the cpu state, as they
>   are modifying hflags.

This part breaks my standard Linux boot test. In general the idea is
sound, though.


reply via email to

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