All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Zachary Amsden <zach@vmware.com>, Andi Kleen <ak@suse.de>,
	akpm@osdl.org, chrisl@vmware.com, chrisw@osdl.org,
	Keir.Fraser@cl.cam.ac.uk, linux-kernel@vger.kernel.org,
	m+Ian.Pratt@cl.cam.ac.uk, mbligh@mbligh.org, pratap@vmware.com,
	virtualization@lists.osdl.org, zwame@arm.linux.org.uk
Subject: Re: [PATCH 5/14] i386 / Use early clobber to eliminate rotate in desc
Date: Wed, 17 Aug 2005 15:22:22 +0100	[thread overview]
Message-ID: <1124288543.773.31.camel@localhost.localdomain> (raw)
In-Reply-To: <43027F6C.4070801@zytor.com>

On Maw, 2005-08-16 at 17:06 -0700, H. Peter Anvin wrote:
> At least i386 and x86-64 gcc should recognize
> 
> 	((foo << x) + (foo >> (32-x)))
> 
> ... as a 32-bit rotate

Only for  1 <= x <= 31. For the x = 0 case the code posted is undefined
and at least in some cases gcc will do "interesting" things as a result
such as treating >> 32 as >> 0.

Alan


  reply	other threads:[~2005-08-17 13:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-11  4:54 [PATCH 5/14] i386 / Use early clobber to eliminate rotate in desc zach
2005-08-16 23:45 ` Andi Kleen
2005-08-16 23:56   ` Zachary Amsden
2005-08-17  0:06     ` H. Peter Anvin
2005-08-17 14:22       ` Alan Cox [this message]
2005-08-17 15:54         ` H. Peter Anvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1124288543.773.31.camel@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=chrisl@vmware.com \
    --cc=chrisw@osdl.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m+Ian.Pratt@cl.cam.ac.uk \
    --cc=mbligh@mbligh.org \
    --cc=pratap@vmware.com \
    --cc=virtualization@lists.osdl.org \
    --cc=zach@vmware.com \
    --cc=zwame@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.