All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
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 08:54:33 -0700	[thread overview]
Message-ID: <43035DB9.7020709@zytor.com> (raw)
In-Reply-To: <1124288543.773.31.camel@localhost.localdomain>

Alan Cox wrote:
> 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.
> 

True, although I thought gcc considered the above an idiom and would 
generate a rotate instruction.  Perhaps it should be | rather than +.

	-hpa

      reply	other threads:[~2005-08-17 15:55 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
2005-08-17 15:54         ` H. Peter Anvin [this message]

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=43035DB9.7020709@zytor.com \
    --to=hpa@zytor.com \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=chrisl@vmware.com \
    --cc=chrisw@osdl.org \
    --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.