From: "Blue Swirl" <blauwirbel@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC][PATCH] fix sparc32 mxcc 64 bit read word order
Date: Thu, 15 Nov 2007 20:10:39 +0200 [thread overview]
Message-ID: <f43fc5580711151010x3c1ca9e8secd48a2d060418ae@mail.gmail.com> (raw)
In-Reply-To: <473C4027.3030608@earthlink.net>
On 11/15/07, Robert Reif <reif@earthlink.net> wrote:
> This patch fixes the word order for 64 bit reads of the mxcc registers.
>
> It returns the high 32 bits in ret and the lower 32 bits in T0 just
> like other places in the same function.
>
> T0 is defined as: register uint32_t T0 asm(AREG1);
>
> T0 on my machine has a sizeof = 4. Because of this, I don't think
> it is necessary to mask off the high bits with 0xffffffff like other
> places in the same function. You should probably use 0xffffffffULL to
> mask off the upper 32 bits.
>
> I would remove the & 0xffffffff but I hesitate because T0 is defined
> "register" uint32_t and I'm not sure what that would really be on 64
> bit machines,
On my x86_64 sizeof(T0) is also 4. Only if I replace uint32_t with
long or uint64_t the size becomes 8, with short the size is 2.
> Is this patch correct or should I remove the & 0xffffffff here and in
> the other
> places in the same function or change them to 0xffffffffULL?
I think it's better to remove them, preferably with a different patch
without other changes.
next prev parent reply other threads:[~2007-11-15 18:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-15 12:48 [Qemu-devel] [RFC][PATCH] fix sparc32 mxcc 64 bit read word order Robert Reif
2007-11-15 18:10 ` Blue Swirl [this message]
2007-11-15 23:08 ` Robert Reif
2007-11-17 9:21 ` Blue Swirl
2007-11-18 20:57 ` Robert Reif
2007-11-18 21:10 ` Blue Swirl
2007-11-18 21:58 ` Robert Reif
2007-11-19 19:16 ` Blue Swirl
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=f43fc5580711151010x3c1ca9e8secd48a2d060418ae@mail.gmail.com \
--to=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).