qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2] target/i386: clean up comments over 80 chars per line


From: Eduardo Habkost
Subject: Re: [PATCH v2] target/i386: clean up comments over 80 chars per line
Date: Fri, 20 Sep 2019 15:33:39 -0300

On Fri, Sep 20, 2019 at 01:31:36PM +0800, Tao Xu wrote:
> Drop the duplicate definition of CPUID_7_0_ECX_VBMI. And add some
> comments, clean up comments over 80 chars per line.
> 
> There is an extra line in comment of CPUID_8000_0008_EBX_WBNOINVD,
> remove the extra enter and spaces.
> 
> Signed-off-by: Tao Xu <address@hidden>
> ---
[...]
> -#define CPUID_7_0_ECX_AVX512BMI (1U << 1)
> -#define CPUID_7_0_ECX_VBMI     (1U << 1)  /* AVX-512 Vector Byte 
> Manipulation Instrs */
[...]
> +/* AVX-512 Vector Byte Manipulation Instruction */
> +#define CPUID_7_0_ECX_VBMI              (1U << 1)

I'd prefer to have the macro name matching the feature name that
is already in feature_word_info[[FEAT_7_0_ECX].feat_names
("avx512vbmi").  It's also more similar to the name used in Intel
SDM (AVX512_VBMI).


[...]
> diff --git a/target/i386/hvf/x86_cpuid.c b/target/i386/hvf/x86_cpuid.c
> index 4d957fe896..5041f48b8a 100644
> --- a/target/i386/hvf/x86_cpuid.c
> +++ b/target/i386/hvf/x86_cpuid.c
> @@ -89,7 +89,7 @@ uint32_t hvf_get_supported_cpuid(uint32_t func, uint32_t 
> idx,
>                  ebx &= ~CPUID_7_0_EBX_INVPCID;
>              }
>  
> -            ecx &= CPUID_7_0_ECX_AVX512BMI | CPUID_7_0_ECX_AVX512_VPOPCNTDQ;
> +            ecx &= CPUID_7_0_ECX_VBMI | CPUID_7_0_ECX_AVX512_VPOPCNTDQ;
>              edx &= CPUID_7_0_EDX_AVX512_4VNNIW | CPUID_7_0_EDX_AVX512_4FMAPS;
>          } else {
>              ebx = 0;
> -- 
> 2.20.1
> 

-- 
Eduardo



reply via email to

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