[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 02/40] Add helper macros for later patches.
From: |
Aurelien Jarno |
Subject: |
Re: [Qemu-devel] [PATCH 02/40] Add helper macros for later patches. |
Date: |
Sat, 3 Jan 2009 14:32:13 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Tue, Dec 30, 2008 at 07:09:44PM -0800, Nathan Froyd wrote:
> Remove N_ELEMS, VECTOR_FOR, and VECTOR_FOR_I macros. Retain the
> VECTOR_FOR_INORDER_I macros as the clearest way of expressing the intent
> of iterating over elements in their stored target-endian order.
>
> Signed-off-by: Nathan Froyd <address@hidden>
Thanks, applied.
> ---
> target-ppc/op_helper.c | 22 ++++++++++++++++++++++
> 1 files changed, 22 insertions(+), 0 deletions(-)
>
> diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c
> index 876b517..5d603ba 100644
> --- a/target-ppc/op_helper.c
> +++ b/target-ppc/op_helper.c
> @@ -1954,6 +1954,28 @@ target_ulong helper_dlmzb (target_ulong high,
> target_ulong low, uint32_t update_
> }
>
>
> /*****************************************************************************/
> +/* Altivec extension helpers */
> +#if defined(WORDS_BIGENDIAN)
> +#define HI_IDX 0
> +#define LO_IDX 1
> +#else
> +#define HI_IDX 1
> +#define LO_IDX 0
> +#endif
> +
> +#if defined(WORDS_BIGENDIAN)
> +#define VECTOR_FOR_INORDER_I(index, element) \
> + for (index = 0; index < ARRAY_SIZE(r->element); index++)
> +#else
> +#define VECTOR_FOR_INORDER_I(index, element) \
> + for (index = ARRAY_SIZE(r->element)-1; index >= 0; index--)
> +#endif
> +
> +#undef VECTOR_FOR_INORDER_I
> +#undef HI_IDX
> +#undef LO_IDX
> +
> +/*****************************************************************************/
> /* SPE extension helpers */
> /* Use a table to make this quicker */
> static uint8_t hbrev[16] = {
> --
> 1.6.0.5
>
>
>
>
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' address@hidden | address@hidden
`- people.debian.org/~aurel32 | www.aurel32.net
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH 02/40] Add helper macros for later patches.,
Aurelien Jarno <=