qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 08/25] monitor: New GET_TLONG and GET_TPHYSADDR


From: Luiz Capitulino
Subject: Re: [Qemu-devel] [PATCH 08/25] monitor: New GET_TLONG and GET_TPHYSADDR macros
Date: Tue, 4 Aug 2009 16:42:44 -0300

On Tue, 4 Aug 2009 20:27:43 +0300
Blue Swirl <address@hidden> wrote:

> On Mon, Aug 3, 2009 at 7:57 PM, Luiz Capitulino<address@hidden> wrote:
> > When we start porting handlers to use the Monitor's dictionary
> > to pass argments, we will turn function parameters into automatic
> > variables.
> >
> > This will make the build brake when the 32 bits versions of
> > GET_TLONG and GET_TPHYSADDR are used, because the 'h' argument
> > will not be used.
> >
> > The best solution I could think for this problem was changing
> > both macros to reassign the 'h' parameter when compiled for
> > 32 bits.
> >
> > I'm open for better solutions, though.
> 
> How about:
> 
> #define GET_TLONG(h, l) ((target_ulong)(((uint64_t)(h) << 32) | (l)))
> #define GET_TPHYSADDR(h, l) ((target_phys_addr_t)(((uint64_t)(h) << 32) | 
> (l)))

 Yes, it will work I think.

 Would you mind waiting for it to get merged to be changed? I
wouldn't like to patchbomb the list because of this change.

> This may introduce new Sparse warnings about truncating cast, but
> there are already a lot of those.
> 
> I'd use GET_TADDR instead of GET_TPHYSADDR, TADDR is already used by qdev 
> code.

 Ok, will have a look, but this kind of change is not part of this
series.




reply via email to

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