[Mesa-dev] Build mesa-dev on Windows with AVX instruction set problem

Fabrício Ceolin fabricio.ceolin at miningmath.com
Wed Oct 25 22:15:50 UTC 2017


Hi,

Thanks. I recompiled everything (on Windows) using this real machine:

#under msys2
$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Genuine Intel(R) CPU           U2300  @ 1.20GHz
stepping        : 10
cpu MHz         : 1197.000
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni dtes64
monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm xsave osxsave lahf_lm dtherm
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

but I got the same error:

00007FF85FBF874F 48 83 7A 18 10       cmp         qword ptr [rdx+18h],10h
00007FF85FBF8754 48 8B 6A 10          mov         rbp,qword ptr [rdx+10h]
00007FF85FBF8758 72 03                jb
std::basic_string<char,std::char_traits<char>,std::allocator<char>
>::basic_string<char,std::char_traits<char>,std::allocator<char> >+2Dh
(07FF85FBF875Dh)
00007FF85FBF875A 48 8B 32             mov         rsi,qword ptr [rdx]
00007FF85FBF875D 48 83 FD 10          cmp         rbp,10h
00007FF85FBF8761 73 27                jae
 std::basic_string<char,std::char_traits<char>,std::allocator<char>
>::basic_string<char,std::char_traits<char>,std::allocator<char> >+5Ah
(07FF85FBF878Ah)
*00007FF85FBF8763 C5 F8 10 06          vmovups     xmm0,xmmword ptr [rsi]  *
00007FF85FBF8767 C5 F8 11 01          vmovups     xmmword ptr [rcx],xmm0
00007FF85FBF876B 48 89 69 10          mov         qword ptr [rcx+10h],rbp

Are there any parameters that I can use for avoid to use AVX (or better)
instructions?

(I am using LLVM 5.0)

Thanks

[image: MiningMath Associates]
<http://www.miningmath.com/component/content/article/4.html?src=ass&mdm=email&cpn=FAC#Fabrício+Ceolin>
*Fabrício
Ceolin*
+55 (31) 98675-1359
MiningMath Associates <http://www.miningmath.com/?src=ass&mdm=email&cpn=FAC>
www.miningmath.com <http://www.miningmath.com/?src=ass&mdm=email&cpn=FAC>



2017-10-24 15:50 GMT-02:00 Roland Scheidegger <sroland at vmware.com>:

> Am 24.10.2017 um 18:26 schrieb Fabrício Ceolin:
> > Hi,
> >
> > I am trying to build mesa-dev on windows.
> >
> > I am learning how to do it, through the
> > project https://github.com/pal1000/mesa-dist-win/tree/master/buildscript
> > <https://github.com/pal1000/mesa-dist-win/tree/master/buildscript>
> >
> > I tried to use the binaries from pal1000, but I got an illegal
> > instruction problem in opengl32.dll when I tried to run my application
> > (VTK based).
> >
> > 00007FF96252B0CF  cmp         qword ptr [rdx+18h],10h
> > 00007FF96252B0D4  mov         rbp,qword ptr [rdx+10h]
> > 00007FF96252B0D8  jb
> > std::basic_string<char,std::char_traits<char>,std::allocator<char>
> >>::basic_string<char,std::char_traits<char>,std::allocator<char> >+2Dh
> > (07FF96252B0DDh)
> > 00007FF96252B0DA  mov         rsi,qword ptr [rdx]
> > 00007FF96252B0DD  cmp         rbp,10h
> > 00007FF96252B0E1  jae
> >  std::basic_string<char,std::char_traits<char>,std::allocator<char>
> >>::basic_string<char,std::char_traits<char>,std::allocator<char> >+5Ah
> > (07FF96252B10Ah)
> > *00007FF96252B0E3  vmovups     xmm0,xmmword ptr [rsi]  *
> > 00007FF96252B0E7  vmovups     xmmword ptr [rcx],xmm0
> > 00007FF96252B0EB  mov         qword ptr [rcx+10h],rbp
> >
> > I tried to build everything on a target machine, but the problem was not
> > solved.
> >
> > I saw here that movups is in avx instruction set here
> > http://www.felixcloutier.com/x86/MOVUPS.html
> > <http://www.felixcloutier.com/x86/MOVUPS.html>
> >
> > My target machine has the following cpuinfo (inside msys64):
> >
> > cat /proc/cpuinfo
> > processor       : 0
> > vendor_id       : GenuineIntel
> > cpu family      : 6
> > model           : 6
> > model name      : QEMU Virtual CPU version 2.0.0
> > stepping        : 3
> > cpu MHz         : 2993.000
> > cache size      : 4096 KB
> > fpu             : yes
> > fpu_exception   : yes
> > cpuid level     : 4
> > wp              : yes
> > flags           : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca
> > cmov pat pse36 clflush mmx fxsr sse sse2 pni vmx cx16 x2apic popcnt
> > hypervisor lahf_lm epb dtherm fsgsbase tsc_adjust bmi1 hle avx2
> clflushopt
> > clflush size    : 64
> > cache_alignment : 64
> > address sizes   : 40 bits physical, 48 bits virtual
> > power management:
> >
> > How can I compile opengl32.dll without use the avx instruction set?
> >
> > My compilation command was (from mesa-dist-win):
> >
> > python c:\Python27\Scripts\scons.py build=release platform=windows
> > machine=x86_64 swr=1 libgl-gdi osmesa graw-gdi
>
> Generally, generic x86_64 target should only use sse2.
> If you're running llvmpipe though, the code will use runtime detection
> of features for generated code. I have no idea if that code there
> causing the crash was runtime-compiled by llvm or not. If yes, it could
> mean there's still bugs with llvm and cpu detection features (detecting
> this is quite a mess due to the OS having to support it). Albeit your
> cpu features make no sense at all, you cannot have avx2 but not avx (and
> you don't have the newer sse flags neither, even for a virtual cpu that
> is pretty odd supporting avx2 but not these...).
> Interestingly, xsave isn't listed neither, which is necessary for avx to
> indicate the OS supports it, suggesting your OS does not. No idea why...
>
> Roland
>
>
>
> >
> > Thanks
> >
> >
> > MiningMath Associates
> > <http://www.miningmath.com/component/content/article/4.
> html?src=ass&mdm=email&cpn=FAC#Fabr%C3%ADcio+Ceolin>
> > *Fabrício Ceolin*
> > +55 (31) 98675-1359
> > MiningMath Associates <http://www.miningmath.com/?
> src=ass&mdm=email&cpn=FAC>
> > www.miningmath.com <http://www.miningmath.com/?src=ass&mdm=email&cpn=FAC
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171025/045876a9/attachment-0001.html>


More information about the mesa-dev mailing list