qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 1/2] target-m68k: add 64bit mull


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v2 1/2] target-m68k: add 64bit mull
Date: Mon, 31 Oct 2016 05:48:47 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

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

[Prev in Thread] Current Thread [Next in Thread]