[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/8] sparc64: fix missing address masking
From: |
Igor Kovalenko |
Subject: |
Re: [Qemu-devel] [PATCH 2/8] sparc64: fix missing address masking |
Date: |
Wed, 2 Jun 2010 23:20:10 +0400 |
On Wed, Jun 2, 2010 at 5:47 PM, Richard Henderson <address@hidden> wrote:
> On 06/01/2010 09:29 PM, Igor Kovalenko wrote:
>> On Wed, Jun 2, 2010 at 12:44 AM, Richard Henderson <address@hidden> 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
- [Qemu-devel] [PATCH 0/8] sparc64 fixes, Igor V. Kovalenko, 2010/06/01
- [Qemu-devel] [PATCH 1/8] sparc64: fix tag access register on mmu traps, Igor V. Kovalenko, 2010/06/01
- [Qemu-devel] [PATCH 2/8] sparc64: fix missing address masking, Igor V. Kovalenko, 2010/06/01
- Re: [Qemu-devel] [PATCH 2/8] sparc64: fix missing address masking, Richard Henderson, 2010/06/01
- Re: [Qemu-devel] [PATCH 2/8] sparc64: fix missing address masking, Igor Kovalenko, 2010/06/02
- Re: [Qemu-devel] [PATCH 2/8] sparc64: fix missing address masking, Richard Henderson, 2010/06/02
- Re: [Qemu-devel] [PATCH 2/8] sparc64: fix missing address masking, Blue Swirl, 2010/06/02
- Re: [Qemu-devel] [PATCH 2/8] sparc64: fix missing address masking, Andreas Färber, 2010/06/02
- Re: [Qemu-devel] [PATCH 2/8] sparc64: fix missing address masking, Igor Kovalenko, 2010/06/02
- Re: [Qemu-devel] [PATCH 2/8] sparc64: fix missing address masking,
Igor Kovalenko <=
[Qemu-devel] [PATCH 3/8] sparc64: fix 32bit load sign extension, Igor V. Kovalenko, 2010/06/01
- [Qemu-devel] Re: [PATCH 3/8] sparc64: fix 32bit load sign extension, Paolo Bonzini, 2010/06/03
- [Qemu-devel] Re: [PATCH 3/8] sparc64: fix 32bit load sign extension, Alexander Graf, 2010/06/03
- [Qemu-devel] Re: [PATCH 3/8] sparc64: fix 32bit load sign extension, Paolo Bonzini, 2010/06/03
- [Qemu-devel] Re: [PATCH 3/8] sparc64: fix 32bit load sign extension, Igor Kovalenko, 2010/06/03
- [Qemu-devel] Re: [PATCH 3/8] sparc64: fix 32bit load sign extension, Paolo Bonzini, 2010/06/04
- [Qemu-devel] Re: [PATCH 3/8] sparc64: fix 32bit load sign extension, Paolo Bonzini, 2010/06/04
- [Qemu-devel] [PATCH] target-i386: fix decoding of negative 4-byte displacements, Paolo Bonzini, 2010/06/04
- Re: [Qemu-devel] [PATCH] target-i386: fix decoding of negative 4-byte displacements, Richard Henderson, 2010/06/04
- Re: [Qemu-devel] [PATCH] target-i386: fix decoding of negative 4-byte displacements, Blue Swirl, 2010/06/04