From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPhsf-0001Xg-QX for qemu-devel@nongnu.org; Thu, 26 May 2011 17:14:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QPhsf-0006Lt-3n for qemu-devel@nongnu.org; Thu, 26 May 2011 17:14:09 -0400 Received: from mail-gw0-f45.google.com ([74.125.83.45]:49428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPhsf-0006Lp-01 for qemu-devel@nongnu.org; Thu, 26 May 2011 17:14:09 -0400 Received: by gwb19 with SMTP id 19so575205gwb.4 for ; Thu, 26 May 2011 14:14:08 -0700 (PDT) Sender: Richard Henderson Message-ID: <4DDEC29D.6020204@twiddle.net> Date: Thu, 26 May 2011 14:14:05 -0700 From: Richard Henderson MIME-Version: 1.0 References: <97bbf40c055a9949f5fbf185764792679fb8273a.1305889001.git.batuzovk@ispras.ru> <4DD6B4E9.3040501@twiddle.net> <4DDE5C28.4030507@twiddle.net> <4DDEB39F.80609@twiddle.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 5/6] Do constant folding for shift operations. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: mj.mccormack@samsung.com, qemu-devel@nongnu.org, zhur@ispras.ru, Kirill Batuzov On 05/26/2011 01:25 PM, Blue Swirl wrote: >> I don't see the point. The C99 implementation defined escape hatch >> exists for weird cpus. Which we won't be supporting as a QEMU host. > > Maybe not, but a compiler with this property could arrive. For > example, GCC developers could decide that since this weirdness is > allowed by the standard, it may be implemented as well. If you like, you can write a configure test for it. But, honestly, essentially every place in qemu that uses shifts on signed types would have to be audited. Really. The C99 hook exists to efficiently support targets that don't have arithmetic shift operations. Honestly. r~