diff options
author | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-09-30 13:03:23 +0000 |
---|---|---|
committer | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-09-30 13:03:23 +0000 |
commit | be147d08790d4d80bfcf2c209031eede52b7dd62 (patch) | |
tree | e21320c4e76c6d1d3b8c5fe2488ed5a6c22fa92e /target-ppc/op_helper.c | |
parent | b0566f4f4584ca1c968daf64007df58cb5a21038 (diff) |
* Update OEA environment, following the PowerPC 2.04 specification:
- New mtmsr/mtmsrd form that just update RI and EE bits
- New hrfid, lq and stq instructions
- Add support for supervisor and hypervisor modes process priority update
- Code provision for hypervisor SPR accesses
* Actually implement the wait instruction
* Bugfixes (missing RETURN in micro-op / missing #ifdef)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3289 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/op_helper.c')
-rw-r--r-- | target-ppc/op_helper.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c index d75331722d..5223b1543f 100644 --- a/target-ppc/op_helper.c +++ b/target-ppc/op_helper.c @@ -1002,6 +1002,22 @@ void do_rfid (void) env->interrupt_request |= CPU_INTERRUPT_EXITTB; } #endif +#if defined(TARGET_PPC64H) +void do_hrfid (void) +{ + if (env->spr[SPR_HSRR1] & (1ULL << MSR_SF)) { + env->nip = (uint64_t)(env->spr[SPR_HSRR0] & ~0x00000003); + do_store_msr(env, (uint64_t)(env->spr[SPR_HSRR1] & ~0xFFFF0000UL)); + } else { + env->nip = (uint32_t)(env->spr[SPR_HSRR0] & ~0x00000003); + do_store_msr(env, (uint32_t)(env->spr[SPR_HSRR1] & ~0xFFFF0000UL)); + } +#if defined (DEBUG_OP) + cpu_dump_rfi(env->nip, do_load_msr(env)); +#endif + env->interrupt_request |= CPU_INTERRUPT_EXITTB; +} +#endif #endif void do_tw (int flags) |