From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPb4b-0005Hi-Bv for qemu-devel@nongnu.org; Thu, 26 May 2011 09:58:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QPb4W-0007XO-QJ for qemu-devel@nongnu.org; Thu, 26 May 2011 09:58:01 -0400 Received: from mail-pw0-f45.google.com ([209.85.160.45]:42768) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPb4W-0007XJ-IY for qemu-devel@nongnu.org; Thu, 26 May 2011 09:57:56 -0400 Received: by pwi6 with SMTP id 6so369344pwi.4 for ; Thu, 26 May 2011 06:57:55 -0700 (PDT) Sender: Richard Henderson Message-ID: <4DDE5C28.4030507@twiddle.net> Date: Thu, 26 May 2011 06:56:56 -0700 From: Richard Henderson MIME-Version: 1.0 References: <97bbf40c055a9949f5fbf185764792679fb8273a.1305889001.git.batuzovk@ispras.ru> <4DD6B4E9.3040501@twiddle.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 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: Kirill Batuzov Cc: mj.mccormack@samsung.com, qemu-devel@nongnu.org, zhur@ispras.ru On 05/26/2011 05:36 AM, Kirill Batuzov wrote: >> x = (int32_t)x >> (int32_t)y; >> > This expression has an implementation-defined behavior accroding to > C99 6.5.7 so we decided to emulate signed shifts by hand. Technically, yes. In practice, no. GCC, ICC, LLVM, MSVC all know what the user wants here and will implement it "properly". r~