Am 02.06.2010 um 18:10 schrieb Blue Swirl:

On Wed, Jun 2, 2010 at 1:47 PM, Richard Henderson <r...@twiddle.net> wrote:
On 06/01/2010 09:29 PM, Igor Kovalenko wrote:
On Wed, Jun 2, 2010 at 12:44 AM, Richard Henderson <r...@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.

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?

I agree macros would make the code more tidy, perhaps it could swallow
both the check and the masking. The macro can be empty for Sparc32.

I usually prefer static inline functions over multi-line macros. Probably a matter of taste.

Reply via email to