[Top][All Lists]

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

Re: [Qemu-devel] [PATCH 28/52] target-m68k: add addx/subx/negx ops

From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 28/52] target-m68k: add addx/subx/negx ops
Date: Fri, 6 May 2016 07:11:11 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0

On 05/04/2016 10:12 AM, Laurent Vivier wrote:
+    tcg_gen_or_i32(QREG_CC_Z, QREG_CC_Z, QREG_CC_N); /* !Z is sticky */
+    gen_ext(QREG_CC_Z, QREG_CC_Z, opsize, 0);

Extending Z after the OR is a bug.

The (old) high bits of Z might be set from a previous word operation (i.e. !Z) which is exactly what's supposed to be sticky.

Since N has already been sign-extended, we've already cleared out any garbage from the sub-word result. There's no need to do anything more here.

Same change in negx, addx, subx.

+    gen_store(s, opsize, addr_dest, QREG_CC_N);

Watch the spacing.


reply via email to

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