summaryrefslogtreecommitdiff
path: root/target-ppc/op_helper.c
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-30 17:26:29 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-30 17:26:29 +0000
commitef0d51af1e5b7f29bfb72f0bf5f528c272c277a8 (patch)
treed1b847d87ff5f2efff5d9960f458c1c1bd4bc462 /target-ppc/op_helper.c
parent1addc7c5a11e9fe1811c792614516ed12689a1f0 (diff)
downloadqemu-ef0d51af1e5b7f29bfb72f0bf5f528c272c277a8.zip
target-ppc: convert PPC 440 instructions to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5836 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/op_helper.c')
-rw-r--r--target-ppc/op_helper.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c
index a5bd9737f2..f93adfa7eb 100644
--- a/target-ppc/op_helper.c
+++ b/target-ppc/op_helper.c
@@ -1999,24 +1999,39 @@ void do_store_403_pb (int num)
#endif
/* 440 specific */
-void do_440_dlmzb (void)
+target_ulong helper_dlmzb (target_ulong high, target_ulong low, uint32_t update_Rc)
{
target_ulong mask;
int i;
i = 1;
for (mask = 0xFF000000; mask != 0; mask = mask >> 8) {
- if ((T0 & mask) == 0)
+ if ((high & mask) == 0) {
+ if (update_Rc) {
+ env->crf[0] = 0x4;
+ }
goto done;
+ }
i++;
}
for (mask = 0xFF000000; mask != 0; mask = mask >> 8) {
- if ((T1 & mask) == 0)
- break;
+ if ((low & mask) == 0) {
+ if (update_Rc) {
+ env->crf[0] = 0x8;
+ }
+ goto done;
+ }
i++;
}
+ if (update_Rc) {
+ env->crf[0] = 0x2;
+ }
done:
- T0 = i;
+ env->xer = (env->xer & ~0x7F) | i;
+ if (update_Rc) {
+ env->crf[0] |= xer_so;
+ }
+ return i;
}
/*****************************************************************************/