From: Igor Kovalenko <igor.v.kovalenko@gmail.com>
To: Richard Henderson <rth@twiddle.net>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/8] sparc64: fix missing address masking
Date: Wed, 2 Jun 2010 23:20:10 +0400 [thread overview]
Message-ID: <AANLkTimX-Pdwt2JALudzqvgMi_umUhPmOrjsvaGG4AKD@mail.gmail.com> (raw)
In-Reply-To: <4C0660E6.20703@twiddle.net>
On Wed, Jun 2, 2010 at 5:47 PM, Richard Henderson <rth@twiddle.net> wrote:
> On 06/01/2010 09:29 PM, Igor Kovalenko wrote:
>> On Wed, Jun 2, 2010 at 12:44 AM, Richard Henderson <rth@twiddle.net> wrote:
>>> On 06/01/2010 01:12 PM, Igor V. Kovalenko wrote:
>>>> + if ((env->pstate & PS_AM) && is_translating_asi(asi)) {
>>>> + addr &= 0xffffffffULL;
>>>> + }
>>>
>>> I suggest that these be written instead as
>>>
>>> if (is_translating_asi(asi)) {
>>> addr = address_mask(addr);
>>> }
>>>
>>> That should allow you to remove some of the ifdefs.
>>
>> All address masking is done for sparc64 target only, sparc32 does not
>> have the notion of translating asi.
>
> Of course I know that.
>
>> I think it's better to do debug printf macro trick ...
>
> ... with no evidence. The compiler is happy to optimize away
> the entire if statement without having to resort to macros.
>
>> ... then but I see no real benefit at the moment.
>
> Avoiding ifdefs isn't a benefit?
Reading through the code you will have false evidence of possible
extra steps taken by hardware we emulate.
Looking at sparcv8 docs it is clear that similar steps are done there
as well so I'll drop ifdefs at call sites and redo the patch.
--
Kind regards,
Igor V. Kovalenko
next prev parent reply other threads:[~2010-06-02 19:20 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-01 20:12 [Qemu-devel] [PATCH 0/8] sparc64 fixes Igor V. Kovalenko
2010-06-01 20:12 ` [Qemu-devel] [PATCH 1/8] sparc64: fix tag access register on mmu traps Igor V. Kovalenko
2010-06-01 20:12 ` [Qemu-devel] [PATCH 2/8] sparc64: fix missing address masking Igor V. Kovalenko
2010-06-01 20:44 ` Richard Henderson
2010-06-02 4:29 ` Igor Kovalenko
2010-06-02 13:47 ` Richard Henderson
2010-06-02 16:10 ` Blue Swirl
2010-06-02 16:46 ` Andreas Färber
2010-06-02 18:21 ` Igor Kovalenko
2010-06-02 19:20 ` Igor Kovalenko [this message]
2010-06-01 20:12 ` [Qemu-devel] [PATCH 3/8] sparc64: fix 32bit load sign extension Igor V. Kovalenko
2010-06-03 13:18 ` [Qemu-devel] " Paolo Bonzini
2010-06-03 15:25 ` Alexander Graf
2010-06-03 15:42 ` Paolo Bonzini
2010-06-03 19:59 ` Igor Kovalenko
2010-06-04 7:53 ` Paolo Bonzini
2010-06-04 10:18 ` Paolo Bonzini
2010-06-04 14:27 ` [Qemu-devel] [PATCH] target-i386: fix decoding of negative 4-byte displacements Paolo Bonzini
2010-06-04 16:23 ` Richard Henderson
2010-06-04 20:03 ` Blue Swirl
2010-06-01 20:12 ` [Qemu-devel] [PATCH 4/8] sparc64: fix ldxfsr insn Igor V. Kovalenko
2010-06-01 20:12 ` [Qemu-devel] [PATCH 5/8] sparc64: use symbolic name for MMU index Igor V. Kovalenko
2010-06-02 16:16 ` Blue Swirl
2010-06-02 18:45 ` Igor Kovalenko
2010-06-01 20:12 ` [Qemu-devel] [PATCH 6/8] sparc64: improve ldf and stf insns Igor V. Kovalenko
2010-06-01 20:12 ` [Qemu-devel] [PATCH 7/8] sparc64: fix udiv and sdiv insns Igor V. Kovalenko
2010-06-01 20:12 ` [Qemu-devel] [PATCH 8/8] sparc64: fix umul and smul insns Igor V. Kovalenko
2010-06-02 20:27 ` [Qemu-devel] [PATCH 0/8] sparc64 fixes 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=AANLkTimX-Pdwt2JALudzqvgMi_umUhPmOrjsvaGG4AKD@mail.gmail.com \
--to=igor.v.kovalenko@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).