qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Qemu-ppc] [PATCH for-1.1 0/3] tcg/ppc: AREG0 support a


From: malc
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH for-1.1 0/3] tcg/ppc: AREG0 support and Darwin fixes
Date: Wed, 9 May 2012 00:28:50 +0400 (MSK)
User-agent: Alpine 2.00 (LNX 1167 2008-08-23)

On Tue, 8 May 2012, Andreas F?rber wrote:

> Am 08.05.2012 21:42, schrieb Alexander Graf:
> > 
> > On 08.05.2012, at 21:29, Andreas F?rber wrote:
> > 
> >> On patch 3/3 he didn't like my alignment macro. I don't have a better
> >> one though, suggestions or patches welcome. Ideal might be some
> >> ROUND_TO_ODD() macro, but the problem is that for Darwin/AIX where it's
> >> no-op it shouldn't result in a "statement without effect" warning.
> >> Therefore my do { } while (0) as opposed to ir = MACRO(ir).
> > 
> > static inline int round_reg_i64(int input_reg)
> > {
> > #ifdef WHATEVER_CONDITION
> >     if (input_reg % 2) {
> >         reg++;
> >     }
> > #endif
> > 
> >     return reg;
> > }
> > 
> > [...]
> > 
> >   ir = round_reg_i64(ir);
> 
> I think he didn't like the mod check either but the suggestion
> <malc> [...] reg += reg & TCG_TARGET_CALL_ALIGN_ARGS [...]
> doesn't work well when TCG_TARGET_CALL_ALIGN_ARGS is undefined.
> And defining it with value 0 seems unsafe to me.
> 
> What about the following? (untested)

I'd much rather have the ifdefery scattered around the code than
having to remember what this function does, but that's just me,
not hard bent on it..

-- 
mailto:address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]