diff options
Diffstat (limited to 'volk/gen/archs.xml')
-rw-r--r-- | volk/gen/archs.xml | 230 |
1 files changed, 129 insertions, 101 deletions
diff --git a/volk/gen/archs.xml b/volk/gen/archs.xml index 59cc81cc5..2c9ab41a5 100644 --- a/volk/gen/archs.xml +++ b/volk/gen/archs.xml @@ -1,155 +1,183 @@ <!-- archs appear in order of significance for blind, de-facto version ordering --> <grammar> -<arch name="generic" type="all"> <!-- name and type are both required--> - <flag>none</flag> <!-- flag is the only required field--> +<arch name="generic"> <!-- name is required--> </arch> -<arch name="altivec" type="powerpc"> - <flag>maltivec</flag> +<arch name="altivec"> + <flag compiler="gnu">-maltivec</flag> <alignment>16</alignment> + <check name="has_ppc"></check> </arch> -<arch name="neon" type="arm"> - <flag>mfpu=neon,mfloat-abi=softfp,funsafe-math-optimizations</flag> +<arch name="neon"> + <flag compiler="gnu">-mfpu=neon</flag> + <flag compiler="gnu">-mfloat-abi=softfp</flag> + <flag compiler="gnu">-funsafe-math-optimizations</flag> <alignment>16</alignment> + <check name="has_neon"></check> </arch> -<arch name="32" type="x86" no_test="true" > - <flag>m32</flag> - <overrule>MD_SUBCPU</overrule> - <overrule_val>x86_64</overrule_val> +<arch name="32"> + <flag compiler="gnu">-m32</flag> </arch> -<arch name="64" type="x86"> - <op>0x80000001</op> - <reg>d</reg> - <shift>29</shift> - <flag>m64</flag> - <val>1</val> - <overrule>MD_SUBCPU</overrule> - <overrule_val>x86</overrule_val> +<arch name="64"> + <check name="check_extended_cpuid"> + <param>0x80000001</param> + </check> + <check name="cpuid_x86_bit"> <!-- checks to see if a bit is set --> + <param>3</param> <!-- eax, ebx, ecx, [edx] --> + <param>0x80000001</param> <!-- cpuid operation --> + <param>29</param> <!-- bit shift --> + </check> + <flag compiler="gnu">-m64</flag> </arch> -<arch name="3dnow" type="x86"> - <op>0x80000001</op> - <reg>d</reg> - <shift>31</shift> - <flag>m3dnow</flag> - <val>1</val> +<arch name="3dnow"> + <check name="cpuid_x86_bit"> + <param>3</param> + <param>0x80000001</param> + <param>31</param> + </check> + <flag compiler="gnu">-m3dnow</flag> <alignment>8</alignment> </arch> -<arch name="abm" type="x86"> - <val>1</val> - <op>0x80000001</op> - <reg>d</reg> - <shift>5</shift> - <flag>msse4.2</flag> +<arch name="abm"> + <check name="cpuid_x86_bit"> + <param>3</param> + <param>0x80000001</param> + <param>5</param> + </check> + <flag compiler="gnu">-msse4.2</flag> <alignment>16</alignment> </arch> -<arch name="popcount" type="x86"> - <val>1</val> - <op>1</op> - <reg>c</reg> - <shift>23</shift> - <flag>mpopcnt</flag> -</arch> - -<arch name="mmx" type="x86"> - <val>1</val> - <op>1</op> - <reg>d</reg> - <shift>23</shift> - <flag>mmmx</flag> +<arch name="popcount"> + <check name="cpuid_x86_bit"> + <param>2</param> + <param>0x00000001</param> + <param>23</param> + </check> + <flag compiler="gnu">-mpopcnt</flag> + <flag compiler="msvc">/arch:AVX</flag> +</arch> + +<arch name="mmx"> + <check name="cpuid_x86_bit"> + <param>3</param> + <param>0x00000001</param> + <param>23</param> + </check> + <flag compiler="gnu">-mmmx</flag> + <flag compiler="msvc">/arch:SSE</flag> <alignment>8</alignment> </arch> - -<arch name="sse" type="x86"> - <val>1</val> - <op>1</op> - <reg>d</reg> - <shift>25</shift> - <flag>msse</flag> +<arch name="sse"> + <check name="cpuid_x86_bit"> + <param>3</param> + <param>0x00000001</param> + <param>25</param> + </check> + <flag compiler="gnu">-msse</flag> + <flag compiler="msvc">/arch:SSE</flag> <environment>_MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);</environment> <include>xmmintrin.h</include> <alignment>16</alignment> </arch> - -<arch name="sse2" type="x86"> - <val>1</val> - <op>1</op> - <reg>d</reg> - <shift>26</shift> - <flag>msse2</flag> +<arch name="sse2"> + <check name="cpuid_x86_bit"> + <param>3</param> + <param>0x00000001</param> + <param>26</param> + </check> + <flag compiler="gnu">-msse2</flag> + <flag compiler="msvc">/arch:SSE2</flag> <alignment>16</alignment> </arch> -<arch name="orc" type="all"> - <flag>lorc-0.4</flag> - <overrule>LV_HAVE_ORC</overrule> - <overrule_val>no</overrule_val> +<arch name="orc"> </arch> -<arch name="sse3" type="x86"> - <val>1</val> - <op>1</op> - <reg>c</reg> - <shift>0</shift> - <flag>msse3</flag> +<!-- it's here for overrule stuff. --> +<arch name="norc"> +</arch> + +<arch name="sse3"> + <check name="cpuid_x86_bit"> + <param>2</param> + <param>0x00000001</param> + <param>0</param> + </check> + <flag compiler="gnu">-msse3</flag> + <flag compiler="msvc">/arch:AVX</flag> <environment>_MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);</environment> <include>pmmintrin.h</include> <alignment>16</alignment> </arch> -<arch name="ssse3" type="x86"> - <val>1</val> - <op>1</op> - <reg>c</reg> - <shift>9</shift> - <flag>mssse3</flag> +<arch name="ssse3"> + <check name="cpuid_x86_bit"> + <param>2</param> + <param>0x00000001</param> + <param>9</param> + </check> + <flag compiler="gnu">-mssse3</flag> + <flag compiler="msvc">/arch:AVX</flag> <alignment>16</alignment> </arch> -<arch name="sse4_a" type="x86"> - <val>1</val> - <op>0x80000001</op> - <reg>c</reg> - <shift>6</shift> - <flag>msse4a</flag> +<arch name="sse4_a"> + <check name="cpuid_x86_bit"> + <param>2</param> + <param>0x80000001</param> + <param>6</param> + </check> + <flag compiler="gnu">-msse4a</flag> <alignment>16</alignment> </arch> - -<arch name="sse4_1" type="x86"> - <val>1</val> - <op>1</op> - <reg>c</reg> - <shift>19</shift> - <flag>msse4.1</flag> +<arch name="sse4_1"> + <check name="cpuid_x86_bit"> + <param>2</param> + <param>0x00000001</param> + <param>19</param> + </check> + <flag compiler="gnu">-msse4.1</flag> + <flag compiler="msvc">/arch:AVX</flag> <alignment>16</alignment> </arch> -<arch name="sse4_2" type="x86"> - <val>1</val> - <op>1</op> - <reg>c</reg> - <shift>20</shift> - <flag>msse4.2</flag> +<arch name="sse4_2"> + <check name="cpuid_x86_bit"> + <param>2</param> + <param>0x00000001</param> + <param>20</param> + </check> + <flag compiler="gnu">-msse4.2</flag> + <flag compiler="msvc">/arch:AVX</flag> <alignment>16</alignment> </arch> -<arch name="avx" type="x86"> - <val>1</val> - <op>1</op> - <reg>c</reg> - <shift>28</shift> - <flag>mavx</flag> - <check>xgetbv</check> - <checkval>7</checkval> +<arch name="avx"> + <check name="cpuid_x86_bit"> + <param>2</param> + <param>0x00000001</param> + <param>28</param> + </check> + <!-- check to make sure that xgetbv is enabled in OS --> + <check name="cpuid_x86_bit"> + <param>2</param> + <param>0x00000001</param> + <param>27</param> + </check> + <!-- check to see that the OS has enabled AVX --> + <check name="get_avx_enabled"></check> + <flag compiler="gnu">-mavx</flag> + <flag compiler="msvc">/arch:AVX</flag> <alignment>32</alignment> </arch> |