* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#if !defined (__PPC_H__)
#define __PPC_H__
#include "cpu.h"
#include "exec-all.h"
-/* For normal operations, precise emulation should not be needed */
-//#define USE_PRECISE_EMULATION 1
+/* Precise emulation is needed to correctly emulate exception flags */
#define USE_PRECISE_EMULATION 1
register struct CPUPPCState *env asm(AREG0);
#include "softmmu_exec.h"
#endif /* !defined(CONFIG_USER_ONLY) */
-static always_inline void env_to_regs (void)
+static inline void env_to_regs(void)
{
}
-static always_inline void regs_to_env (void)
+static inline void regs_to_env(void)
{
}
-static always_inline int cpu_halted (CPUState *env)
+static inline int cpu_has_work(CPUState *env)
+{
+ return (msr_ee && (env->interrupt_request & CPU_INTERRUPT_HARD));
+}
+
+
+static inline int cpu_halted(CPUState *env)
{
if (!env->halted)
return 0;
- if (msr_ee && (env->interrupt_request & CPU_INTERRUPT_HARD)) {
+ if (cpu_has_work(env)) {
env->halted = 0;
return 0;
}