On 10/28/2016 04:01 PM, Laurent Vivier wrote:
+    if (ext & 0x400) {
+        if (!m68k_feature(s->env, M68K_FEATURE_QUAD_MULDIV)) {
+            gen_exception(s, s->pc - 4, EXCP_UNSUPPORTED);
+            return;
+        }
+
+        SRC_EA(env, src1, OS_LONG, 0, NULL);
+
+        if (sign) {
+            tcg_gen_muls2_i32(DREG(ext, 12), DREG(ext, 0), src1, DREG(ext, 
12));
+        } else {
+            tcg_gen_mulu2_i32(DREG(ext, 12), DREG(ext, 0), src1, DREG(ext, 
12));
+        }

TCG will react badly if Dl == Dh, and thus the two outputs are the same.

This is undefined in the spec, but guests violating the spec shouldn't cause qemu to crash.

I think you should compute this into N and Z and move the results (perhaps in an order matching real hw?) to the data registers afterward.


r~

Reply via email to