From: "H. Peter Anvin" <hpa@linux.intel.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: "kbuild test robot" <fengguang.wu@intel.com>,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: sound/pci/asihpi/hpioctl.c:125:6: warning: cast to pointer from integer of different size
Date: Fri, 08 Feb 2013 09:06:52 -0800 [thread overview]
Message-ID: <511530AC.1070203@linux.intel.com> (raw)
In-Reply-To: <20130208152858.GU17833@n2100.arm.linux.org.uk>
On 02/08/2013 07:28 AM, Russell King - ARM Linux wrote:
>
> Whether that's safe for x86 or not, I don't know, but my suspicions are
> that it's unsafe on x86 as it's possible to refer to the various bytes/
> half-words of eax separately.
>
> So, I came to the conclusion that if x86 remains a problem, there's
> little point supporting it on ARM.
>
It is possible to access bytes separately, but gcc generally doesn't.
However, whether or not that can be relied upon safely is a tricky question.
It *is* also worth nothing that the x86 ABI does allow two words to be
returned in registers from a normal C function, simply by returning a
structure. That doesn't solve the problem at hand, though, which is how
to make a type-neutral macro which can handle doublewords...
-hpa
next prev parent reply other threads:[~2013-02-08 17:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <51143ca4.bNX7TobZ2rDrz0zj%fengguang.wu@intel.com>
2013-02-08 2:19 ` sound/pci/asihpi/hpioctl.c:125:6: warning: cast to pointer from integer of different size H. Peter Anvin
2013-02-08 15:28 ` Russell King - ARM Linux
2013-02-08 17:06 ` H. Peter Anvin [this message]
2013-02-08 18:50 ` Ville Syrjälä
2013-02-08 22:57 ` Russell King - ARM Linux
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=511530AC.1070203@linux.intel.com \
--to=hpa@linux.intel.com \
--cc=fengguang.wu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=ville.syrjala@linux.intel.com \
/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;
as well as URLs for NNTP newsgroup(s).