Re: FreeBSD_HEAD_amd64_gcc - Build #1340 - Still Failing

2016-07-05 Thread Ngie Cooper (yaneurabeya)

> On Jul 5, 2016, at 12:29, Ngie Cooper (yaneurabeya)  
> wrote:

…

> Actually, there’s a better #define:
> 
> /usr/include/x86/specialreg.h:#define   CPUID2_SSE410x0008

Submitted a potential fix via: https://reviews.freebsd.org/D7119 .
Thanks,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: FreeBSD_HEAD_amd64_gcc - Build #1340 - Still Failing

2016-07-05 Thread Ngie Cooper (yaneurabeya)

> On Jul 5, 2016, at 11:54, Ngie Cooper (yaneurabeya)  
> wrote:
> 
>> 
>> On Jul 5, 2016, at 11:52, Dimitry Andric  wrote:
>> 
>> On 05 Jul 2016, at 18:03, jenkins-ad...@freebsd.org wrote:
>>> 
>>> FreeBSD_HEAD_amd64_gcc - Build #1340 - Still Failing:
>>> 
>>> Build information: 
>>> https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_amd64_gcc/1340/
>>> Full change log: 
>>> https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_amd64_gcc/1340/changes
>>> Full build log: 
>>> https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_amd64_gcc/1340/console
>> ...
>>> /builds/FreeBSD_HEAD_amd64_gcc/usr.sbin/bhyve/rfb.c: In function 
>>> 'sse42_supported':
>>> /builds/FreeBSD_HEAD_amd64_gcc/usr.sbin/bhyve/rfb.c:885:17: error: 
>>> 'bit_SSE42' undeclared (first use in this function)
>>> return ((ecx & bit_SSE42) != 0);
>>>   ^
>> 
>> So, this is because clang's and gcc's versions of cpuid.h use slightly 
>> different naming for these bits:
>> 
>> clang's cpuid.h:
>> 
>> #define bit_SSE41   0x0008
>> #define bit_SSE42   0x0010
>> 
>> gcc's cpuid.h:
>> 
>> #define bit_SSE4_1  (1 << 19)
>> #define bit_SSE4_2  (1 << 20)
>> 
>> Unfortunately there are more bit defines that differ.  No standardization on 
>> this point, it seems. :-/
>> 
>> For this specific compile error, we could put in a little crutch like:
>> 
>> #if defined(bit_SSE4_2) && !defined(bit_SSE42)
>> #define bit_SSE42 bit_SSE4_2
>> #endif
>> 
>> Thoughts?
> 
>   Seems ok to me. I was going to submit a patch to fix the other issues 
> with bhyve (because I am getting annoyed by the build failure emails).

Actually, there’s a better #define:

/usr/include/x86/specialreg.h:#define   CPUID2_SSE410x0008

Thanks,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: FreeBSD_HEAD_amd64_gcc - Build #1340 - Still Failing

2016-07-05 Thread Ngie Cooper (yaneurabeya)

> On Jul 5, 2016, at 11:52, Dimitry Andric  wrote:
> 
> On 05 Jul 2016, at 18:03, jenkins-ad...@freebsd.org wrote:
>> 
>> FreeBSD_HEAD_amd64_gcc - Build #1340 - Still Failing:
>> 
>> Build information: 
>> https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_amd64_gcc/1340/
>> Full change log: 
>> https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_amd64_gcc/1340/changes
>> Full build log: 
>> https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_amd64_gcc/1340/console
> ...
>> /builds/FreeBSD_HEAD_amd64_gcc/usr.sbin/bhyve/rfb.c: In function 
>> 'sse42_supported':
>> /builds/FreeBSD_HEAD_amd64_gcc/usr.sbin/bhyve/rfb.c:885:17: error: 
>> 'bit_SSE42' undeclared (first use in this function)
>> return ((ecx & bit_SSE42) != 0);
>>^
> 
> So, this is because clang's and gcc's versions of cpuid.h use slightly 
> different naming for these bits:
> 
> clang's cpuid.h:
> 
> #define bit_SSE41   0x0008
> #define bit_SSE42   0x0010
> 
> gcc's cpuid.h:
> 
> #define bit_SSE4_1  (1 << 19)
> #define bit_SSE4_2  (1 << 20)
> 
> Unfortunately there are more bit defines that differ.  No standardization on 
> this point, it seems. :-/
> 
> For this specific compile error, we could put in a little crutch like:
> 
> #if defined(bit_SSE4_2) && !defined(bit_SSE42)
> #define bit_SSE42 bit_SSE4_2
> #endif
> 
> Thoughts?

Seems ok to me. I was going to submit a patch to fix the other issues 
with bhyve (because I am getting annoyed by the build failure emails).
Thanks,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: FreeBSD_HEAD_amd64_gcc - Build #1340 - Still Failing

2016-07-05 Thread Dimitry Andric
On 05 Jul 2016, at 18:03, jenkins-ad...@freebsd.org wrote:
> 
> FreeBSD_HEAD_amd64_gcc - Build #1340 - Still Failing:
> 
> Build information: 
> https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_amd64_gcc/1340/
> Full change log: 
> https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_amd64_gcc/1340/changes
> Full build log: 
> https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_amd64_gcc/1340/console
...
> /builds/FreeBSD_HEAD_amd64_gcc/usr.sbin/bhyve/rfb.c: In function 
> 'sse42_supported':
> /builds/FreeBSD_HEAD_amd64_gcc/usr.sbin/bhyve/rfb.c:885:17: error: 
> 'bit_SSE42' undeclared (first use in this function)
>  return ((ecx & bit_SSE42) != 0);
> ^

So, this is because clang's and gcc's versions of cpuid.h use slightly 
different naming for these bits:

clang's cpuid.h:

#define bit_SSE41   0x0008
#define bit_SSE42   0x0010

gcc's cpuid.h:

#define bit_SSE4_1  (1 << 19)
#define bit_SSE4_2  (1 << 20)

Unfortunately there are more bit defines that differ.  No standardization on 
this point, it seems. :-/

For this specific compile error, we could put in a little crutch like:

#if defined(bit_SSE4_2) && !defined(bit_SSE42)
#define bit_SSE42 bit_SSE4_2
#endif

Thoughts?

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail