From: Keir Fraser <keir@xensource.com>
To: "Petersson, Mats" <Mats.Petersson@amd.com>,
Jan Beulich <jbeulich@novell.com>,
xen-devel@lists.xensource.com
Subject: Re: [PATCH] x86 emulation: fix bswap
Date: Thu, 15 Feb 2007 11:54:27 +0000 [thread overview]
Message-ID: <C1F9FA73.977E%keir@xensource.com> (raw)
In-Reply-To: <907625E08839C4409CE5768403633E0B018E1988@sefsexmb1.amd.com>
On 15/2/07 11:46, "Petersson, Mats" <Mats.Petersson@amd.com> wrote:
> I just wrote a little bit of code to test it:
> int x = 0x12345678;
> __asm__(".byte 0x66; bswap %0": "=r"(x): "0"(x))
> printf("x=%x", x);
>
> Prints 12340000, so the data is "zerod". (and it looks like the code
> generated by gcc is correct!).
Same behaviour as on an Intel CPU. I am quite inclined to do that directly
in the emulator, with a comment explaining why, rather than do an undefined
operation. That just seems unnecessarily scary. Direct 32- and 64-bit BSWAP
is okay though and does reduce the code size.
-- Keir
next prev parent reply other threads:[~2007-02-15 11:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-15 10:22 [PATCH] x86 emulation: fix bswap Jan Beulich
2007-02-15 10:33 ` Keir Fraser
2007-02-15 11:37 ` Jan Beulich
2007-02-15 11:46 ` Petersson, Mats
2007-02-15 11:54 ` Keir Fraser [this message]
2007-02-15 12:12 ` Petersson, Mats
2007-02-16 7:32 ` Error with vfb Xen 3.0.4 Kaushik Barde
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=C1F9FA73.977E%keir@xensource.com \
--to=keir@xensource.com \
--cc=Mats.Petersson@amd.com \
--cc=jbeulich@novell.com \
--cc=xen-devel@lists.xensource.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 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.