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

Re: [Xen-devel] [PATCH RFC v2 4/7] x86emul/test: remove unused macros



>>> On 09.12.16 at 13:23, <wei.liu2@xxxxxxxxxx> wrote:
> --- a/tools/tests/x86_emulator/test_x86_emulator.c
> +++ b/tools/tests/x86_emulator/test_x86_emulator.c
> @@ -23,15 +23,6 @@ static const struct {
>  #endif
>  };
>  
> -/* EFLAGS bit definitions. */
> -#define EFLG_OF (1<<11)
> -#define EFLG_DF (1<<10)
> -#define EFLG_SF (1<<7)
> -#define EFLG_ZF (1<<6)
> -#define EFLG_AF (1<<4)
> -#define EFLG_PF (1<<2)
> -#define EFLG_CF (1<<0)

Please don't - we rather should start making use of them.

> @@ -140,18 +124,6 @@ static inline uint64_t xgetbv(uint32_t xcr)
>      (ecx & (1U << 28)) != 0; \
>  })
>  
> -#define cpu_has_avx2 ({ \
> -    unsigned int eax = 1, ebx, ecx = 0; \
> -    emul_test_cpuid(&eax, &ebx, &ecx, &eax, NULL); \
> -    if ( !(ecx & (1U << 27)) || ((xgetbv(0) & 6) != 6) ) \
> -        ebx = 0; \
> -    else { \
> -        eax = 7, ecx = 0; \
> -        emul_test_cpuid(&eax, &ebx, &ecx, &eax, NULL); \
> -    } \
> -    (ebx & (1U << 5)) != 0; \
> -})

Please don't - I already have a patch queued needing this.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.