]> git.proxmox.com Git - qemu.git/blobdiff - target-ppc/int_helper.c
wdt_i6300esb: fix vmstate versioning
[qemu.git] / target-ppc / int_helper.c
index 54eca9bbee10c8dd2f6383f30afc4b9ebaea4904..e50bdd20ecd2f31d70d59d4fc768cd14601cd334 100644 (file)
@@ -53,6 +53,21 @@ target_ulong helper_cntlzd(target_ulong t)
 }
 #endif
 
+target_ulong helper_cmpb(target_ulong rs, target_ulong rb)
+{
+    target_ulong mask = 0xff;
+    target_ulong ra = 0;
+    int i;
+
+    for (i = 0; i < sizeof(target_ulong); i++) {
+        if ((rs & mask) == (rb & mask)) {
+            ra |= mask;
+        }
+        mask <<= 8;
+    }
+    return ra;
+}
+
 /* shift right arithmetic helper */
 target_ulong helper_sraw(CPUPPCState *env, target_ulong value,
                          target_ulong shift)