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 47 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
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480
  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_ATOM
  344. #define FORCE
  345. #define FORCE_INTEL
  346. #define ARCHITECTURE "X86"
  347. #define SUBARCHITECTURE "ATOM"
  348. #define ARCHCONFIG "-DATOM " \
  349. "-DL1_DATA_SIZE=24576 -DL1_DATA_LINESIZE=64 " \
  350. "-DL2_SIZE=524288 -DL2_LINESIZE=64 " \
  351. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 " \
  352. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3"
  353. #define LIBNAME "atom"
  354. #define CORENAME "ATOM"
  355. #endif
  356. #ifdef FORCE_ATHLON
  357. #define FORCE
  358. #define FORCE_INTEL
  359. #define ARCHITECTURE "X86"
  360. #define SUBARCHITECTURE "ATHLON"
  361. #define ARCHCONFIG "-DATHLON " \
  362. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 " \
  363. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 " \
  364. "-DDTB_DEFAULT_ENTRIES=32 -DDTB_SIZE=4096 -DHAVE_3DNOW " \
  365. "-DHAVE_3DNOWEX -DHAVE_MMX -DHAVE_SSE "
  366. #define LIBNAME "athlon"
  367. #define CORENAME "ATHLON"
  368. #endif
  369. #ifdef FORCE_OPTERON
  370. #define FORCE
  371. #define FORCE_INTEL
  372. #define ARCHITECTURE "X86"
  373. #define SUBARCHITECTURE "OPTERON"
  374. #define ARCHCONFIG "-DOPTERON " \
  375. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 " \
  376. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 " \
  377. "-DDTB_DEFAULT_ENTRIES=32 -DDTB_SIZE=4096 -DHAVE_3DNOW " \
  378. "-DHAVE_3DNOWEX -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 "
  379. #define LIBNAME "opteron"
  380. #define CORENAME "OPTERON"
  381. #endif
  382. #ifdef FORCE_OPTERON_SSE3
  383. #define FORCE
  384. #define FORCE_INTEL
  385. #define ARCHITECTURE "X86"
  386. #define SUBARCHITECTURE "OPTERON"
  387. #define ARCHCONFIG "-DOPTERON " \
  388. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 " \
  389. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 " \
  390. "-DDTB_DEFAULT_ENTRIES=32 -DDTB_SIZE=4096 -DHAVE_3DNOW " \
  391. "-DHAVE_3DNOWEX -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3"
  392. #define LIBNAME "opteron"
  393. #define CORENAME "OPTERON"
  394. #endif
  395. #if defined(FORCE_BARCELONA) || defined(FORCE_SHANGHAI) || defined(FORCE_ISTANBUL)
  396. #define FORCE
  397. #define FORCE_INTEL
  398. #define ARCHITECTURE "X86"
  399. #define SUBARCHITECTURE "BARCELONA"
  400. #define ARCHCONFIG "-DBARCELONA " \
  401. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 " \
  402. "-DL2_SIZE=524288 -DL2_LINESIZE=64 -DL3_SIZE=2097152 " \
  403. "-DDTB_DEFAULT_ENTRIES=48 -DDTB_SIZE=4096 " \
  404. "-DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 " \
  405. "-DHAVE_SSE4A -DHAVE_MISALIGNSSE -DHAVE_128BITFPU -DHAVE_FASTMOVU"
  406. #define LIBNAME "barcelona"
  407. #define CORENAME "BARCELONA"
  408. #endif
  409. #if defined(FORCE_BOBCAT)
  410. #define FORCE
  411. #define FORCE_INTEL
  412. #define ARCHITECTURE "X86"
  413. #define SUBARCHITECTURE "BOBCAT"
  414. #define ARCHCONFIG "-DBOBCAT " \
  415. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  416. "-DL2_SIZE=524288 -DL2_LINESIZE=64 " \
  417. "-DDTB_DEFAULT_ENTRIES=40 -DDTB_SIZE=4096 " \
  418. "-DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 " \
  419. "-DHAVE_SSE4A -DHAVE_MISALIGNSSE -DHAVE_CFLUSH -DHAVE_CMOV"
  420. #define LIBNAME "bobcat"
  421. #define CORENAME "BOBCAT"
  422. #endif
  423. #if defined (FORCE_BULLDOZER)
  424. #define FORCE
  425. #define FORCE_INTEL
  426. #define ARCHITECTURE "X86"
  427. #define SUBARCHITECTURE "BULLDOZER"
  428. #define ARCHCONFIG "-DBULLDOZER " \
  429. "-DL1_DATA_SIZE=49152 -DL1_DATA_LINESIZE=64 " \
  430. "-DL2_SIZE=1024000 -DL2_LINESIZE=64 -DL3_SIZE=16777216 " \
  431. "-DDTB_DEFAULT_ENTRIES=32 -DDTB_SIZE=4096 " \
  432. "-DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 " \
  433. "-DHAVE_SSE4A -DHAVE_MISALIGNSSE -DHAVE_128BITFPU -DHAVE_FASTMOVU " \
  434. "-DHAVE_AVX -DHAVE_FMA4"
  435. #define LIBNAME "bulldozer"
  436. #define CORENAME "BULLDOZER"
  437. #endif
  438. #if defined (FORCE_PILEDRIVER)
  439. #define FORCE
  440. #define FORCE_INTEL
  441. #define ARCHITECTURE "X86"
  442. #define SUBARCHITECTURE "PILEDRIVER"
  443. #define ARCHCONFIG "-DPILEDRIVER " \
  444. "-DL1_DATA_SIZE=16384 -DL1_DATA_LINESIZE=64 " \
  445. "-DL2_SIZE=2097152 -DL2_LINESIZE=64 -DL3_SIZE=12582912 " \
  446. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  447. "-DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 " \
  448. "-DHAVE_SSE4A -DHAVE_MISALIGNSSE -DHAVE_128BITFPU -DHAVE_FASTMOVU -DHAVE_CFLUSH " \
  449. "-DHAVE_AVX -DHAVE_FMA4 -DHAVE_FMA3"
  450. #define LIBNAME "piledriver"
  451. #define CORENAME "PILEDRIVER"
  452. #endif
  453. #if defined (FORCE_STEAMROLLER)
  454. #define FORCE
  455. #define FORCE_INTEL
  456. #define ARCHITECTURE "X86"
  457. #define SUBARCHITECTURE "STEAMROLLER"
  458. #define ARCHCONFIG "-DSTEAMROLLER " \
  459. "-DL1_DATA_SIZE=16384 -DL1_DATA_LINESIZE=64 " \
  460. "-DL2_SIZE=2097152 -DL2_LINESIZE=64 -DL3_SIZE=12582912 " \
  461. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  462. "-DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 " \
  463. "-DHAVE_SSE4A -DHAVE_MISALIGNSSE -DHAVE_128BITFPU -DHAVE_FASTMOVU -DHAVE_CFLUSH " \
  464. "-DHAVE_AVX -DHAVE_FMA4 -DHAVE_FMA3"
  465. #define LIBNAME "steamroller"
  466. #define CORENAME "STEAMROLLER"
  467. #endif
  468. #if defined (FORCE_EXCAVATOR)
  469. #define FORCE
  470. #define FORCE_INTEL
  471. #define ARCHITECTURE "X86"
  472. #define SUBARCHITECTURE "EXCAVATOR"
  473. #define ARCHCONFIG "-DEXCAVATOR " \
  474. "-DL1_DATA_SIZE=16384 -DL1_DATA_LINESIZE=64 " \
  475. "-DL2_SIZE=2097152 -DL2_LINESIZE=64 -DL3_SIZE=12582912 " \
  476. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  477. "-DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 " \
  478. "-DHAVE_SSE4A -DHAVE_MISALIGNSSE -DHAVE_128BITFPU -DHAVE_FASTMOVU -DHAVE_CFLUSH " \
  479. "-DHAVE_AVX -DHAVE_FMA4 -DHAVE_FMA3"
  480. #define LIBNAME "excavator"
  481. #define CORENAME "EXCAVATOR"
  482. #endif
  483. #if defined (FORCE_ZEN)
  484. #define FORCE
  485. #define FORCE_INTEL
  486. #define ARCHITECTURE "X86"
  487. #define SUBARCHITECTURE "ZEN"
  488. #define ARCHCONFIG "-DZEN " \
  489. "-DL1_CODE_SIZE=32768 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=8 " \
  490. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL2_CODE_ASSOCIATIVE=8 " \
  491. "-DL2_SIZE=524288 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=8 " \
  492. "-DL3_SIZE=16777216 -DL3_LINESIZE=64 -DL3_ASSOCIATIVE=8 " \
  493. "-DITB_DEFAULT_ENTRIES=64 -DITB_SIZE=4096 " \
  494. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  495. "-DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 " \
  496. "-DHAVE_SSE4A -DHAVE_MISALIGNSSE -DHAVE_128BITFPU -DHAVE_FASTMOVU -DHAVE_CFLUSH " \
  497. "-DHAVE_AVX -DHAVE_FMA3 -DFMA3"
  498. #define LIBNAME "zen"
  499. #define CORENAME "ZEN"
  500. #endif
  501. #ifdef FORCE_SSE_GENERIC
  502. #define FORCE
  503. #define FORCE_INTEL
  504. #define ARCHITECTURE "X86"
  505. #define SUBARCHITECTURE "GENERIC"
  506. #define ARCHCONFIG "-DGENERIC " \
  507. "-DL1_DATA_SIZE=16384 -DL1_DATA_LINESIZE=64 " \
  508. "-DL2_SIZE=524288 -DL2_LINESIZE=64 " \
  509. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 " \
  510. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2"
  511. #define LIBNAME "generic"
  512. #define CORENAME "GENERIC"
  513. #endif
  514. #ifdef FORCE_VIAC3
  515. #define FORCE
  516. #define FORCE_INTEL
  517. #define ARCHITECTURE "X86"
  518. #define SUBARCHITECTURE "VIAC3"
  519. #define ARCHCONFIG "-DVIAC3 " \
  520. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  521. "-DL2_SIZE=65536 -DL2_LINESIZE=32 " \
  522. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 " \
  523. "-DHAVE_MMX -DHAVE_SSE "
  524. #define LIBNAME "viac3"
  525. #define CORENAME "VIAC3"
  526. #endif
  527. #ifdef FORCE_NANO
  528. #define FORCE
  529. #define FORCE_INTEL
  530. #define ARCHITECTURE "X86"
  531. #define SUBARCHITECTURE "NANO"
  532. #define ARCHCONFIG "-DNANO " \
  533. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 " \
  534. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 " \
  535. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 " \
  536. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3"
  537. #define LIBNAME "nano"
  538. #define CORENAME "NANO"
  539. #endif
  540. #ifdef FORCE_POWER3
  541. #define FORCE
  542. #define ARCHITECTURE "POWER"
  543. #define SUBARCHITECTURE "POWER3"
  544. #define SUBDIRNAME "power"
  545. #define ARCHCONFIG "-DPOWER3 " \
  546. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=128 " \
  547. "-DL2_SIZE=2097152 -DL2_LINESIZE=128 " \
  548. "-DDTB_DEFAULT_ENTRIES=256 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  549. #define LIBNAME "power3"
  550. #define CORENAME "POWER3"
  551. #endif
  552. #ifdef FORCE_POWER4
  553. #define FORCE
  554. #define ARCHITECTURE "POWER"
  555. #define SUBARCHITECTURE "POWER4"
  556. #define SUBDIRNAME "power"
  557. #define ARCHCONFIG "-DPOWER4 " \
  558. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=128 " \
  559. "-DL2_SIZE=1509949 -DL2_LINESIZE=128 " \
  560. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=6 "
  561. #define LIBNAME "power4"
  562. #define CORENAME "POWER4"
  563. #endif
  564. #ifdef FORCE_POWER5
  565. #define FORCE
  566. #define ARCHITECTURE "POWER"
  567. #define SUBARCHITECTURE "POWER5"
  568. #define SUBDIRNAME "power"
  569. #define ARCHCONFIG "-DPOWER5 " \
  570. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=128 " \
  571. "-DL2_SIZE=1509949 -DL2_LINESIZE=128 " \
  572. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=6 "
  573. #define LIBNAME "power5"
  574. #define CORENAME "POWER5"
  575. #endif
  576. #if defined(FORCE_POWER6) || defined(FORCE_POWER7)
  577. #define FORCE
  578. #define ARCHITECTURE "POWER"
  579. #define SUBARCHITECTURE "POWER6"
  580. #define SUBDIRNAME "power"
  581. #define ARCHCONFIG "-DPOWER6 " \
  582. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=128 " \
  583. "-DL2_SIZE=4194304 -DL2_LINESIZE=128 " \
  584. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  585. #define LIBNAME "power6"
  586. #define CORENAME "POWER6"
  587. #endif
  588. #if defined(FORCE_POWER8)
  589. #define FORCE
  590. #define ARCHITECTURE "POWER"
  591. #define SUBARCHITECTURE "POWER8"
  592. #define SUBDIRNAME "power"
  593. #define ARCHCONFIG "-DPOWER8 " \
  594. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=128 " \
  595. "-DL2_SIZE=4194304 -DL2_LINESIZE=128 " \
  596. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  597. #define LIBNAME "power8"
  598. #define CORENAME "POWER8"
  599. #endif
  600. #if defined(FORCE_POWER9)
  601. #define FORCE
  602. #define ARCHITECTURE "POWER"
  603. #define SUBARCHITECTURE "POWER9"
  604. #define SUBDIRNAME "power"
  605. #define ARCHCONFIG "-DPOWER9 " \
  606. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=128 " \
  607. "-DL2_SIZE=4194304 -DL2_LINESIZE=128 " \
  608. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  609. #define LIBNAME "power9"
  610. #define CORENAME "POWER9"
  611. #endif
  612. #if defined(FORCE_POWER10)
  613. #define FORCE
  614. #define ARCHITECTURE "POWER"
  615. #define SUBARCHITECTURE "POWER10"
  616. #define SUBDIRNAME "power"
  617. #define ARCHCONFIG "-DPOWER10 " \
  618. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=128 " \
  619. "-DL2_SIZE=4194304 -DL2_LINESIZE=128 " \
  620. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  621. #define LIBNAME "power10"
  622. #define CORENAME "POWER10"
  623. #endif
  624. #ifdef FORCE_PPCG4
  625. #define FORCE
  626. #define ARCHITECTURE "POWER"
  627. #define SUBARCHITECTURE "PPCG4"
  628. #define SUBDIRNAME "power"
  629. #define ARCHCONFIG "-DPPCG4 " \
  630. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  631. "-DL2_SIZE=262144 -DL2_LINESIZE=32 " \
  632. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  633. #define LIBNAME "ppcg4"
  634. #define CORENAME "PPCG4"
  635. #endif
  636. #ifdef FORCE_PPC970
  637. #define FORCE
  638. #define ARCHITECTURE "POWER"
  639. #define SUBARCHITECTURE "PPC970"
  640. #define SUBDIRNAME "power"
  641. #define ARCHCONFIG "-DPPC970 " \
  642. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=128 " \
  643. "-DL2_SIZE=512488 -DL2_LINESIZE=128 " \
  644. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  645. #define LIBNAME "ppc970"
  646. #define CORENAME "PPC970"
  647. #endif
  648. #ifdef FORCE_PPC970MP
  649. #define FORCE
  650. #define ARCHITECTURE "POWER"
  651. #define SUBARCHITECTURE "PPC970"
  652. #define SUBDIRNAME "power"
  653. #define ARCHCONFIG "-DPPC970 " \
  654. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=128 " \
  655. "-DL2_SIZE=1024976 -DL2_LINESIZE=128 " \
  656. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  657. #define LIBNAME "ppc970mp"
  658. #define CORENAME "PPC970"
  659. #endif
  660. #ifdef FORCE_PPC440
  661. #define FORCE
  662. #define ARCHITECTURE "POWER"
  663. #define SUBARCHITECTURE "PPC440"
  664. #define SUBDIRNAME "power"
  665. #define ARCHCONFIG "-DPPC440 " \
  666. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  667. "-DL2_SIZE=16384 -DL2_LINESIZE=128 " \
  668. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=16 "
  669. #define LIBNAME "ppc440"
  670. #define CORENAME "PPC440"
  671. #endif
  672. #ifdef FORCE_PPC440FP2
  673. #define FORCE
  674. #define ARCHITECTURE "POWER"
  675. #define SUBARCHITECTURE "PPC440FP2"
  676. #define SUBDIRNAME "power"
  677. #define ARCHCONFIG "-DPPC440FP2 " \
  678. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  679. "-DL2_SIZE=16384 -DL2_LINESIZE=128 " \
  680. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=16 "
  681. #define LIBNAME "ppc440FP2"
  682. #define CORENAME "PPC440FP2"
  683. #endif
  684. #ifdef FORCE_CELL
  685. #define FORCE
  686. #define ARCHITECTURE "POWER"
  687. #define SUBARCHITECTURE "CELL"
  688. #define SUBDIRNAME "power"
  689. #define ARCHCONFIG "-DCELL " \
  690. "-DL1_DATA_SIZE=262144 -DL1_DATA_LINESIZE=128 " \
  691. "-DL2_SIZE=512488 -DL2_LINESIZE=128 " \
  692. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  693. #define LIBNAME "cell"
  694. #define CORENAME "CELL"
  695. #endif
  696. #ifdef FORCE_SICORTEX
  697. #define FORCE
  698. #define ARCHITECTURE "MIPS"
  699. #define SUBARCHITECTURE "SICORTEX"
  700. #define SUBDIRNAME "mips"
  701. #define ARCHCONFIG "-DSICORTEX " \
  702. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  703. "-DL2_SIZE=512488 -DL2_LINESIZE=32 " \
  704. "-DDTB_DEFAULT_ENTRIES=32 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  705. #define LIBNAME "mips"
  706. #define CORENAME "sicortex"
  707. #endif
  708. #ifdef FORCE_LOONGSON3A
  709. #define FORCE
  710. #define ARCHITECTURE "MIPS"
  711. #define SUBARCHITECTURE "LOONGSON3A"
  712. #define SUBDIRNAME "mips64"
  713. #define ARCHCONFIG "-DLOONGSON3A " \
  714. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  715. "-DL2_SIZE=512488 -DL2_LINESIZE=32 " \
  716. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 "
  717. #define LIBNAME "loongson3a"
  718. #define CORENAME "LOONGSON3A"
  719. #else
  720. #endif
  721. #ifdef FORCE_LOONGSON3B
  722. #define FORCE
  723. #define ARCHITECTURE "MIPS"
  724. #define SUBARCHITECTURE "LOONGSON3B"
  725. #define SUBDIRNAME "mips64"
  726. #define ARCHCONFIG "-DLOONGSON3B " \
  727. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  728. "-DL2_SIZE=512488 -DL2_LINESIZE=32 " \
  729. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 "
  730. #define LIBNAME "loongson3b"
  731. #define CORENAME "LOONGSON3B"
  732. #else
  733. #endif
  734. #ifdef FORCE_I6400
  735. #define FORCE
  736. #define ARCHITECTURE "MIPS"
  737. #define SUBARCHITECTURE "I6400"
  738. #define SUBDIRNAME "mips64"
  739. #define ARCHCONFIG "-DI6400 " \
  740. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  741. "-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
  742. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  743. #define LIBNAME "i6400"
  744. #define CORENAME "I6400"
  745. #else
  746. #endif
  747. #ifdef FORCE_P6600
  748. #define FORCE
  749. #define ARCHITECTURE "MIPS"
  750. #define SUBARCHITECTURE "P6600"
  751. #define SUBDIRNAME "mips64"
  752. #define ARCHCONFIG "-DP6600 " \
  753. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  754. "-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
  755. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  756. #define LIBNAME "p6600"
  757. #define CORENAME "P6600"
  758. #else
  759. #endif
  760. #ifdef FORCE_P5600
  761. #define FORCE
  762. #define ARCHITECTURE "MIPS"
  763. #define SUBARCHITECTURE "P5600"
  764. #define SUBDIRNAME "mips"
  765. #define ARCHCONFIG "-DP5600 " \
  766. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  767. "-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
  768. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  769. #define LIBNAME "p5600"
  770. #define CORENAME "P5600"
  771. #else
  772. #endif
  773. #ifdef FORCE_MIPS1004K
  774. #define FORCE
  775. #define ARCHITECTURE "MIPS"
  776. #define SUBARCHITECTURE "MIPS1004K"
  777. #define SUBDIRNAME "mips"
  778. #define ARCHCONFIG "-DMIPS1004K " \
  779. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  780. "-DL2_SIZE=262144 -DL2_LINESIZE=32 " \
  781. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  782. #define LIBNAME "mips1004K"
  783. #define CORENAME "MIPS1004K"
  784. #else
  785. #endif
  786. #ifdef FORCE_MIPS24K
  787. #define FORCE
  788. #define ARCHITECTURE "MIPS"
  789. #define SUBARCHITECTURE "MIPS24K"
  790. #define SUBDIRNAME "mips"
  791. #define ARCHCONFIG "-DMIPS24K " \
  792. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  793. "-DL2_SIZE=32768 -DL2_LINESIZE=32 " \
  794. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  795. #define LIBNAME "mips24K"
  796. #define CORENAME "MIPS24K"
  797. #else
  798. #endif
  799. #ifdef FORCE_I6500
  800. #define FORCE
  801. #define ARCHITECTURE "MIPS"
  802. #define SUBARCHITECTURE "I6500"
  803. #define SUBDIRNAME "mips64"
  804. #define ARCHCONFIG "-DI6500 " \
  805. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  806. "-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
  807. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  808. #define LIBNAME "i6500"
  809. #define CORENAME "I6500"
  810. #else
  811. #endif
  812. #ifdef FORCE_ITANIUM2
  813. #define FORCE
  814. #define ARCHITECTURE "IA64"
  815. #define SUBARCHITECTURE "ITANIUM2"
  816. #define SUBDIRNAME "ia64"
  817. #define ARCHCONFIG "-DITANIUM2 " \
  818. "-DL1_DATA_SIZE=262144 -DL1_DATA_LINESIZE=128 " \
  819. "-DL2_SIZE=1572864 -DL2_LINESIZE=128 -DDTB_SIZE=16384 -DDTB_DEFAULT_ENTRIES=128 "
  820. #define LIBNAME "itanium2"
  821. #define CORENAME "itanium2"
  822. #endif
  823. #ifdef FORCE_SPARC
  824. #define FORCE
  825. #define ARCHITECTURE "SPARC"
  826. #define SUBARCHITECTURE "SPARC"
  827. #define SUBDIRNAME "sparc"
  828. #define ARCHCONFIG "-DSPARC -DV9 " \
  829. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 " \
  830. "-DL2_SIZE=1572864 -DL2_LINESIZE=64 -DDTB_SIZE=8192 -DDTB_DEFAULT_ENTRIES=64 "
  831. #define LIBNAME "sparc"
  832. #define CORENAME "sparc"
  833. #endif
  834. #ifdef FORCE_SPARCV7
  835. #define FORCE
  836. #define ARCHITECTURE "SPARC"
  837. #define SUBARCHITECTURE "SPARC"
  838. #define SUBDIRNAME "sparc"
  839. #define ARCHCONFIG "-DSPARC -DV7 " \
  840. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 " \
  841. "-DL2_SIZE=1572864 -DL2_LINESIZE=64 -DDTB_SIZE=8192 -DDTB_DEFAULT_ENTRIES=64 "
  842. #define LIBNAME "sparcv7"
  843. #define CORENAME "sparcv7"
  844. #endif
  845. #ifdef FORCE_GENERIC
  846. #define FORCE
  847. #define ARCHITECTURE "GENERIC"
  848. #define SUBARCHITECTURE "GENERIC"
  849. #define SUBDIRNAME "generic"
  850. #define ARCHCONFIG "-DGENERIC " \
  851. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=128 " \
  852. "-DL2_SIZE=512488 -DL2_LINESIZE=128 " \
  853. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  854. #define LIBNAME "generic"
  855. #define CORENAME "generic"
  856. #endif
  857. #ifdef FORCE_ARMV7
  858. #define FORCE
  859. #define ARCHITECTURE "ARM"
  860. #define SUBARCHITECTURE "ARMV7"
  861. #define SUBDIRNAME "arm"
  862. #define ARCHCONFIG "-DARMV7 " \
  863. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  864. "-DL2_SIZE=512488 -DL2_LINESIZE=32 " \
  865. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 " \
  866. "-DHAVE_VFPV3 -DHAVE_VFP"
  867. #define LIBNAME "armv7"
  868. #define CORENAME "ARMV7"
  869. #else
  870. #endif
  871. #ifdef FORCE_CORTEXA9
  872. #define FORCE
  873. #define ARCHITECTURE "ARM"
  874. #define SUBARCHITECTURE "CORTEXA9"
  875. #define SUBDIRNAME "arm"
  876. #define ARCHCONFIG "-DCORTEXA9 -DARMV7 " \
  877. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  878. "-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
  879. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 " \
  880. "-DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON"
  881. #define LIBNAME "cortexa9"
  882. #define CORENAME "CORTEXA9"
  883. #else
  884. #endif
  885. #ifdef FORCE_CORTEXA15
  886. #define FORCE
  887. #define ARCHITECTURE "ARM"
  888. #define SUBARCHITECTURE "CORTEXA15"
  889. #define SUBDIRNAME "arm"
  890. #define ARCHCONFIG "-DCORTEXA15 -DARMV7 " \
  891. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  892. "-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
  893. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 " \
  894. "-DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON"
  895. #define LIBNAME "cortexa15"
  896. #define CORENAME "CORTEXA15"
  897. #else
  898. #endif
  899. #ifdef FORCE_ARMV6
  900. #define FORCE
  901. #define ARCHITECTURE "ARM"
  902. #define SUBARCHITECTURE "ARMV6"
  903. #define SUBDIRNAME "arm"
  904. #define ARCHCONFIG "-DARMV6 " \
  905. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  906. "-DL2_SIZE=512488 -DL2_LINESIZE=32 " \
  907. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 " \
  908. "-DHAVE_VFP"
  909. #define LIBNAME "armv6"
  910. #define CORENAME "ARMV6"
  911. #else
  912. #endif
  913. #ifdef FORCE_ARMV5
  914. #define FORCE
  915. #define ARCHITECTURE "ARM"
  916. #define SUBARCHITECTURE "ARMV5"
  917. #define SUBDIRNAME "arm"
  918. #define ARCHCONFIG "-DARMV5 " \
  919. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  920. "-DL2_SIZE=512488 -DL2_LINESIZE=32 " \
  921. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 "
  922. #define LIBNAME "armv5"
  923. #define CORENAME "ARMV5"
  924. #else
  925. #endif
  926. #ifdef FORCE_ARMV8
  927. #define FORCE
  928. #define ARCHITECTURE "ARM64"
  929. #define SUBARCHITECTURE "ARMV8"
  930. #define SUBDIRNAME "arm64"
  931. #define ARCHCONFIG "-DARMV8 " \
  932. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  933. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  934. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=32 " \
  935. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  936. #define LIBNAME "armv8"
  937. #define CORENAME "ARMV8"
  938. #endif
  939. #ifdef FORCE_CORTEXA53
  940. #define FORCE
  941. #define ARCHITECTURE "ARM64"
  942. #define SUBARCHITECTURE "CORTEXA53"
  943. #define SUBDIRNAME "arm64"
  944. #define ARCHCONFIG "-DCORTEXA53 " \
  945. "-DL1_CODE_SIZE=32768 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=3 " \
  946. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=2 " \
  947. "-DL2_SIZE=262144 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
  948. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  949. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  950. #define LIBNAME "cortexa53"
  951. #define CORENAME "CORTEXA53"
  952. #else
  953. #endif
  954. #ifdef FORCE_CORTEXA57
  955. #define FORCE
  956. #define ARCHITECTURE "ARM64"
  957. #define SUBARCHITECTURE "CORTEXA57"
  958. #define SUBDIRNAME "arm64"
  959. #define ARCHCONFIG "-DCORTEXA57 " \
  960. "-DL1_CODE_SIZE=49152 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=3 " \
  961. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=2 " \
  962. "-DL2_SIZE=2097152 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
  963. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  964. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  965. #define LIBNAME "cortexa57"
  966. #define CORENAME "CORTEXA57"
  967. #else
  968. #endif
  969. #ifdef FORCE_CORTEXA72
  970. #define FORCE
  971. #define ARCHITECTURE "ARM64"
  972. #define SUBARCHITECTURE "CORTEXA72"
  973. #define SUBDIRNAME "arm64"
  974. #define ARCHCONFIG "-DCORTEXA72 " \
  975. "-DL1_CODE_SIZE=49152 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=3 " \
  976. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=2 " \
  977. "-DL2_SIZE=2097152 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
  978. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  979. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  980. #define LIBNAME "cortexa72"
  981. #define CORENAME "CORTEXA72"
  982. #else
  983. #endif
  984. #ifdef FORCE_CORTEXA73
  985. #define FORCE
  986. #define ARCHITECTURE "ARM64"
  987. #define SUBARCHITECTURE "CORTEXA73"
  988. #define SUBDIRNAME "arm64"
  989. #define ARCHCONFIG "-DCORTEXA73 " \
  990. "-DL1_CODE_SIZE=49152 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=3 " \
  991. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=2 " \
  992. "-DL2_SIZE=2097152 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
  993. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  994. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  995. #define LIBNAME "cortexa73"
  996. #define CORENAME "CORTEXA73"
  997. #else
  998. #endif
  999. #ifdef FORCE_NEOVERSEN1
  1000. #define FORCE
  1001. #define ARCHITECTURE "ARM64"
  1002. #define SUBARCHITECTURE "NEOVERSEN1"
  1003. #define SUBDIRNAME "arm64"
  1004. #define ARCHCONFIG "-DNEOVERSEN1 " \
  1005. "-DL1_CODE_SIZE=65536 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=4 " \
  1006. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=4 " \
  1007. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
  1008. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1009. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8 " \
  1010. "-march=armv8.2-a -mtune=cortex-a72"
  1011. #define LIBNAME "neoversen1"
  1012. #define CORENAME "NEOVERSEN1"
  1013. #else
  1014. #endif
  1015. #ifdef FORCE_FALKOR
  1016. #define FORCE
  1017. #define ARCHITECTURE "ARM64"
  1018. #define SUBARCHITECTURE "FALKOR"
  1019. #define SUBDIRNAME "arm64"
  1020. #define ARCHCONFIG "-DFALKOR " \
  1021. "-DL1_CODE_SIZE=49152 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=3 " \
  1022. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=2 " \
  1023. "-DL2_SIZE=2097152 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
  1024. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1025. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1026. #define LIBNAME "falkor"
  1027. #define CORENAME "FALKOR"
  1028. #else
  1029. #endif
  1030. #ifdef FORCE_THUNDERX
  1031. #define FORCE
  1032. #define ARCHITECTURE "ARM64"
  1033. #define SUBARCHITECTURE "THUNDERX"
  1034. #define SUBDIRNAME "arm64"
  1035. #define ARCHCONFIG "-DTHUNDERX " \
  1036. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=128 " \
  1037. "-DL2_SIZE=16777216 -DL2_LINESIZE=128 -DL2_ASSOCIATIVE=16 " \
  1038. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1039. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1040. #define LIBNAME "thunderx"
  1041. #define CORENAME "THUNDERX"
  1042. #else
  1043. #endif
  1044. #ifdef FORCE_THUNDERX2T99
  1045. #define ARMV8
  1046. #define FORCE
  1047. #define ARCHITECTURE "ARM64"
  1048. #define SUBARCHITECTURE "THUNDERX2T99"
  1049. #define SUBDIRNAME "arm64"
  1050. #define ARCHCONFIG "-DTHUNDERX2T99 " \
  1051. "-DL1_CODE_SIZE=32768 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=8 " \
  1052. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=8 " \
  1053. "-DL2_SIZE=262144 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=8 " \
  1054. "-DL3_SIZE=33554432 -DL3_LINESIZE=64 -DL3_ASSOCIATIVE=32 " \
  1055. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1056. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1057. #define LIBNAME "thunderx2t99"
  1058. #define CORENAME "THUNDERX2T99"
  1059. #else
  1060. #endif
  1061. #ifdef FORCE_TSV110
  1062. #define FORCE
  1063. #define ARCHITECTURE "ARM64"
  1064. #define SUBARCHITECTURE "TSV110"
  1065. #define SUBDIRNAME "arm64"
  1066. #define ARCHCONFIG "-DTSV110 " \
  1067. "-DL1_CODE_SIZE=65536 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=4 " \
  1068. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=4 " \
  1069. "-DL2_SIZE=524288 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=8 " \
  1070. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1071. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1072. #define LIBNAME "tsv110"
  1073. #define CORENAME "TSV110"
  1074. #else
  1075. #endif
  1076. #ifdef FORCE_EMAG8180
  1077. #define ARMV8
  1078. #define FORCE
  1079. #define ARCHITECTURE "ARM64"
  1080. #define SUBARCHITECTURE "EMAG8180"
  1081. #define SUBDIRNAME "arm64"
  1082. #define ARCHCONFIG "-DEMAG8180 " \
  1083. "-DL1_CODE_SIZE=32768 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=8 " \
  1084. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=8 " \
  1085. "-DL2_SIZE=262144 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=8 " \
  1086. "-DL3_SIZE=33554432 -DL3_LINESIZE=64 -DL3_ASSOCIATIVE=32 " \
  1087. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1088. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1089. #define LIBNAME "emag8180"
  1090. #define CORENAME "EMAG8180"
  1091. #endif
  1092. #ifdef FORCE_THUNDERX3T110
  1093. #define ARMV8
  1094. #define FORCE
  1095. #define ARCHITECTURE "ARM64"
  1096. #define SUBARCHITECTURE "THUNDERX3T110"
  1097. #define SUBDIRNAME "arm64"
  1098. #define ARCHCONFIG "-DTHUNDERX3T110 " \
  1099. "-DL1_CODE_SIZE=65536 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=8 " \
  1100. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=8 " \
  1101. "-DL2_SIZE=524288 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=8 " \
  1102. "-DL3_SIZE=94371840 -DL3_LINESIZE=64 -DL3_ASSOCIATIVE=32 " \
  1103. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1104. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1105. #define LIBNAME "thunderx3t110"
  1106. #define CORENAME "THUNDERX3T110"
  1107. #else
  1108. #endif
  1109. #ifdef FORCE_ZARCH_GENERIC
  1110. #define FORCE
  1111. #define ARCHITECTURE "ZARCH"
  1112. #define SUBARCHITECTURE "ZARCH_GENERIC"
  1113. #define ARCHCONFIG "-DZARCH_GENERIC " \
  1114. "-DDTB_DEFAULT_ENTRIES=64"
  1115. #define LIBNAME "zarch_generic"
  1116. #define CORENAME "ZARCH_GENERIC"
  1117. #endif
  1118. #ifdef FORCE_Z13
  1119. #define FORCE
  1120. #define ARCHITECTURE "ZARCH"
  1121. #define SUBARCHITECTURE "Z13"
  1122. #define ARCHCONFIG "-DZ13 " \
  1123. "-DDTB_DEFAULT_ENTRIES=64"
  1124. #define LIBNAME "z13"
  1125. #define CORENAME "Z13"
  1126. #endif
  1127. #ifdef FORCE_Z14
  1128. #define FORCE
  1129. #define ARCHITECTURE "ZARCH"
  1130. #define SUBARCHITECTURE "Z14"
  1131. #define ARCHCONFIG "-DZ14 " \
  1132. "-DDTB_DEFAULT_ENTRIES=64"
  1133. #define LIBNAME "z14"
  1134. #define CORENAME "Z14"
  1135. #endif
  1136. #ifndef FORCE
  1137. #ifdef USER_TARGET
  1138. #error "The TARGET specified on the command line or in Makefile.rule is not supported. Please choose a target from TargetList.txt"
  1139. #endif
  1140. #if defined(__powerpc__) || defined(__powerpc) || defined(powerpc) || \
  1141. defined(__PPC__) || defined(PPC) || defined(_POWER) || defined(__POWERPC__)
  1142. #ifndef POWER
  1143. #define POWER
  1144. #endif
  1145. #define OPENBLAS_SUPPORTED
  1146. #endif
  1147. #if defined(__zarch__) || defined(__s390x__)
  1148. #define ZARCH
  1149. #include "cpuid_zarch.c"
  1150. #define OPENBLAS_SUPPORTED
  1151. #endif
  1152. #ifdef INTEL_AMD
  1153. #include "cpuid_x86.c"
  1154. #define OPENBLAS_SUPPORTED
  1155. #endif
  1156. #ifdef __ia64__
  1157. #include "cpuid_ia64.c"
  1158. #define OPENBLAS_SUPPORTED
  1159. #endif
  1160. #ifdef __alpha
  1161. #include "cpuid_alpha.c"
  1162. #define OPENBLAS_SUPPORTED
  1163. #endif
  1164. #ifdef POWER
  1165. #include "cpuid_power.c"
  1166. #define OPENBLAS_SUPPORTED
  1167. #endif
  1168. #ifdef sparc
  1169. #include "cpuid_sparc.c"
  1170. #define OPENBLAS_SUPPORTED
  1171. #endif
  1172. #ifdef __mips__
  1173. #ifdef __mips64
  1174. #include "cpuid_mips64.c"
  1175. #else
  1176. #include "cpuid_mips.c"
  1177. #endif
  1178. #define OPENBLAS_SUPPORTED
  1179. #endif
  1180. #ifdef __arm__
  1181. #include "cpuid_arm.c"
  1182. #define OPENBLAS_SUPPORTED
  1183. #endif
  1184. #ifdef __aarch64__
  1185. #include "cpuid_arm64.c"
  1186. #define OPENBLAS_SUPPORTED
  1187. #endif
  1188. #ifndef OPENBLAS_SUPPORTED
  1189. #error "This arch/CPU is not supported by OpenBLAS."
  1190. #endif
  1191. #else
  1192. #endif
  1193. static int get_num_cores(void) {
  1194. #ifdef OS_WINDOWS
  1195. SYSTEM_INFO sysinfo;
  1196. #elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__APPLE__)
  1197. int m[2], count;
  1198. size_t len;
  1199. #endif
  1200. #if defined(linux) || defined(__sun__)
  1201. //returns the number of processors which are currently online
  1202. return sysconf(_SC_NPROCESSORS_CONF);
  1203. #elif defined(OS_WINDOWS)
  1204. GetSystemInfo(&sysinfo);
  1205. return sysinfo.dwNumberOfProcessors;
  1206. #elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__APPLE__)
  1207. m[0] = CTL_HW;
  1208. m[1] = HW_NCPU;
  1209. len = sizeof(int);
  1210. sysctl(m, 2, &count, &len, NULL, 0);
  1211. return count;
  1212. #elif defined(AIX)
  1213. //returns the number of processors which are currently online
  1214. return sysconf(_SC_NPROCESSORS_ONLN);
  1215. #else
  1216. return 2;
  1217. #endif
  1218. }
  1219. int main(int argc, char *argv[]){
  1220. #ifdef FORCE
  1221. char buffer[8192], *p, *q;
  1222. int length;
  1223. #endif
  1224. if (argc == 1) return 0;
  1225. switch (argv[1][0]) {
  1226. case '0' : /* for Makefile */
  1227. #ifdef FORCE
  1228. printf("CORE=%s\n", CORENAME);
  1229. #else
  1230. #if defined(INTEL_AMD) || defined(POWER) || defined(__mips__) || defined(__arm__) || defined(__aarch64__) || defined(ZARCH) || defined(sparc)
  1231. printf("CORE=%s\n", get_corename());
  1232. #endif
  1233. #endif
  1234. #ifdef FORCE
  1235. printf("LIBCORE=%s\n", LIBNAME);
  1236. #else
  1237. printf("LIBCORE=");
  1238. get_libname();
  1239. printf("\n");
  1240. #endif
  1241. printf("NUM_CORES=%d\n", get_num_cores());
  1242. #if defined(__arm__) && !defined(FORCE)
  1243. get_features();
  1244. #endif
  1245. #ifdef INTEL_AMD
  1246. #ifndef FORCE
  1247. get_sse();
  1248. #else
  1249. sprintf(buffer, "%s", ARCHCONFIG);
  1250. p = &buffer[0];
  1251. while (*p) {
  1252. if ((*p == '-') && (*(p + 1) == 'D')) {
  1253. p += 2;
  1254. while ((*p != ' ') && (*p != '\0')) {
  1255. if (*p == '=') {
  1256. printf("=");
  1257. p ++;
  1258. while ((*p != ' ') && (*p != '\0')) {
  1259. printf("%c", *p);
  1260. p ++;
  1261. }
  1262. } else {
  1263. printf("%c", *p);
  1264. p ++;
  1265. if ((*p == ' ') || (*p =='\0')) printf("=1");
  1266. }
  1267. }
  1268. printf("\n");
  1269. } else p ++;
  1270. }
  1271. #endif
  1272. #endif
  1273. #if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
  1274. printf("__BYTE_ORDER__=__ORDER_BIG_ENDIAN__\n");
  1275. #elif defined(__BIG_ENDIAN__) && __BIG_ENDIAN__ > 0
  1276. printf("__BYTE_ORDER__=__ORDER_BIG_ENDIAN__\n");
  1277. #endif
  1278. #if defined(_CALL_ELF) && (_CALL_ELF == 2)
  1279. printf("ELF_VERSION=2\n");
  1280. #endif
  1281. #ifdef MAKE_NB_JOBS
  1282. #if MAKE_NB_JOBS > 0
  1283. printf("MAKE += -j %d\n", MAKE_NB_JOBS);
  1284. #else
  1285. // Let make use parent -j argument or -j1 if there
  1286. // is no make parent
  1287. #endif
  1288. #elif NO_PARALLEL_MAKE==1
  1289. printf("MAKE += -j 1\n");
  1290. #else
  1291. printf("MAKE += -j %d\n", get_num_cores());
  1292. #endif
  1293. break;
  1294. case '1' : /* For config.h */
  1295. #ifdef FORCE
  1296. sprintf(buffer, "%s -DCORE_%s\n", ARCHCONFIG, CORENAME);
  1297. p = &buffer[0];
  1298. while (*p) {
  1299. if ((*p == '-') && (*(p + 1) == 'D')) {
  1300. p += 2;
  1301. printf("#define ");
  1302. while ((*p != ' ') && (*p != '\0')) {
  1303. if (*p == '=') {
  1304. printf(" ");
  1305. p ++;
  1306. while ((*p != ' ') && (*p != '\0')) {
  1307. printf("%c", *p);
  1308. p ++;
  1309. }
  1310. } else {
  1311. if (*p != '\n')
  1312. printf("%c", *p);
  1313. p ++;
  1314. }
  1315. }
  1316. printf("\n");
  1317. } else p ++;
  1318. }
  1319. #else
  1320. get_cpuconfig();
  1321. #endif
  1322. #ifdef FORCE
  1323. printf("#define CHAR_CORENAME \"%s\"\n", CORENAME);
  1324. #else
  1325. #if defined(INTEL_AMD) || defined(POWER) || defined(__mips__) || defined(__arm__) || defined(__aarch64__) || defined(ZARCH) || defined(sparc)
  1326. printf("#define CHAR_CORENAME \"%s\"\n", get_corename());
  1327. #endif
  1328. #endif
  1329. break;
  1330. case '2' : /* SMP */
  1331. if (get_num_cores() > 1) printf("SMP=1\n");
  1332. break;
  1333. }
  1334. fflush(stdout);
  1335. return 0;
  1336. }