[Top][All Lists]
[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: |
Blue Swirl |
Subject: |
Re: [Qemu-devel] [PATCH 08/25] monitor: New GET_TLONG and GET_TPHYSADDR macros |
Date: |
Tue, 4 Aug 2009 20:27:43 +0300 |
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)))
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.
- [Qemu-devel] [PATCH v1 00/25] Monitor handlers new structure phase 1, Luiz Capitulino, 2009/08/03
- [Qemu-devel] [PATCH 01/25] Introduce QEMU dictionary data type, Luiz Capitulino, 2009/08/03
- [Qemu-devel] [PATCH 02/25] net: Fix do_set_link() return type, Luiz Capitulino, 2009/08/03
- [Qemu-devel] [PATCH 03/25] Add wrappers to functions used by the Monitor, Luiz Capitulino, 2009/08/03
- [Qemu-devel] [PATCH 04/25] monitor: Document missing supported argument types, Luiz Capitulino, 2009/08/03
- [Qemu-devel] [PATCH 05/25] monitor: New format for handlers argument types, Luiz Capitulino, 2009/08/03
- [Qemu-devel] [PATCH 06/25] monitor: Setup a dictionary with handler arguments, Luiz Capitulino, 2009/08/03
- [Qemu-devel] [PATCH 07/25] monitor: Export qdict.h header, Luiz Capitulino, 2009/08/03
- [Qemu-devel] [PATCH 08/25] monitor: New GET_TLONG and GET_TPHYSADDR macros, Luiz Capitulino, 2009/08/03
- Re: [Qemu-devel] [PATCH 08/25] monitor: New GET_TLONG and GET_TPHYSADDR macros,
Blue Swirl <=
- [Qemu-devel] [PATCH 09/25] monitor: Port handler_0 to use the dictionary, Luiz Capitulino, 2009/08/03
- [Qemu-devel] [PATCH 10/25] monitor: Port handler_1 to use the dictionary, Luiz Capitulino, 2009/08/03
- [Qemu-devel] [PATCH 11/25] monitor: Port handler_2 to use the dictionary, Luiz Capitulino, 2009/08/03
- [Qemu-devel] [PATCH 12/25] monitor: Port handler_3 to use the dictionary, Luiz Capitulino, 2009/08/03
- [Qemu-devel] [PATCH 13/25] monitor: Port handler_4 to use the dictionary, Luiz Capitulino, 2009/08/03
- [Qemu-devel] [PATCH 14/25] monitor: Port handler_5 to use the dictionary, Luiz Capitulino, 2009/08/03
- [Qemu-devel] [PATCH 15/25] monitor: Port handler_6 to use the dictionary, Luiz Capitulino, 2009/08/03
- [Qemu-devel] [PATCH 17/25] monitor: Drop handler_8 and handler_9 handling, Luiz Capitulino, 2009/08/03
- [Qemu-devel] [PATCH 16/25] monitor: Port handler_7 to use the dictionary, Luiz Capitulino, 2009/08/03