public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-arch <linux-arch@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: The type of bitops
Date: Tue, 07 May 2013 16:18:53 -0700	[thread overview]
Message-ID: <51898BDD.90705@zytor.com> (raw)
In-Reply-To: <51898B87.9020005@mit.edu>

On 05/07/2013 04:17 PM, Andy Lutomirski wrote:
> 
> The one and only time I tried to use this, I thought this was odd.  Long
> has a different size on 32 vs 64 bit architectures, and bit ops seem
> like they'd want to be the same size everywhere so you can allocate the
> appropriate number of bits.  (Also, if you only want 32 bits, you have
> to do some evil cheating, and I don't trust casting int* to long* on
> big-endian architectures.)
> 
> Would offering a u32* option make sense?
> 

Honestly, the only thing that makes sense on bigendian architectures is
either byte-by-byte elements or counting bit numbers from the MSB, but
that is serious water under the bridge at this point...

	-hpa

  parent reply	other threads:[~2013-05-07 23:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-06 23:53 The type of bitops H. Peter Anvin
2013-05-06 23:53 ` H. Peter Anvin
2013-05-07  0:51 ` Linus Torvalds
2013-05-07  1:36   ` H. Peter Anvin
2013-05-07  2:33     ` Linus Torvalds
2013-05-07  2:33       ` Linus Torvalds
2013-05-07 23:17   ` Andy Lutomirski
2013-05-07 23:17     ` Andy Lutomirski
2013-05-07 23:18     ` H. Peter Anvin [this message]
2013-05-07 23:18       ` H. Peter Anvin
2013-05-07 23:36       ` Andy Lutomirski
2013-05-07 23:36         ` Andy Lutomirski

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=51898BDD.90705@zytor.com \
    --to=hpa@zytor.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox