You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

getarch.c 48 kB

6 years ago
14 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
10 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
6 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
6 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
6 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
6 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
6 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
6 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
6 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
6 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
6 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
6 years ago
Simplifying ARMv8 build parameters ARMv8 builds were a bit mixed up, with ThunderX2 code in ARMv8 mode (which is not right because TX2 is ARMv8.1) as well as requiring a few redundancies in the defines, making it harder to maintain and understand what core has what. A few other minor issues were also fixed. Tests were made on the following cores: A53, A57, A72, Falkor, ThunderX, ThunderX2, and XGene. Tests were: OpenBLAS/test, OpenBLAS/benchmark, BLAS-Tester. A summary: * Removed TX2 code from ARMv8 build, to make sure it is compatible with all ARMv8 cores, not just v8.1. Also, the TX2 code has actually harmed performance on big cores. * Commoned up ARMv8 architectures' defines in params.h, to make sure that all will benefit from ARMv8 settings, in addition to their own. * Adding a few more cores, using ARMv8's include strategy, to benefit from compiler optimisations using mtune. Also updated cache information from the manuals, making sure we set good conservative values by default. Removed Vulcan, as it's an alias to TX2. * Auto-detecting most of those cores, but also updating the forced compilation in getarch.c, to make sure the parameters are the same whether compiled natively or forced arch. Benefits: * ARMv8 build is now guaranteed to work on all ARMv8 cores * Improved performance for ARMv8 builds on some cores (A72, Falkor, ThunderX1 and 2: up to 11%) over current develop * Improved performance for *all* cores comparing to develop branch before TX2's patch (9% ~ 36%) * ThunderX1 builds are 14% faster than ARMv8 on TX1, 9% faster than current develop's branch and 8% faster than deveop before tx2 patches Issues: * Regression from current develop branch for A53 (-12%) and A57 (-3%) with ARMv8 builds, but still faster than before TX2's commit (+15% and +24% respectively). This can be improved with a simplification of TX2's code, to be done in future patches. At least the code is guaranteed to be ARMv8.0 now. Comments: * CortexA57 builds are unchanged on A57 hardware from develop's branch, which makes sense, as it's untouched. * CortexA72 builds improve over A57 on A72 hardware, even if they're using the same includes due to new compiler tunning in the makefile.
6 years ago
6 years ago
6 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510
  1. /*****************************************************************************
  2. Copyright (c) 2011-2014, The OpenBLAS Project
  3. All rights reserved.
  4. Redistribution and use in source and binary forms, with or without
  5. modification, are permitted provided that the following conditions are
  6. met:
  7. 1. Redistributions of source code must retain the above copyright
  8. notice, this list of conditions and the following disclaimer.
  9. 2. Redistributions in binary form must reproduce the above copyright
  10. notice, this list of conditions and the following disclaimer in
  11. the documentation and/or other materials provided with the
  12. distribution.
  13. 3. Neither the name of the OpenBLAS project nor the names of
  14. its contributors may be used to endorse or promote products
  15. derived from this software without specific prior written
  16. permission.
  17. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  18. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  20. ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  21. LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  23. SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  24. CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  25. OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
  26. USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  27. **********************************************************************************/
  28. /*********************************************************************/
  29. /* Copyright 2009, 2010 The University of Texas at Austin. */
  30. /* All rights reserved. */
  31. /* */
  32. /* Redistribution and use in source and binary forms, with or */
  33. /* without modification, are permitted provided that the following */
  34. /* conditions are met: */
  35. /* */
  36. /* 1. Redistributions of source code must retain the above */
  37. /* copyright notice, this list of conditions and the following */
  38. /* disclaimer. */
  39. /* */
  40. /* 2. Redistributions in binary form must reproduce the above */
  41. /* copyright notice, this list of conditions and the following */
  42. /* disclaimer in the documentation and/or other materials */
  43. /* provided with the distribution. */
  44. /* */
  45. /* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */
  46. /* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */
  47. /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
  48. /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
  49. /* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */
  50. /* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */
  51. /* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */
  52. /* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */
  53. /* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */
  54. /* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
  55. /* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
  56. /* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */
  57. /* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */
  58. /* POSSIBILITY OF SUCH DAMAGE. */
  59. /* */
  60. /* The views and conclusions contained in the software and */
  61. /* documentation are those of the authors and should not be */
  62. /* interpreted as representing official policies, either expressed */
  63. /* or implied, of The University of Texas at Austin. */
  64. /*********************************************************************/
  65. #if defined(__WIN32__) || defined(__WIN64__) || defined(__CYGWIN32__) || defined(__CYGWIN64__) || defined(_WIN32) || defined(_WIN64)
  66. #define OS_WINDOWS
  67. #endif
  68. #if defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_X64)
  69. #define INTEL_AMD
  70. #endif
  71. #include <stdio.h>
  72. #include <string.h>
  73. #ifdef OS_WINDOWS
  74. #include <windows.h>
  75. #endif
  76. #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__APPLE__)
  77. #include <sys/types.h>
  78. #include <sys/sysctl.h>
  79. #endif
  80. #if defined(linux) || defined(__sun__)
  81. #include <sys/sysinfo.h>
  82. #include <unistd.h>
  83. #endif
  84. #if defined(AIX)
  85. #include <sys/sysinfo.h>
  86. #endif
  87. #if defined(__x86_64__) || defined(_M_X64)
  88. #if (( defined(__GNUC__) && __GNUC__ > 6 && defined(__AVX2__)) || (defined(__clang__) && __clang_major__ >= 6))
  89. #else
  90. #define NO_AVX512
  91. #endif
  92. #endif
  93. /* #define FORCE_P2 */
  94. /* #define FORCE_KATMAI */
  95. /* #define FORCE_COPPERMINE */
  96. /* #define FORCE_NORTHWOOD */
  97. /* #define FORCE_PRESCOTT */
  98. /* #define FORCE_BANIAS */
  99. /* #define FORCE_YONAH */
  100. /* #define FORCE_CORE2 */
  101. /* #define FORCE_PENRYN */
  102. /* #define FORCE_DUNNINGTON */
  103. /* #define FORCE_NEHALEM */
  104. /* #define FORCE_SANDYBRIDGE */
  105. /* #define FORCE_ATOM */
  106. /* #define FORCE_ATHLON */
  107. /* #define FORCE_OPTERON */
  108. /* #define FORCE_OPTERON_SSE3 */
  109. /* #define FORCE_BARCELONA */
  110. /* #define FORCE_SHANGHAI */
  111. /* #define FORCE_ISTANBUL */
  112. /* #define FORCE_BOBCAT */
  113. /* #define FORCE_BULLDOZER */
  114. /* #define FORCE_PILEDRIVER */
  115. /* #define FORCE_SSE_GENERIC */
  116. /* #define FORCE_VIAC3 */
  117. /* #define FORCE_NANO */
  118. /* #define FORCE_POWER3 */
  119. /* #define FORCE_POWER4 */
  120. /* #define FORCE_POWER5 */
  121. /* #define FORCE_POWER6 */
  122. /* #define FORCE_POWER7 */
  123. /* #define FORCE_POWER8 */
  124. /* #define FORCE_PPCG4 */
  125. /* #define FORCE_PPC970 */
  126. /* #define FORCE_PPC970MP */
  127. /* #define FORCE_PPC440 */
  128. /* #define FORCE_PPC440FP2 */
  129. /* #define FORCE_CELL */
  130. /* #define FORCE_SICORTEX */
  131. /* #define FORCE_LOONGSON3A */
  132. /* #define FORCE_LOONGSON3B */
  133. /* #define FORCE_I6400 */
  134. /* #define FORCE_P6600 */
  135. /* #define FORCE_P5600 */
  136. /* #define FORCE_I6500 */
  137. /* #define FORCE_ITANIUM2 */
  138. /* #define FORCE_SPARC */
  139. /* #define FORCE_SPARCV7 */
  140. /* #define FORCE_ZARCH_GENERIC */
  141. /* #define FORCE_Z13 */
  142. /* #define FORCE_GENERIC */
  143. #ifdef FORCE_P2
  144. #define FORCE
  145. #define FORCE_INTEL
  146. #define ARCHITECTURE "X86"
  147. #define SUBARCHITECTURE "PENTIUM2"
  148. #define ARCHCONFIG "-DPENTIUM2 " \
  149. "-DL1_DATA_SIZE=16384 -DL1_DATA_LINESIZE=32 " \
  150. "-DL2_SIZE=512488 -DL2_LINESIZE=32 " \
  151. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  152. "-DHAVE_CMOV -DHAVE_MMX"
  153. #define LIBNAME "p2"
  154. #define CORENAME "P5"
  155. #endif
  156. #ifdef FORCE_KATMAI
  157. #define FORCE
  158. #define FORCE_INTEL
  159. #define ARCHITECTURE "X86"
  160. #define SUBARCHITECTURE "PENTIUM3"
  161. #define ARCHCONFIG "-DPENTIUM3 " \
  162. "-DL1_DATA_SIZE=16384 -DL1_DATA_LINESIZE=32 " \
  163. "-DL2_SIZE=524288 -DL2_LINESIZE=32 " \
  164. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  165. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE "
  166. #define LIBNAME "katmai"
  167. #define CORENAME "KATMAI"
  168. #endif
  169. #ifdef FORCE_COPPERMINE
  170. #define FORCE
  171. #define FORCE_INTEL
  172. #define ARCHITECTURE "X86"
  173. #define SUBARCHITECTURE "PENTIUM3"
  174. #define ARCHCONFIG "-DPENTIUM3 " \
  175. "-DL1_DATA_SIZE=16384 -DL1_DATA_LINESIZE=32 " \
  176. "-DL2_SIZE=262144 -DL2_LINESIZE=32 " \
  177. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  178. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE "
  179. #define LIBNAME "coppermine"
  180. #define CORENAME "COPPERMINE"
  181. #endif
  182. #ifdef FORCE_NORTHWOOD
  183. #define FORCE
  184. #define FORCE_INTEL
  185. #define ARCHITECTURE "X86"
  186. #define SUBARCHITECTURE "PENTIUM4"
  187. #define ARCHCONFIG "-DPENTIUM4 " \
  188. "-DL1_DATA_SIZE=8192 -DL1_DATA_LINESIZE=64 " \
  189. "-DL2_SIZE=524288 -DL2_LINESIZE=64 " \
  190. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 " \
  191. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 "
  192. #define LIBNAME "northwood"
  193. #define CORENAME "NORTHWOOD"
  194. #endif
  195. #ifdef FORCE_PRESCOTT
  196. #define FORCE
  197. #define FORCE_INTEL
  198. #define ARCHITECTURE "X86"
  199. #define SUBARCHITECTURE "PENTIUM4"
  200. #define ARCHCONFIG "-DPENTIUM4 " \
  201. "-DL1_DATA_SIZE=16384 -DL1_DATA_LINESIZE=64 " \
  202. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 " \
  203. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 " \
  204. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3"
  205. #define LIBNAME "prescott"
  206. #define CORENAME "PRESCOTT"
  207. #endif
  208. #ifdef FORCE_BANIAS
  209. #define FORCE
  210. #define FORCE_INTEL
  211. #define ARCHITECTURE "X86"
  212. #define SUBARCHITECTURE "BANIAS"
  213. #define ARCHCONFIG "-DPENTIUMM " \
  214. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  215. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 " \
  216. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  217. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 "
  218. #define LIBNAME "banias"
  219. #define CORENAME "BANIAS"
  220. #endif
  221. #ifdef FORCE_YONAH
  222. #define FORCE
  223. #define FORCE_INTEL
  224. #define ARCHITECTURE "X86"
  225. #define SUBARCHITECTURE "YONAH"
  226. #define ARCHCONFIG "-DPENTIUMM " \
  227. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  228. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 " \
  229. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  230. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 "
  231. #define LIBNAME "yonah"
  232. #define CORENAME "YONAH"
  233. #endif
  234. #ifdef FORCE_CORE2
  235. #define FORCE
  236. #define FORCE_INTEL
  237. #define ARCHITECTURE "X86"
  238. #define SUBARCHITECTURE "CONRORE"
  239. #define ARCHCONFIG "-DCORE2 " \
  240. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  241. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 " \
  242. "-DDTB_DEFAULT_ENTRIES=256 -DDTB_SIZE=4096 " \
  243. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3"
  244. #define LIBNAME "core2"
  245. #define CORENAME "CORE2"
  246. #endif
  247. #ifdef FORCE_PENRYN
  248. #define FORCE
  249. #define FORCE_INTEL
  250. #define ARCHITECTURE "X86"
  251. #define SUBARCHITECTURE "PENRYN"
  252. #define ARCHCONFIG "-DPENRYN " \
  253. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  254. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 " \
  255. "-DDTB_DEFAULT_ENTRIES=256 -DDTB_SIZE=4096 " \
  256. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1"
  257. #define LIBNAME "penryn"
  258. #define CORENAME "PENRYN"
  259. #endif
  260. #ifdef FORCE_DUNNINGTON
  261. #define FORCE
  262. #define FORCE_INTEL
  263. #define ARCHITECTURE "X86"
  264. #define SUBARCHITECTURE "DUNNINGTON"
  265. #define ARCHCONFIG "-DDUNNINGTON " \
  266. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  267. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 " \
  268. "-DL3_SIZE=16777216 -DL3_LINESIZE=64 " \
  269. "-DDTB_DEFAULT_ENTRIES=256 -DDTB_SIZE=4096 " \
  270. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1"
  271. #define LIBNAME "dunnington"
  272. #define CORENAME "DUNNINGTON"
  273. #endif
  274. #ifdef FORCE_NEHALEM
  275. #define FORCE
  276. #define FORCE_INTEL
  277. #define ARCHITECTURE "X86"
  278. #define SUBARCHITECTURE "NEHALEM"
  279. #define ARCHCONFIG "-DNEHALEM " \
  280. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  281. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  282. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  283. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2"
  284. #define LIBNAME "nehalem"
  285. #define CORENAME "NEHALEM"
  286. #endif
  287. #ifdef FORCE_SANDYBRIDGE
  288. #define FORCE
  289. #define FORCE_INTEL
  290. #define ARCHITECTURE "X86"
  291. #define SUBARCHITECTURE "SANDYBRIDGE"
  292. #define ARCHCONFIG "-DSANDYBRIDGE " \
  293. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  294. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  295. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  296. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 -DHAVE_AVX"
  297. #define LIBNAME "sandybridge"
  298. #define CORENAME "SANDYBRIDGE"
  299. #endif
  300. #ifdef FORCE_HASWELL
  301. #define FORCE
  302. #define FORCE_INTEL
  303. #define ARCHITECTURE "X86"
  304. #define SUBARCHITECTURE "HASWELL"
  305. #define ARCHCONFIG "-DHASWELL " \
  306. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  307. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  308. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  309. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 -DHAVE_AVX " \
  310. "-DFMA3"
  311. #define LIBNAME "haswell"
  312. #define CORENAME "HASWELL"
  313. #endif
  314. #ifdef FORCE_SKYLAKEX
  315. #ifdef NO_AVX512
  316. #define FORCE
  317. #define FORCE_INTEL
  318. #define ARCHITECTURE "X86"
  319. #define SUBARCHITECTURE "HASWELL"
  320. #define ARCHCONFIG "-DHASWELL " \
  321. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  322. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  323. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  324. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 -DHAVE_AVX " \
  325. "-DFMA3"
  326. #define LIBNAME "haswell"
  327. #define CORENAME "HASWELL"
  328. #else
  329. #define FORCE
  330. #define FORCE_INTEL
  331. #define ARCHITECTURE "X86"
  332. #define SUBARCHITECTURE "SKYLAKEX"
  333. #define ARCHCONFIG "-DSKYLAKEX " \
  334. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  335. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  336. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  337. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 -DHAVE_AVX " \
  338. "-DFMA3 -DHAVE_AVX512VL -march=skylake-avx512"
  339. #define LIBNAME "skylakex"
  340. #define CORENAME "SKYLAKEX"
  341. #endif
  342. #endif
  343. #ifdef FORCE_COOPERLAKE
  344. #ifdef NO_AVX512
  345. #define FORCE
  346. #define FORCE_INTEL
  347. #define ARCHITECTURE "X86"
  348. #define SUBARCHITECTURE "HASWELL"
  349. #define ARCHCONFIG "-DHASWELL " \
  350. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  351. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  352. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  353. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 -DHAVE_AVX " \
  354. "-DFMA3"
  355. #define LIBNAME "haswell"
  356. #define CORENAME "HASWELL"
  357. #else
  358. #define FORCE
  359. #define FORCE_INTEL
  360. #define ARCHITECTURE "X86"
  361. #define SUBARCHITECTURE "COOPERLAKE"
  362. #define ARCHCONFIG "-DCOOPERLAKE " \
  363. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  364. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  365. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  366. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 -DHAVE_AVX " \
  367. "-DFMA3 -DHAVE_AVX512VL -DHAVE_AVX512BF16 -march=cooperlake"
  368. #define LIBNAME "cooperlake"
  369. #define CORENAME "COOPERLAKE"
  370. #endif
  371. #endif
  372. #ifdef FORCE_ATOM
  373. #define FORCE
  374. #define FORCE_INTEL
  375. #define ARCHITECTURE "X86"
  376. #define SUBARCHITECTURE "ATOM"
  377. #define ARCHCONFIG "-DATOM " \
  378. "-DL1_DATA_SIZE=24576 -DL1_DATA_LINESIZE=64 " \
  379. "-DL2_SIZE=524288 -DL2_LINESIZE=64 " \
  380. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 " \
  381. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3"
  382. #define LIBNAME "atom"
  383. #define CORENAME "ATOM"
  384. #endif
  385. #ifdef FORCE_ATHLON
  386. #define FORCE
  387. #define FORCE_INTEL
  388. #define ARCHITECTURE "X86"
  389. #define SUBARCHITECTURE "ATHLON"
  390. #define ARCHCONFIG "-DATHLON " \
  391. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 " \
  392. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 " \
  393. "-DDTB_DEFAULT_ENTRIES=32 -DDTB_SIZE=4096 -DHAVE_3DNOW " \
  394. "-DHAVE_3DNOWEX -DHAVE_MMX -DHAVE_SSE "
  395. #define LIBNAME "athlon"
  396. #define CORENAME "ATHLON"
  397. #endif
  398. #ifdef FORCE_OPTERON
  399. #define FORCE
  400. #define FORCE_INTEL
  401. #define ARCHITECTURE "X86"
  402. #define SUBARCHITECTURE "OPTERON"
  403. #define ARCHCONFIG "-DOPTERON " \
  404. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 " \
  405. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 " \
  406. "-DDTB_DEFAULT_ENTRIES=32 -DDTB_SIZE=4096 -DHAVE_3DNOW " \
  407. "-DHAVE_3DNOWEX -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 "
  408. #define LIBNAME "opteron"
  409. #define CORENAME "OPTERON"
  410. #endif
  411. #ifdef FORCE_OPTERON_SSE3
  412. #define FORCE
  413. #define FORCE_INTEL
  414. #define ARCHITECTURE "X86"
  415. #define SUBARCHITECTURE "OPTERON"
  416. #define ARCHCONFIG "-DOPTERON " \
  417. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 " \
  418. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 " \
  419. "-DDTB_DEFAULT_ENTRIES=32 -DDTB_SIZE=4096 -DHAVE_3DNOW " \
  420. "-DHAVE_3DNOWEX -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3"
  421. #define LIBNAME "opteron"
  422. #define CORENAME "OPTERON"
  423. #endif
  424. #if defined(FORCE_BARCELONA) || defined(FORCE_SHANGHAI) || defined(FORCE_ISTANBUL)
  425. #define FORCE
  426. #define FORCE_INTEL
  427. #define ARCHITECTURE "X86"
  428. #define SUBARCHITECTURE "BARCELONA"
  429. #define ARCHCONFIG "-DBARCELONA " \
  430. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 " \
  431. "-DL2_SIZE=524288 -DL2_LINESIZE=64 -DL3_SIZE=2097152 " \
  432. "-DDTB_DEFAULT_ENTRIES=48 -DDTB_SIZE=4096 " \
  433. "-DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 " \
  434. "-DHAVE_SSE4A -DHAVE_MISALIGNSSE -DHAVE_128BITFPU -DHAVE_FASTMOVU"
  435. #define LIBNAME "barcelona"
  436. #define CORENAME "BARCELONA"
  437. #endif
  438. #if defined(FORCE_BOBCAT)
  439. #define FORCE
  440. #define FORCE_INTEL
  441. #define ARCHITECTURE "X86"
  442. #define SUBARCHITECTURE "BOBCAT"
  443. #define ARCHCONFIG "-DBOBCAT " \
  444. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  445. "-DL2_SIZE=524288 -DL2_LINESIZE=64 " \
  446. "-DDTB_DEFAULT_ENTRIES=40 -DDTB_SIZE=4096 " \
  447. "-DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 " \
  448. "-DHAVE_SSE4A -DHAVE_MISALIGNSSE -DHAVE_CFLUSH -DHAVE_CMOV"
  449. #define LIBNAME "bobcat"
  450. #define CORENAME "BOBCAT"
  451. #endif
  452. #if defined (FORCE_BULLDOZER)
  453. #define FORCE
  454. #define FORCE_INTEL
  455. #define ARCHITECTURE "X86"
  456. #define SUBARCHITECTURE "BULLDOZER"
  457. #define ARCHCONFIG "-DBULLDOZER " \
  458. "-DL1_DATA_SIZE=49152 -DL1_DATA_LINESIZE=64 " \
  459. "-DL2_SIZE=1024000 -DL2_LINESIZE=64 -DL3_SIZE=16777216 " \
  460. "-DDTB_DEFAULT_ENTRIES=32 -DDTB_SIZE=4096 " \
  461. "-DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 " \
  462. "-DHAVE_SSE4A -DHAVE_MISALIGNSSE -DHAVE_128BITFPU -DHAVE_FASTMOVU " \
  463. "-DHAVE_AVX"
  464. #define LIBNAME "bulldozer"
  465. #define CORENAME "BULLDOZER"
  466. #endif
  467. #if defined (FORCE_PILEDRIVER)
  468. #define FORCE
  469. #define FORCE_INTEL
  470. #define ARCHITECTURE "X86"
  471. #define SUBARCHITECTURE "PILEDRIVER"
  472. #define ARCHCONFIG "-DPILEDRIVER " \
  473. "-DL1_DATA_SIZE=16384 -DL1_DATA_LINESIZE=64 " \
  474. "-DL2_SIZE=2097152 -DL2_LINESIZE=64 -DL3_SIZE=12582912 " \
  475. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  476. "-DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 " \
  477. "-DHAVE_SSE4A -DHAVE_MISALIGNSSE -DHAVE_128BITFPU -DHAVE_FASTMOVU -DHAVE_CFLUSH " \
  478. "-DHAVE_AVX -DHAVE_FMA3"
  479. #define LIBNAME "piledriver"
  480. #define CORENAME "PILEDRIVER"
  481. #endif
  482. #if defined (FORCE_STEAMROLLER)
  483. #define FORCE
  484. #define FORCE_INTEL
  485. #define ARCHITECTURE "X86"
  486. #define SUBARCHITECTURE "STEAMROLLER"
  487. #define ARCHCONFIG "-DSTEAMROLLER " \
  488. "-DL1_DATA_SIZE=16384 -DL1_DATA_LINESIZE=64 " \
  489. "-DL2_SIZE=2097152 -DL2_LINESIZE=64 -DL3_SIZE=12582912 " \
  490. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  491. "-DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 " \
  492. "-DHAVE_SSE4A -DHAVE_MISALIGNSSE -DHAVE_128BITFPU -DHAVE_FASTMOVU -DHAVE_CFLUSH " \
  493. "-DHAVE_AVX -DHAVE_FMA3"
  494. #define LIBNAME "steamroller"
  495. #define CORENAME "STEAMROLLER"
  496. #endif
  497. #if defined (FORCE_EXCAVATOR)
  498. #define FORCE
  499. #define FORCE_INTEL
  500. #define ARCHITECTURE "X86"
  501. #define SUBARCHITECTURE "EXCAVATOR"
  502. #define ARCHCONFIG "-DEXCAVATOR " \
  503. "-DL1_DATA_SIZE=16384 -DL1_DATA_LINESIZE=64 " \
  504. "-DL2_SIZE=2097152 -DL2_LINESIZE=64 -DL3_SIZE=12582912 " \
  505. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  506. "-DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 " \
  507. "-DHAVE_SSE4A -DHAVE_MISALIGNSSE -DHAVE_128BITFPU -DHAVE_FASTMOVU -DHAVE_CFLUSH " \
  508. "-DHAVE_AVX -DHAVE_FMA3"
  509. #define LIBNAME "excavator"
  510. #define CORENAME "EXCAVATOR"
  511. #endif
  512. #if defined (FORCE_ZEN)
  513. #define FORCE
  514. #define FORCE_INTEL
  515. #define ARCHITECTURE "X86"
  516. #define SUBARCHITECTURE "ZEN"
  517. #define ARCHCONFIG "-DZEN " \
  518. "-DL1_CODE_SIZE=32768 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=8 " \
  519. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL2_CODE_ASSOCIATIVE=8 " \
  520. "-DL2_SIZE=524288 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=8 " \
  521. "-DL3_SIZE=16777216 -DL3_LINESIZE=64 -DL3_ASSOCIATIVE=8 " \
  522. "-DITB_DEFAULT_ENTRIES=64 -DITB_SIZE=4096 " \
  523. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  524. "-DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 " \
  525. "-DHAVE_SSE4A -DHAVE_MISALIGNSSE -DHAVE_128BITFPU -DHAVE_FASTMOVU -DHAVE_CFLUSH " \
  526. "-DHAVE_AVX -DHAVE_FMA3 -DFMA3"
  527. #define LIBNAME "zen"
  528. #define CORENAME "ZEN"
  529. #endif
  530. #ifdef FORCE_SSE_GENERIC
  531. #define FORCE
  532. #define FORCE_INTEL
  533. #define ARCHITECTURE "X86"
  534. #define SUBARCHITECTURE "GENERIC"
  535. #define ARCHCONFIG "-DGENERIC " \
  536. "-DL1_DATA_SIZE=16384 -DL1_DATA_LINESIZE=64 " \
  537. "-DL2_SIZE=524288 -DL2_LINESIZE=64 " \
  538. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 " \
  539. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2"
  540. #define LIBNAME "generic"
  541. #define CORENAME "GENERIC"
  542. #endif
  543. #ifdef FORCE_VIAC3
  544. #define FORCE
  545. #define FORCE_INTEL
  546. #define ARCHITECTURE "X86"
  547. #define SUBARCHITECTURE "VIAC3"
  548. #define ARCHCONFIG "-DVIAC3 " \
  549. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  550. "-DL2_SIZE=65536 -DL2_LINESIZE=32 " \
  551. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 " \
  552. "-DHAVE_MMX -DHAVE_SSE "
  553. #define LIBNAME "viac3"
  554. #define CORENAME "VIAC3"
  555. #endif
  556. #ifdef FORCE_NANO
  557. #define FORCE
  558. #define FORCE_INTEL
  559. #define ARCHITECTURE "X86"
  560. #define SUBARCHITECTURE "NANO"
  561. #define ARCHCONFIG "-DNANO " \
  562. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 " \
  563. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 " \
  564. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 " \
  565. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3"
  566. #define LIBNAME "nano"
  567. #define CORENAME "NANO"
  568. #endif
  569. #ifdef FORCE_POWER3
  570. #define FORCE
  571. #define ARCHITECTURE "POWER"
  572. #define SUBARCHITECTURE "POWER3"
  573. #define SUBDIRNAME "power"
  574. #define ARCHCONFIG "-DPOWER3 " \
  575. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=128 " \
  576. "-DL2_SIZE=2097152 -DL2_LINESIZE=128 " \
  577. "-DDTB_DEFAULT_ENTRIES=256 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  578. #define LIBNAME "power3"
  579. #define CORENAME "POWER3"
  580. #endif
  581. #ifdef FORCE_POWER4
  582. #define FORCE
  583. #define ARCHITECTURE "POWER"
  584. #define SUBARCHITECTURE "POWER4"
  585. #define SUBDIRNAME "power"
  586. #define ARCHCONFIG "-DPOWER4 " \
  587. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=128 " \
  588. "-DL2_SIZE=1509949 -DL2_LINESIZE=128 " \
  589. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=6 "
  590. #define LIBNAME "power4"
  591. #define CORENAME "POWER4"
  592. #endif
  593. #ifdef FORCE_POWER5
  594. #define FORCE
  595. #define ARCHITECTURE "POWER"
  596. #define SUBARCHITECTURE "POWER5"
  597. #define SUBDIRNAME "power"
  598. #define ARCHCONFIG "-DPOWER5 " \
  599. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=128 " \
  600. "-DL2_SIZE=1509949 -DL2_LINESIZE=128 " \
  601. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=6 "
  602. #define LIBNAME "power5"
  603. #define CORENAME "POWER5"
  604. #endif
  605. #if defined(FORCE_POWER6) || defined(FORCE_POWER7)
  606. #define FORCE
  607. #define ARCHITECTURE "POWER"
  608. #define SUBARCHITECTURE "POWER6"
  609. #define SUBDIRNAME "power"
  610. #define ARCHCONFIG "-DPOWER6 " \
  611. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=128 " \
  612. "-DL2_SIZE=4194304 -DL2_LINESIZE=128 " \
  613. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  614. #define LIBNAME "power6"
  615. #define CORENAME "POWER6"
  616. #endif
  617. #if defined(FORCE_POWER8)
  618. #define FORCE
  619. #define ARCHITECTURE "POWER"
  620. #define SUBARCHITECTURE "POWER8"
  621. #define SUBDIRNAME "power"
  622. #define ARCHCONFIG "-DPOWER8 " \
  623. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=128 " \
  624. "-DL2_SIZE=4194304 -DL2_LINESIZE=128 " \
  625. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  626. #define LIBNAME "power8"
  627. #define CORENAME "POWER8"
  628. #endif
  629. #if defined(FORCE_POWER9)
  630. #define FORCE
  631. #define ARCHITECTURE "POWER"
  632. #define SUBARCHITECTURE "POWER9"
  633. #define SUBDIRNAME "power"
  634. #define ARCHCONFIG "-DPOWER9 " \
  635. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=128 " \
  636. "-DL2_SIZE=4194304 -DL2_LINESIZE=128 " \
  637. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  638. #define LIBNAME "power9"
  639. #define CORENAME "POWER9"
  640. #endif
  641. #if defined(FORCE_POWER10)
  642. #define FORCE
  643. #define ARCHITECTURE "POWER"
  644. #define SUBARCHITECTURE "POWER10"
  645. #define SUBDIRNAME "power"
  646. #define ARCHCONFIG "-DPOWER10 " \
  647. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=128 " \
  648. "-DL2_SIZE=4194304 -DL2_LINESIZE=128 " \
  649. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  650. #define LIBNAME "power10"
  651. #define CORENAME "POWER10"
  652. #endif
  653. #ifdef FORCE_PPCG4
  654. #define FORCE
  655. #define ARCHITECTURE "POWER"
  656. #define SUBARCHITECTURE "PPCG4"
  657. #define SUBDIRNAME "power"
  658. #define ARCHCONFIG "-DPPCG4 " \
  659. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  660. "-DL2_SIZE=262144 -DL2_LINESIZE=32 " \
  661. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  662. #define LIBNAME "ppcg4"
  663. #define CORENAME "PPCG4"
  664. #endif
  665. #ifdef FORCE_PPC970
  666. #define FORCE
  667. #define ARCHITECTURE "POWER"
  668. #define SUBARCHITECTURE "PPC970"
  669. #define SUBDIRNAME "power"
  670. #define ARCHCONFIG "-DPPC970 " \
  671. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=128 " \
  672. "-DL2_SIZE=512488 -DL2_LINESIZE=128 " \
  673. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  674. #define LIBNAME "ppc970"
  675. #define CORENAME "PPC970"
  676. #endif
  677. #ifdef FORCE_PPC970MP
  678. #define FORCE
  679. #define ARCHITECTURE "POWER"
  680. #define SUBARCHITECTURE "PPC970"
  681. #define SUBDIRNAME "power"
  682. #define ARCHCONFIG "-DPPC970 " \
  683. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=128 " \
  684. "-DL2_SIZE=1024976 -DL2_LINESIZE=128 " \
  685. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  686. #define LIBNAME "ppc970mp"
  687. #define CORENAME "PPC970"
  688. #endif
  689. #ifdef FORCE_PPC440
  690. #define FORCE
  691. #define ARCHITECTURE "POWER"
  692. #define SUBARCHITECTURE "PPC440"
  693. #define SUBDIRNAME "power"
  694. #define ARCHCONFIG "-DPPC440 " \
  695. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  696. "-DL2_SIZE=16384 -DL2_LINESIZE=128 " \
  697. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=16 "
  698. #define LIBNAME "ppc440"
  699. #define CORENAME "PPC440"
  700. #endif
  701. #ifdef FORCE_PPC440FP2
  702. #define FORCE
  703. #define ARCHITECTURE "POWER"
  704. #define SUBARCHITECTURE "PPC440FP2"
  705. #define SUBDIRNAME "power"
  706. #define ARCHCONFIG "-DPPC440FP2 " \
  707. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  708. "-DL2_SIZE=16384 -DL2_LINESIZE=128 " \
  709. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=16 "
  710. #define LIBNAME "ppc440FP2"
  711. #define CORENAME "PPC440FP2"
  712. #endif
  713. #ifdef FORCE_CELL
  714. #define FORCE
  715. #define ARCHITECTURE "POWER"
  716. #define SUBARCHITECTURE "CELL"
  717. #define SUBDIRNAME "power"
  718. #define ARCHCONFIG "-DCELL " \
  719. "-DL1_DATA_SIZE=262144 -DL1_DATA_LINESIZE=128 " \
  720. "-DL2_SIZE=512488 -DL2_LINESIZE=128 " \
  721. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  722. #define LIBNAME "cell"
  723. #define CORENAME "CELL"
  724. #endif
  725. #ifdef FORCE_SICORTEX
  726. #define FORCE
  727. #define ARCHITECTURE "MIPS"
  728. #define SUBARCHITECTURE "SICORTEX"
  729. #define SUBDIRNAME "mips"
  730. #define ARCHCONFIG "-DSICORTEX " \
  731. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  732. "-DL2_SIZE=512488 -DL2_LINESIZE=32 " \
  733. "-DDTB_DEFAULT_ENTRIES=32 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  734. #define LIBNAME "mips"
  735. #define CORENAME "sicortex"
  736. #endif
  737. #ifdef FORCE_LOONGSON3A
  738. #define FORCE
  739. #define ARCHITECTURE "MIPS"
  740. #define SUBARCHITECTURE "LOONGSON3A"
  741. #define SUBDIRNAME "mips64"
  742. #define ARCHCONFIG "-DLOONGSON3A " \
  743. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  744. "-DL2_SIZE=512488 -DL2_LINESIZE=32 " \
  745. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 "
  746. #define LIBNAME "loongson3a"
  747. #define CORENAME "LOONGSON3A"
  748. #else
  749. #endif
  750. #ifdef FORCE_LOONGSON3B
  751. #define FORCE
  752. #define ARCHITECTURE "MIPS"
  753. #define SUBARCHITECTURE "LOONGSON3B"
  754. #define SUBDIRNAME "mips64"
  755. #define ARCHCONFIG "-DLOONGSON3B " \
  756. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  757. "-DL2_SIZE=512488 -DL2_LINESIZE=32 " \
  758. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 "
  759. #define LIBNAME "loongson3b"
  760. #define CORENAME "LOONGSON3B"
  761. #else
  762. #endif
  763. #ifdef FORCE_I6400
  764. #define FORCE
  765. #define ARCHITECTURE "MIPS"
  766. #define SUBARCHITECTURE "I6400"
  767. #define SUBDIRNAME "mips64"
  768. #define ARCHCONFIG "-DI6400 " \
  769. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  770. "-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
  771. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  772. #define LIBNAME "i6400"
  773. #define CORENAME "I6400"
  774. #else
  775. #endif
  776. #ifdef FORCE_P6600
  777. #define FORCE
  778. #define ARCHITECTURE "MIPS"
  779. #define SUBARCHITECTURE "P6600"
  780. #define SUBDIRNAME "mips64"
  781. #define ARCHCONFIG "-DP6600 " \
  782. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  783. "-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
  784. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  785. #define LIBNAME "p6600"
  786. #define CORENAME "P6600"
  787. #else
  788. #endif
  789. #ifdef FORCE_P5600
  790. #define FORCE
  791. #define ARCHITECTURE "MIPS"
  792. #define SUBARCHITECTURE "P5600"
  793. #define SUBDIRNAME "mips"
  794. #define ARCHCONFIG "-DP5600 " \
  795. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  796. "-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
  797. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  798. #define LIBNAME "p5600"
  799. #define CORENAME "P5600"
  800. #else
  801. #endif
  802. #ifdef FORCE_MIPS1004K
  803. #define FORCE
  804. #define ARCHITECTURE "MIPS"
  805. #define SUBARCHITECTURE "MIPS1004K"
  806. #define SUBDIRNAME "mips"
  807. #define ARCHCONFIG "-DMIPS1004K " \
  808. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  809. "-DL2_SIZE=262144 -DL2_LINESIZE=32 " \
  810. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  811. #define LIBNAME "mips1004K"
  812. #define CORENAME "MIPS1004K"
  813. #else
  814. #endif
  815. #ifdef FORCE_MIPS24K
  816. #define FORCE
  817. #define ARCHITECTURE "MIPS"
  818. #define SUBARCHITECTURE "MIPS24K"
  819. #define SUBDIRNAME "mips"
  820. #define ARCHCONFIG "-DMIPS24K " \
  821. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  822. "-DL2_SIZE=32768 -DL2_LINESIZE=32 " \
  823. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  824. #define LIBNAME "mips24K"
  825. #define CORENAME "MIPS24K"
  826. #else
  827. #endif
  828. #ifdef FORCE_I6500
  829. #define FORCE
  830. #define ARCHITECTURE "MIPS"
  831. #define SUBARCHITECTURE "I6500"
  832. #define SUBDIRNAME "mips64"
  833. #define ARCHCONFIG "-DI6500 " \
  834. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  835. "-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
  836. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  837. #define LIBNAME "i6500"
  838. #define CORENAME "I6500"
  839. #else
  840. #endif
  841. #ifdef FORCE_ITANIUM2
  842. #define FORCE
  843. #define ARCHITECTURE "IA64"
  844. #define SUBARCHITECTURE "ITANIUM2"
  845. #define SUBDIRNAME "ia64"
  846. #define ARCHCONFIG "-DITANIUM2 " \
  847. "-DL1_DATA_SIZE=262144 -DL1_DATA_LINESIZE=128 " \
  848. "-DL2_SIZE=1572864 -DL2_LINESIZE=128 -DDTB_SIZE=16384 -DDTB_DEFAULT_ENTRIES=128 "
  849. #define LIBNAME "itanium2"
  850. #define CORENAME "itanium2"
  851. #endif
  852. #ifdef FORCE_SPARC
  853. #define FORCE
  854. #define ARCHITECTURE "SPARC"
  855. #define SUBARCHITECTURE "SPARC"
  856. #define SUBDIRNAME "sparc"
  857. #define ARCHCONFIG "-DSPARC -DV9 " \
  858. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 " \
  859. "-DL2_SIZE=1572864 -DL2_LINESIZE=64 -DDTB_SIZE=8192 -DDTB_DEFAULT_ENTRIES=64 "
  860. #define LIBNAME "sparc"
  861. #define CORENAME "sparc"
  862. #endif
  863. #ifdef FORCE_SPARCV7
  864. #define FORCE
  865. #define ARCHITECTURE "SPARC"
  866. #define SUBARCHITECTURE "SPARC"
  867. #define SUBDIRNAME "sparc"
  868. #define ARCHCONFIG "-DSPARC -DV7 " \
  869. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 " \
  870. "-DL2_SIZE=1572864 -DL2_LINESIZE=64 -DDTB_SIZE=8192 -DDTB_DEFAULT_ENTRIES=64 "
  871. #define LIBNAME "sparcv7"
  872. #define CORENAME "sparcv7"
  873. #endif
  874. #ifdef FORCE_GENERIC
  875. #define FORCE
  876. #define ARCHITECTURE "GENERIC"
  877. #define SUBARCHITECTURE "GENERIC"
  878. #define SUBDIRNAME "generic"
  879. #define ARCHCONFIG "-DGENERIC " \
  880. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=128 " \
  881. "-DL2_SIZE=512488 -DL2_LINESIZE=128 " \
  882. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  883. #define LIBNAME "generic"
  884. #define CORENAME "generic"
  885. #endif
  886. #ifdef FORCE_ARMV7
  887. #define FORCE
  888. #define ARCHITECTURE "ARM"
  889. #define SUBARCHITECTURE "ARMV7"
  890. #define SUBDIRNAME "arm"
  891. #define ARCHCONFIG "-DARMV7 " \
  892. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  893. "-DL2_SIZE=512488 -DL2_LINESIZE=32 " \
  894. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 " \
  895. "-DHAVE_VFPV3 -DHAVE_VFP"
  896. #define LIBNAME "armv7"
  897. #define CORENAME "ARMV7"
  898. #else
  899. #endif
  900. #ifdef FORCE_CORTEXA9
  901. #define FORCE
  902. #define ARCHITECTURE "ARM"
  903. #define SUBARCHITECTURE "CORTEXA9"
  904. #define SUBDIRNAME "arm"
  905. #define ARCHCONFIG "-DCORTEXA9 -DARMV7 " \
  906. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  907. "-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
  908. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 " \
  909. "-DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON"
  910. #define LIBNAME "cortexa9"
  911. #define CORENAME "CORTEXA9"
  912. #else
  913. #endif
  914. #ifdef FORCE_CORTEXA15
  915. #define FORCE
  916. #define ARCHITECTURE "ARM"
  917. #define SUBARCHITECTURE "CORTEXA15"
  918. #define SUBDIRNAME "arm"
  919. #define ARCHCONFIG "-DCORTEXA15 -DARMV7 " \
  920. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  921. "-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
  922. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 " \
  923. "-DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON"
  924. #define LIBNAME "cortexa15"
  925. #define CORENAME "CORTEXA15"
  926. #else
  927. #endif
  928. #ifdef FORCE_ARMV6
  929. #define FORCE
  930. #define ARCHITECTURE "ARM"
  931. #define SUBARCHITECTURE "ARMV6"
  932. #define SUBDIRNAME "arm"
  933. #define ARCHCONFIG "-DARMV6 " \
  934. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  935. "-DL2_SIZE=512488 -DL2_LINESIZE=32 " \
  936. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 " \
  937. "-DHAVE_VFP"
  938. #define LIBNAME "armv6"
  939. #define CORENAME "ARMV6"
  940. #else
  941. #endif
  942. #ifdef FORCE_ARMV5
  943. #define FORCE
  944. #define ARCHITECTURE "ARM"
  945. #define SUBARCHITECTURE "ARMV5"
  946. #define SUBDIRNAME "arm"
  947. #define ARCHCONFIG "-DARMV5 " \
  948. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  949. "-DL2_SIZE=512488 -DL2_LINESIZE=32 " \
  950. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 "
  951. #define LIBNAME "armv5"
  952. #define CORENAME "ARMV5"
  953. #else
  954. #endif
  955. #ifdef FORCE_ARMV8
  956. #define FORCE
  957. #define ARCHITECTURE "ARM64"
  958. #define SUBARCHITECTURE "ARMV8"
  959. #define SUBDIRNAME "arm64"
  960. #define ARCHCONFIG "-DARMV8 " \
  961. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  962. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  963. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=32 " \
  964. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  965. #define LIBNAME "armv8"
  966. #define CORENAME "ARMV8"
  967. #endif
  968. #ifdef FORCE_CORTEXA53
  969. #define FORCE
  970. #define ARCHITECTURE "ARM64"
  971. #define SUBARCHITECTURE "CORTEXA53"
  972. #define SUBDIRNAME "arm64"
  973. #define ARCHCONFIG "-DCORTEXA53 " \
  974. "-DL1_CODE_SIZE=32768 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=3 " \
  975. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=2 " \
  976. "-DL2_SIZE=262144 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
  977. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  978. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  979. #define LIBNAME "cortexa53"
  980. #define CORENAME "CORTEXA53"
  981. #else
  982. #endif
  983. #ifdef FORCE_CORTEXA57
  984. #define FORCE
  985. #define ARCHITECTURE "ARM64"
  986. #define SUBARCHITECTURE "CORTEXA57"
  987. #define SUBDIRNAME "arm64"
  988. #define ARCHCONFIG "-DCORTEXA57 " \
  989. "-DL1_CODE_SIZE=49152 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=3 " \
  990. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=2 " \
  991. "-DL2_SIZE=2097152 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
  992. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  993. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  994. #define LIBNAME "cortexa57"
  995. #define CORENAME "CORTEXA57"
  996. #else
  997. #endif
  998. #ifdef FORCE_CORTEXA72
  999. #define FORCE
  1000. #define ARCHITECTURE "ARM64"
  1001. #define SUBARCHITECTURE "CORTEXA72"
  1002. #define SUBDIRNAME "arm64"
  1003. #define ARCHCONFIG "-DCORTEXA72 " \
  1004. "-DL1_CODE_SIZE=49152 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=3 " \
  1005. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=2 " \
  1006. "-DL2_SIZE=2097152 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
  1007. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1008. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1009. #define LIBNAME "cortexa72"
  1010. #define CORENAME "CORTEXA72"
  1011. #else
  1012. #endif
  1013. #ifdef FORCE_CORTEXA73
  1014. #define FORCE
  1015. #define ARCHITECTURE "ARM64"
  1016. #define SUBARCHITECTURE "CORTEXA73"
  1017. #define SUBDIRNAME "arm64"
  1018. #define ARCHCONFIG "-DCORTEXA73 " \
  1019. "-DL1_CODE_SIZE=49152 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=3 " \
  1020. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=2 " \
  1021. "-DL2_SIZE=2097152 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
  1022. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1023. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1024. #define LIBNAME "cortexa73"
  1025. #define CORENAME "CORTEXA73"
  1026. #else
  1027. #endif
  1028. #ifdef FORCE_NEOVERSEN1
  1029. #define FORCE
  1030. #define ARCHITECTURE "ARM64"
  1031. #define SUBARCHITECTURE "NEOVERSEN1"
  1032. #define SUBDIRNAME "arm64"
  1033. #define ARCHCONFIG "-DNEOVERSEN1 " \
  1034. "-DL1_CODE_SIZE=65536 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=4 " \
  1035. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=4 " \
  1036. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
  1037. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1038. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8 " \
  1039. "-march=armv8.2-a -mtune=cortex-a72"
  1040. #define LIBNAME "neoversen1"
  1041. #define CORENAME "NEOVERSEN1"
  1042. #else
  1043. #endif
  1044. #ifdef FORCE_FALKOR
  1045. #define FORCE
  1046. #define ARCHITECTURE "ARM64"
  1047. #define SUBARCHITECTURE "FALKOR"
  1048. #define SUBDIRNAME "arm64"
  1049. #define ARCHCONFIG "-DFALKOR " \
  1050. "-DL1_CODE_SIZE=49152 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=3 " \
  1051. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=2 " \
  1052. "-DL2_SIZE=2097152 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
  1053. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1054. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1055. #define LIBNAME "falkor"
  1056. #define CORENAME "FALKOR"
  1057. #else
  1058. #endif
  1059. #ifdef FORCE_THUNDERX
  1060. #define FORCE
  1061. #define ARCHITECTURE "ARM64"
  1062. #define SUBARCHITECTURE "THUNDERX"
  1063. #define SUBDIRNAME "arm64"
  1064. #define ARCHCONFIG "-DTHUNDERX " \
  1065. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=128 " \
  1066. "-DL2_SIZE=16777216 -DL2_LINESIZE=128 -DL2_ASSOCIATIVE=16 " \
  1067. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1068. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1069. #define LIBNAME "thunderx"
  1070. #define CORENAME "THUNDERX"
  1071. #else
  1072. #endif
  1073. #ifdef FORCE_THUNDERX2T99
  1074. #define ARMV8
  1075. #define FORCE
  1076. #define ARCHITECTURE "ARM64"
  1077. #define SUBARCHITECTURE "THUNDERX2T99"
  1078. #define SUBDIRNAME "arm64"
  1079. #define ARCHCONFIG "-DTHUNDERX2T99 " \
  1080. "-DL1_CODE_SIZE=32768 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=8 " \
  1081. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=8 " \
  1082. "-DL2_SIZE=262144 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=8 " \
  1083. "-DL3_SIZE=33554432 -DL3_LINESIZE=64 -DL3_ASSOCIATIVE=32 " \
  1084. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1085. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1086. #define LIBNAME "thunderx2t99"
  1087. #define CORENAME "THUNDERX2T99"
  1088. #else
  1089. #endif
  1090. #ifdef FORCE_TSV110
  1091. #define FORCE
  1092. #define ARCHITECTURE "ARM64"
  1093. #define SUBARCHITECTURE "TSV110"
  1094. #define SUBDIRNAME "arm64"
  1095. #define ARCHCONFIG "-DTSV110 " \
  1096. "-DL1_CODE_SIZE=65536 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=4 " \
  1097. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=4 " \
  1098. "-DL2_SIZE=524288 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=8 " \
  1099. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1100. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1101. #define LIBNAME "tsv110"
  1102. #define CORENAME "TSV110"
  1103. #else
  1104. #endif
  1105. #ifdef FORCE_EMAG8180
  1106. #define ARMV8
  1107. #define FORCE
  1108. #define ARCHITECTURE "ARM64"
  1109. #define SUBARCHITECTURE "EMAG8180"
  1110. #define SUBDIRNAME "arm64"
  1111. #define ARCHCONFIG "-DEMAG8180 " \
  1112. "-DL1_CODE_SIZE=32768 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=8 " \
  1113. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=8 " \
  1114. "-DL2_SIZE=262144 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=8 " \
  1115. "-DL3_SIZE=33554432 -DL3_LINESIZE=64 -DL3_ASSOCIATIVE=32 " \
  1116. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1117. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1118. #define LIBNAME "emag8180"
  1119. #define CORENAME "EMAG8180"
  1120. #endif
  1121. #ifdef FORCE_THUNDERX3T110
  1122. #define ARMV8
  1123. #define FORCE
  1124. #define ARCHITECTURE "ARM64"
  1125. #define SUBARCHITECTURE "THUNDERX3T110"
  1126. #define SUBDIRNAME "arm64"
  1127. #define ARCHCONFIG "-DTHUNDERX3T110 " \
  1128. "-DL1_CODE_SIZE=65536 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=8 " \
  1129. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=8 " \
  1130. "-DL2_SIZE=524288 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=8 " \
  1131. "-DL3_SIZE=94371840 -DL3_LINESIZE=64 -DL3_ASSOCIATIVE=32 " \
  1132. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1133. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1134. #define LIBNAME "thunderx3t110"
  1135. #define CORENAME "THUNDERX3T110"
  1136. #else
  1137. #endif
  1138. #ifdef FORCE_ZARCH_GENERIC
  1139. #define FORCE
  1140. #define ARCHITECTURE "ZARCH"
  1141. #define SUBARCHITECTURE "ZARCH_GENERIC"
  1142. #define ARCHCONFIG "-DZARCH_GENERIC " \
  1143. "-DDTB_DEFAULT_ENTRIES=64"
  1144. #define LIBNAME "zarch_generic"
  1145. #define CORENAME "ZARCH_GENERIC"
  1146. #endif
  1147. #ifdef FORCE_Z13
  1148. #define FORCE
  1149. #define ARCHITECTURE "ZARCH"
  1150. #define SUBARCHITECTURE "Z13"
  1151. #define ARCHCONFIG "-DZ13 " \
  1152. "-DDTB_DEFAULT_ENTRIES=64"
  1153. #define LIBNAME "z13"
  1154. #define CORENAME "Z13"
  1155. #endif
  1156. #ifdef FORCE_Z14
  1157. #define FORCE
  1158. #define ARCHITECTURE "ZARCH"
  1159. #define SUBARCHITECTURE "Z14"
  1160. #define ARCHCONFIG "-DZ14 " \
  1161. "-DDTB_DEFAULT_ENTRIES=64"
  1162. #define LIBNAME "z14"
  1163. #define CORENAME "Z14"
  1164. #endif
  1165. #ifndef FORCE
  1166. #ifdef USER_TARGET
  1167. #error "The TARGET specified on the command line or in Makefile.rule is not supported. Please choose a target from TargetList.txt"
  1168. #endif
  1169. #if defined(__powerpc__) || defined(__powerpc) || defined(powerpc) || \
  1170. defined(__PPC__) || defined(PPC) || defined(_POWER) || defined(__POWERPC__)
  1171. #ifndef POWER
  1172. #define POWER
  1173. #endif
  1174. #define OPENBLAS_SUPPORTED
  1175. #endif
  1176. #if defined(__zarch__) || defined(__s390x__)
  1177. #define ZARCH
  1178. #include "cpuid_zarch.c"
  1179. #define OPENBLAS_SUPPORTED
  1180. #endif
  1181. #ifdef INTEL_AMD
  1182. #include "cpuid_x86.c"
  1183. #define OPENBLAS_SUPPORTED
  1184. #endif
  1185. #ifdef __ia64__
  1186. #include "cpuid_ia64.c"
  1187. #define OPENBLAS_SUPPORTED
  1188. #endif
  1189. #ifdef __alpha
  1190. #include "cpuid_alpha.c"
  1191. #define OPENBLAS_SUPPORTED
  1192. #endif
  1193. #ifdef POWER
  1194. #include "cpuid_power.c"
  1195. #define OPENBLAS_SUPPORTED
  1196. #endif
  1197. #ifdef sparc
  1198. #include "cpuid_sparc.c"
  1199. #define OPENBLAS_SUPPORTED
  1200. #endif
  1201. #ifdef __mips__
  1202. #ifdef __mips64
  1203. #include "cpuid_mips64.c"
  1204. #else
  1205. #include "cpuid_mips.c"
  1206. #endif
  1207. #define OPENBLAS_SUPPORTED
  1208. #endif
  1209. #ifdef __arm__
  1210. #include "cpuid_arm.c"
  1211. #define OPENBLAS_SUPPORTED
  1212. #endif
  1213. #ifdef __aarch64__
  1214. #include "cpuid_arm64.c"
  1215. #define OPENBLAS_SUPPORTED
  1216. #endif
  1217. #ifndef OPENBLAS_SUPPORTED
  1218. #error "This arch/CPU is not supported by OpenBLAS."
  1219. #endif
  1220. #else
  1221. #endif
  1222. static int get_num_cores(void) {
  1223. #ifdef OS_WINDOWS
  1224. SYSTEM_INFO sysinfo;
  1225. #elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__APPLE__)
  1226. int m[2], count;
  1227. size_t len;
  1228. #endif
  1229. #if defined(linux) || defined(__sun__)
  1230. //returns the number of processors which are currently online
  1231. return sysconf(_SC_NPROCESSORS_CONF);
  1232. #elif defined(OS_WINDOWS)
  1233. GetSystemInfo(&sysinfo);
  1234. return sysinfo.dwNumberOfProcessors;
  1235. #elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__APPLE__)
  1236. m[0] = CTL_HW;
  1237. m[1] = HW_NCPU;
  1238. len = sizeof(int);
  1239. sysctl(m, 2, &count, &len, NULL, 0);
  1240. return count;
  1241. #elif defined(AIX)
  1242. //returns the number of processors which are currently online
  1243. return sysconf(_SC_NPROCESSORS_ONLN);
  1244. #else
  1245. return 2;
  1246. #endif
  1247. }
  1248. int main(int argc, char *argv[]){
  1249. #ifdef FORCE
  1250. char buffer[8192], *p, *q;
  1251. int length;
  1252. #endif
  1253. if (argc == 1) return 0;
  1254. switch (argv[1][0]) {
  1255. case '0' : /* for Makefile */
  1256. #ifdef FORCE
  1257. printf("CORE=%s\n", CORENAME);
  1258. #else
  1259. #if defined(INTEL_AMD) || defined(POWER) || defined(__mips__) || defined(__arm__) || defined(__aarch64__) || defined(ZARCH) || defined(sparc)
  1260. printf("CORE=%s\n", get_corename());
  1261. #endif
  1262. #endif
  1263. #ifdef FORCE
  1264. printf("LIBCORE=%s\n", LIBNAME);
  1265. #else
  1266. printf("LIBCORE=");
  1267. get_libname();
  1268. printf("\n");
  1269. #endif
  1270. printf("NUM_CORES=%d\n", get_num_cores());
  1271. #if defined(__arm__) && !defined(FORCE)
  1272. get_features();
  1273. #endif
  1274. #ifdef INTEL_AMD
  1275. #ifndef FORCE
  1276. get_sse();
  1277. #else
  1278. sprintf(buffer, "%s", ARCHCONFIG);
  1279. p = &buffer[0];
  1280. while (*p) {
  1281. if ((*p == '-') && (*(p + 1) == 'D')) {
  1282. p += 2;
  1283. while ((*p != ' ') && (*p != '\0')) {
  1284. if (*p == '=') {
  1285. printf("=");
  1286. p ++;
  1287. while ((*p != ' ') && (*p != '\0')) {
  1288. printf("%c", *p);
  1289. p ++;
  1290. }
  1291. } else {
  1292. printf("%c", *p);
  1293. p ++;
  1294. if ((*p == ' ') || (*p =='\0')) printf("=1");
  1295. }
  1296. }
  1297. printf("\n");
  1298. } else p ++;
  1299. }
  1300. #endif
  1301. #endif
  1302. #if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
  1303. printf("__BYTE_ORDER__=__ORDER_BIG_ENDIAN__\n");
  1304. #elif defined(__BIG_ENDIAN__) && __BIG_ENDIAN__ > 0
  1305. printf("__BYTE_ORDER__=__ORDER_BIG_ENDIAN__\n");
  1306. #endif
  1307. #if defined(_CALL_ELF) && (_CALL_ELF == 2)
  1308. printf("ELF_VERSION=2\n");
  1309. #endif
  1310. #ifdef MAKE_NB_JOBS
  1311. #if MAKE_NB_JOBS > 0
  1312. printf("MAKE += -j %d\n", MAKE_NB_JOBS);
  1313. #else
  1314. // Let make use parent -j argument or -j1 if there
  1315. // is no make parent
  1316. #endif
  1317. #elif NO_PARALLEL_MAKE==1
  1318. printf("MAKE += -j 1\n");
  1319. #else
  1320. printf("MAKE += -j %d\n", get_num_cores());
  1321. #endif
  1322. break;
  1323. case '1' : /* For config.h */
  1324. #ifdef FORCE
  1325. sprintf(buffer, "%s -DCORE_%s\n", ARCHCONFIG, CORENAME);
  1326. p = &buffer[0];
  1327. while (*p) {
  1328. if ((*p == '-') && (*(p + 1) == 'D')) {
  1329. p += 2;
  1330. printf("#define ");
  1331. while ((*p != ' ') && (*p != '\0')) {
  1332. if (*p == '=') {
  1333. printf(" ");
  1334. p ++;
  1335. while ((*p != ' ') && (*p != '\0')) {
  1336. printf("%c", *p);
  1337. p ++;
  1338. }
  1339. } else {
  1340. if (*p != '\n')
  1341. printf("%c", *p);
  1342. p ++;
  1343. }
  1344. }
  1345. printf("\n");
  1346. } else p ++;
  1347. }
  1348. #else
  1349. get_cpuconfig();
  1350. #endif
  1351. #ifdef FORCE
  1352. printf("#define CHAR_CORENAME \"%s\"\n", CORENAME);
  1353. #else
  1354. #if defined(INTEL_AMD) || defined(POWER) || defined(__mips__) || defined(__arm__) || defined(__aarch64__) || defined(ZARCH) || defined(sparc)
  1355. printf("#define CHAR_CORENAME \"%s\"\n", get_corename());
  1356. #endif
  1357. #endif
  1358. break;
  1359. case '2' : /* SMP */
  1360. if (get_num_cores() > 1) printf("SMP=1\n");
  1361. break;
  1362. }
  1363. fflush(stdout);
  1364. return 0;
  1365. }