diff options
author | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-03-23 09:45:27 +0000 |
---|---|---|
committer | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-03-23 09:45:27 +0000 |
commit | 426613dbf8cd1120f9e47fb636c4c03bc1ef586c (patch) | |
tree | efc43a2a28033f82155c30d618f9b0b8c18b4b02 /target-ppc/op_mem.h | |
parent | 1b9eb036b9cd2d8b671f59030e8522c64ccea703 (diff) |
Add missing PowerPC 64 instructions
PowerPC 64 fixes.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2530 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/op_mem.h')
-rw-r--r-- | target-ppc/op_mem.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/target-ppc/op_mem.h b/target-ppc/op_mem.h index f080abc413..a78aa62c48 100644 --- a/target-ppc/op_mem.h +++ b/target-ppc/op_mem.h @@ -534,6 +534,17 @@ void OPPROTO glue(op_lwarx_64, MEMSUFFIX) (void) RETURN(); } +void OPPROTO glue(op_ldarx, MEMSUFFIX) (void) +{ + if (unlikely(T0 & 0x03)) { + do_raise_exception(EXCP_ALIGN); + } else { + T1 = glue(ldq, MEMSUFFIX)((uint32_t)T0); + regs->reserve = (uint32_t)T0; + } + RETURN(); +} + void OPPROTO glue(op_ldarx_64, MEMSUFFIX) (void) { if (unlikely(T0 & 0x03)) { @@ -569,6 +580,17 @@ void OPPROTO glue(op_lwarx_le_64, MEMSUFFIX) (void) RETURN(); } +void OPPROTO glue(op_ldarx_le, MEMSUFFIX) (void) +{ + if (unlikely(T0 & 0x03)) { + do_raise_exception(EXCP_ALIGN); + } else { + T1 = glue(ld64r, MEMSUFFIX)((uint32_t)T0); + regs->reserve = (uint32_t)T0; + } + RETURN(); +} + void OPPROTO glue(op_ldarx_le_64, MEMSUFFIX) (void) { if (unlikely(T0 & 0x03)) { @@ -615,6 +637,22 @@ void OPPROTO glue(op_stwcx_64, MEMSUFFIX) (void) RETURN(); } +void OPPROTO glue(op_stdcx, MEMSUFFIX) (void) +{ + if (unlikely(T0 & 0x03)) { + do_raise_exception(EXCP_ALIGN); + } else { + if (unlikely(regs->reserve != (uint32_t)T0)) { + env->crf[0] = xer_ov; + } else { + glue(stq, MEMSUFFIX)((uint32_t)T0, T1); + env->crf[0] = xer_ov | 0x02; + } + } + regs->reserve = -1; + RETURN(); +} + void OPPROTO glue(op_stdcx_64, MEMSUFFIX) (void) { if (unlikely(T0 & 0x03)) { @@ -665,6 +703,22 @@ void OPPROTO glue(op_stwcx_le_64, MEMSUFFIX) (void) RETURN(); } +void OPPROTO glue(op_stdcx_le, MEMSUFFIX) (void) +{ + if (unlikely(T0 & 0x03)) { + do_raise_exception(EXCP_ALIGN); + } else { + if (unlikely(regs->reserve != (uint32_t)T0)) { + env->crf[0] = xer_ov; + } else { + glue(st64r, MEMSUFFIX)((uint32_t)T0, T1); + env->crf[0] = xer_ov | 0x02; + } + } + regs->reserve = -1; + RETURN(); +} + void OPPROTO glue(op_stdcx_le_64, MEMSUFFIX) (void) { if (unlikely(T0 & 0x03)) { |