From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45727) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQ0VO-0001mi-Uv for qemu-devel@nongnu.org; Fri, 27 May 2011 13:07:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQ0VN-0000j5-RY for qemu-devel@nongnu.org; Fri, 27 May 2011 13:07:22 -0400 Received: from mail-qw0-f45.google.com ([209.85.216.45]:63342) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQ0VN-0000j1-O5 for qemu-devel@nongnu.org; Fri, 27 May 2011 13:07:21 -0400 Received: by qwj8 with SMTP id 8so1158483qwj.4 for ; Fri, 27 May 2011 10:07:21 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4DDEC29D.6020204@twiddle.net> References: <97bbf40c055a9949f5fbf185764792679fb8273a.1305889001.git.batuzovk@ispras.ru> <4DD6B4E9.3040501@twiddle.net> <4DDE5C28.4030507@twiddle.net> <4DDEB39F.80609@twiddle.net> <4DDEC29D.6020204@twiddle.net> From: Blue Swirl Date: Fri, 27 May 2011 20:07:01 +0300 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: Richard Henderson Cc: mj.mccormack@samsung.com, qemu-devel@nongnu.org, zhur@ispras.ru, Kirill Batuzov On Fri, May 27, 2011 at 12:14 AM, Richard Henderson wrote= : > On 05/26/2011 01:25 PM, Blue Swirl wrote: >>> I don't see the point. =C2=A0The C99 implementation defined escape hatc= h >>> exists for weird cpus. =C2=A0Which we won't be supporting as a QEMU hos= t. >> >> 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. =C2=A0But, honestly, > essentially every place in qemu that uses shifts on signed types > would have to be audited. =C2=A0Really. OK. > The C99 hook exists to efficiently support targets that don't have > arithmetic shift operations. =C2=A0Honestly. So it would be impossible for a compiler developer to change the logic for shifts for some supported two's-complement logic CPUs (like x86) just because it's legal?