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 63 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
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
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914
  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. /* #define FORCE_P2 */
  88. /* #define FORCE_KATMAI */
  89. /* #define FORCE_COPPERMINE */
  90. /* #define FORCE_NORTHWOOD */
  91. /* #define FORCE_PRESCOTT */
  92. /* #define FORCE_BANIAS */
  93. /* #define FORCE_YONAH */
  94. /* #define FORCE_CORE2 */
  95. /* #define FORCE_PENRYN */
  96. /* #define FORCE_DUNNINGTON */
  97. /* #define FORCE_NEHALEM */
  98. /* #define FORCE_SANDYBRIDGE */
  99. /* #define FORCE_ATOM */
  100. /* #define FORCE_ATHLON */
  101. /* #define FORCE_OPTERON */
  102. /* #define FORCE_OPTERON_SSE3 */
  103. /* #define FORCE_BARCELONA */
  104. /* #define FORCE_SHANGHAI */
  105. /* #define FORCE_ISTANBUL */
  106. /* #define FORCE_BOBCAT */
  107. /* #define FORCE_BULLDOZER */
  108. /* #define FORCE_PILEDRIVER */
  109. /* #define FORCE_SSE_GENERIC */
  110. /* #define FORCE_VIAC3 */
  111. /* #define FORCE_NANO */
  112. /* #define FORCE_POWER3 */
  113. /* #define FORCE_POWER4 */
  114. /* #define FORCE_POWER5 */
  115. /* #define FORCE_POWER6 */
  116. /* #define FORCE_POWER7 */
  117. /* #define FORCE_POWER8 */
  118. /* #define FORCE_PPCG4 */
  119. /* #define FORCE_PPC970 */
  120. /* #define FORCE_PPC970MP */
  121. /* #define FORCE_PPC440 */
  122. /* #define FORCE_PPC440FP2 */
  123. /* #define FORCE_CELL */
  124. /* #define FORCE_SICORTEX */
  125. /* #define FORCE_LOONGSON3R3 */
  126. /* #define FORCE_LOONGSON3R4 */
  127. /* #define FORCE_LOONGSON3R5 */
  128. /* #define FORCE_I6400 */
  129. /* #define FORCE_P6600 */
  130. /* #define FORCE_P5600 */
  131. /* #define FORCE_I6500 */
  132. /* #define FORCE_ITANIUM2 */
  133. /* #define FORCE_SPARC */
  134. /* #define FORCE_SPARCV7 */
  135. /* #define FORCE_ZARCH_GENERIC */
  136. /* #define FORCE_Z13 */
  137. /* #define FORCE_GENERIC */
  138. #ifdef FORCE_P2
  139. #define FORCE
  140. #define FORCE_INTEL
  141. #define ARCHITECTURE "X86"
  142. #define SUBARCHITECTURE "PENTIUM2"
  143. #define ARCHCONFIG "-DPENTIUM2 " \
  144. "-DL1_DATA_SIZE=16384 -DL1_DATA_LINESIZE=32 " \
  145. "-DL2_SIZE=512488 -DL2_LINESIZE=32 " \
  146. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  147. "-DHAVE_CMOV -DHAVE_MMX"
  148. #define LIBNAME "p2"
  149. #define CORENAME "P5"
  150. #endif
  151. #ifdef FORCE_KATMAI
  152. #define FORCE
  153. #define FORCE_INTEL
  154. #define ARCHITECTURE "X86"
  155. #define SUBARCHITECTURE "PENTIUM3"
  156. #define ARCHCONFIG "-DPENTIUM3 " \
  157. "-DL1_DATA_SIZE=16384 -DL1_DATA_LINESIZE=32 " \
  158. "-DL2_SIZE=524288 -DL2_LINESIZE=32 " \
  159. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  160. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE "
  161. #define LIBNAME "katmai"
  162. #define CORENAME "KATMAI"
  163. #endif
  164. #ifdef FORCE_COPPERMINE
  165. #define FORCE
  166. #define FORCE_INTEL
  167. #define ARCHITECTURE "X86"
  168. #define SUBARCHITECTURE "PENTIUM3"
  169. #define ARCHCONFIG "-DPENTIUM3 " \
  170. "-DL1_DATA_SIZE=16384 -DL1_DATA_LINESIZE=32 " \
  171. "-DL2_SIZE=262144 -DL2_LINESIZE=32 " \
  172. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  173. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE "
  174. #define LIBNAME "coppermine"
  175. #define CORENAME "COPPERMINE"
  176. #endif
  177. #ifdef FORCE_NORTHWOOD
  178. #define FORCE
  179. #define FORCE_INTEL
  180. #define ARCHITECTURE "X86"
  181. #define SUBARCHITECTURE "PENTIUM4"
  182. #define ARCHCONFIG "-DPENTIUM4 " \
  183. "-DL1_DATA_SIZE=8192 -DL1_DATA_LINESIZE=64 " \
  184. "-DL2_SIZE=524288 -DL2_LINESIZE=64 " \
  185. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 " \
  186. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 "
  187. #define LIBNAME "northwood"
  188. #define CORENAME "NORTHWOOD"
  189. #endif
  190. #ifdef FORCE_PRESCOTT
  191. #define FORCE
  192. #define FORCE_INTEL
  193. #define ARCHITECTURE "X86"
  194. #define SUBARCHITECTURE "PENTIUM4"
  195. #define ARCHCONFIG "-DPENTIUM4 " \
  196. "-DL1_DATA_SIZE=16384 -DL1_DATA_LINESIZE=64 " \
  197. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 " \
  198. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 " \
  199. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3"
  200. #define LIBNAME "prescott"
  201. #define CORENAME "PRESCOTT"
  202. #endif
  203. #ifdef FORCE_BANIAS
  204. #define FORCE
  205. #define FORCE_INTEL
  206. #define ARCHITECTURE "X86"
  207. #define SUBARCHITECTURE "BANIAS"
  208. #define ARCHCONFIG "-DPENTIUMM " \
  209. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  210. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 " \
  211. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  212. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 "
  213. #define LIBNAME "banias"
  214. #define CORENAME "BANIAS"
  215. #endif
  216. #ifdef FORCE_YONAH
  217. #define FORCE
  218. #define FORCE_INTEL
  219. #define ARCHITECTURE "X86"
  220. #define SUBARCHITECTURE "YONAH"
  221. #define ARCHCONFIG "-DPENTIUMM " \
  222. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  223. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 " \
  224. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  225. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 "
  226. #define LIBNAME "yonah"
  227. #define CORENAME "YONAH"
  228. #endif
  229. #ifdef FORCE_CORE2
  230. #define FORCE
  231. #define FORCE_INTEL
  232. #define ARCHITECTURE "X86"
  233. #define SUBARCHITECTURE "CONRORE"
  234. #define ARCHCONFIG "-DCORE2 " \
  235. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  236. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 " \
  237. "-DDTB_DEFAULT_ENTRIES=256 -DDTB_SIZE=4096 " \
  238. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3"
  239. #define LIBNAME "core2"
  240. #define CORENAME "CORE2"
  241. #endif
  242. #ifdef FORCE_PENRYN
  243. #define FORCE
  244. #define FORCE_INTEL
  245. #define ARCHITECTURE "X86"
  246. #define SUBARCHITECTURE "PENRYN"
  247. #define ARCHCONFIG "-DPENRYN " \
  248. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  249. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 " \
  250. "-DDTB_DEFAULT_ENTRIES=256 -DDTB_SIZE=4096 " \
  251. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1"
  252. #define LIBNAME "penryn"
  253. #define CORENAME "PENRYN"
  254. #endif
  255. #ifdef FORCE_DUNNINGTON
  256. #define FORCE
  257. #define FORCE_INTEL
  258. #define ARCHITECTURE "X86"
  259. #define SUBARCHITECTURE "DUNNINGTON"
  260. #define ARCHCONFIG "-DDUNNINGTON " \
  261. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  262. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 " \
  263. "-DL3_SIZE=16777216 -DL3_LINESIZE=64 " \
  264. "-DDTB_DEFAULT_ENTRIES=256 -DDTB_SIZE=4096 " \
  265. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1"
  266. #define LIBNAME "dunnington"
  267. #define CORENAME "DUNNINGTON"
  268. #endif
  269. #ifdef FORCE_NEHALEM
  270. #define FORCE
  271. #define FORCE_INTEL
  272. #define ARCHITECTURE "X86"
  273. #define SUBARCHITECTURE "NEHALEM"
  274. #define ARCHCONFIG "-DNEHALEM " \
  275. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  276. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  277. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  278. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2"
  279. #define LIBNAME "nehalem"
  280. #define CORENAME "NEHALEM"
  281. #endif
  282. #ifdef FORCE_SANDYBRIDGE
  283. #define FORCE
  284. #define FORCE_INTEL
  285. #define ARCHITECTURE "X86"
  286. #ifdef NO_AVX
  287. #define SUBARCHITECTURE "NEHALEM"
  288. #define ARCHCONFIG "-DNEHALEM " \
  289. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  290. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  291. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  292. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2"
  293. #define LIBNAME "nehalem"
  294. #define CORENAME "NEHALEM"
  295. #else
  296. #define SUBARCHITECTURE "SANDYBRIDGE"
  297. #define ARCHCONFIG "-DSANDYBRIDGE " \
  298. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  299. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  300. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  301. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 -DHAVE_AVX"
  302. #define LIBNAME "sandybridge"
  303. #define CORENAME "SANDYBRIDGE"
  304. #endif
  305. #endif
  306. #ifdef FORCE_HASWELL
  307. #define FORCE
  308. #define FORCE_INTEL
  309. #define ARCHITECTURE "X86"
  310. #ifdef NO_AVX2
  311. #ifdef NO_AVX
  312. #define SUBARCHITECTURE "NEHALEM"
  313. #define ARCHCONFIG "-DNEHALEM " \
  314. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  315. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  316. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  317. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2"
  318. #define LIBNAME "nehalem"
  319. #define CORENAME "NEHALEM"
  320. #else
  321. #define SUBARCHITECTURE "SANDYBRIDGE"
  322. #define ARCHCONFIG "-DSANDYBRIDGE " \
  323. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  324. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  325. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  326. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 -DHAVE_AVX"
  327. #define LIBNAME "sandybridge"
  328. #define CORENAME "SANDYBRIDGE"
  329. #endif
  330. #else
  331. #define SUBARCHITECTURE "HASWELL"
  332. #define ARCHCONFIG "-DHASWELL " \
  333. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  334. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  335. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  336. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 -DHAVE_AVX " \
  337. "-DHAVE_AVX2 -DHAVE_FMA3 -DFMA3"
  338. #define LIBNAME "haswell"
  339. #define CORENAME "HASWELL"
  340. #endif
  341. #endif
  342. #ifdef FORCE_SKYLAKEX
  343. #define FORCE
  344. #define FORCE_INTEL
  345. #define ARCHITECTURE "X86"
  346. #ifdef NO_AVX512
  347. #ifdef NO_AVX2
  348. #ifdef NO_AVX
  349. #define SUBARCHITECTURE "NEHALEM"
  350. #define ARCHCONFIG "-DNEHALEM " \
  351. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  352. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  353. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  354. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2"
  355. #define LIBNAME "nehalem"
  356. #define CORENAME "NEHALEM"
  357. #else
  358. #define SUBARCHITECTURE "SANDYBRIDGE"
  359. #define ARCHCONFIG "-DSANDYBRIDGE " \
  360. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  361. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  362. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  363. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 -DHAVE_AVX"
  364. #define LIBNAME "sandybridge"
  365. #define CORENAME "SANDYBRIDGE"
  366. #endif
  367. #else
  368. #define SUBARCHITECTURE "HASWELL"
  369. #define ARCHCONFIG "-DHASWELL " \
  370. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  371. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  372. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  373. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 -DHAVE_AVX " \
  374. "-DHAVE_AVX2 -DHAVE_FMA3 -DFMA3"
  375. #define LIBNAME "haswell"
  376. #define CORENAME "HASWELL"
  377. #endif
  378. #else
  379. #define SUBARCHITECTURE "SKYLAKEX"
  380. #define ARCHCONFIG "-DSKYLAKEX " \
  381. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  382. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  383. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  384. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 -DHAVE_AVX " \
  385. "-DHAVE_AVX2 -DHAVE_FMA3 -DFMA3 -DHAVE_AVX512VL -march=skylake-avx512"
  386. #define LIBNAME "skylakex"
  387. #define CORENAME "SKYLAKEX"
  388. #endif
  389. #endif
  390. #ifdef FORCE_COOPERLAKE
  391. #define FORCE
  392. #define FORCE_INTEL
  393. #define ARCHITECTURE "X86"
  394. #ifdef NO_AVX512
  395. #ifdef NO_AVX2
  396. #ifdef NO_AVX
  397. #define SUBARCHITECTURE "NEHALEM"
  398. #define ARCHCONFIG "-DNEHALEM " \
  399. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  400. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  401. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  402. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2"
  403. #define LIBNAME "nehalem"
  404. #define CORENAME "NEHALEM"
  405. #else
  406. #define SUBARCHITECTURE "SANDYBRIDGE"
  407. #define ARCHCONFIG "-DSANDYBRIDGE " \
  408. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  409. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  410. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  411. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 -DHAVE_AVX"
  412. #define LIBNAME "sandybridge"
  413. #define CORENAME "SANDYBRIDGE"
  414. #endif
  415. #else
  416. #define SUBARCHITECTURE "HASWELL"
  417. #define ARCHCONFIG "-DHASWELL " \
  418. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  419. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  420. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  421. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 -DHAVE_AVX " \
  422. "-DHAVE_AVX2 -DHAVE_FMA3 -DFMA3"
  423. #define LIBNAME "haswell"
  424. #define CORENAME "HASWELL"
  425. #endif
  426. #else
  427. #define SUBARCHITECTURE "COOPERLAKE"
  428. #define ARCHCONFIG "-DCOOPERLAKE " \
  429. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  430. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  431. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  432. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 -DHAVE_AVX " \
  433. "-DHAVE_AVX2 -DHAVE_FMA3 -DFMA3 -DHAVE_AVX512VL -DHAVE_AVX512BF16 -march=cooperlake"
  434. #define LIBNAME "cooperlake"
  435. #define CORENAME "COOPERLAKE"
  436. #endif
  437. #endif
  438. #ifdef FORCE_SAPPHIRERAPIDS
  439. #define FORCE
  440. #define FORCE_INTEL
  441. #define ARCHITECTURE "X86"
  442. #ifdef NO_AVX512
  443. #ifdef NO_AVX2
  444. #ifdef NO_AVX
  445. #define SUBARCHITECTURE "NEHALEM"
  446. #define ARCHCONFIG "-DNEHALEM " \
  447. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  448. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  449. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  450. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2"
  451. #define LIBNAME "nehalem"
  452. #define CORENAME "NEHALEM"
  453. #else
  454. #define SUBARCHITECTURE "SANDYBRIDGE"
  455. #define ARCHCONFIG "-DSANDYBRIDGE " \
  456. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  457. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  458. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  459. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 -DHAVE_AVX"
  460. #define LIBNAME "sandybridge"
  461. #define CORENAME "SANDYBRIDGE"
  462. #endif
  463. #else
  464. #define SUBARCHITECTURE "HASWELL"
  465. #define ARCHCONFIG "-DHASWELL " \
  466. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  467. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  468. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  469. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 -DHAVE_AVX " \
  470. "-DHAVE_AVX2 -DHAVE_FMA3 -DFMA3"
  471. #define LIBNAME "haswell"
  472. #define CORENAME "HASWELL"
  473. #endif
  474. #else
  475. #define SUBARCHITECTURE "SAPPHIRERAPIDS"
  476. #define ARCHCONFIG "-DSAPPHIRERAPIDS " \
  477. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  478. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  479. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  480. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 -DHAVE_AVX " \
  481. "-DHAVE_AVX2 -DHAVE_FMA3 -DFMA3 -DHAVE_AVX512VL -DHAVE_AVX512BF16 -march=sapphirerapids"
  482. #define LIBNAME "sapphirerapids"
  483. #define CORENAME "SAPPHIRERAPIDS"
  484. #endif
  485. #endif
  486. #ifdef FORCE_ATOM
  487. #define FORCE
  488. #define FORCE_INTEL
  489. #define ARCHITECTURE "X86"
  490. #define SUBARCHITECTURE "ATOM"
  491. #define ARCHCONFIG "-DATOM " \
  492. "-DL1_DATA_SIZE=24576 -DL1_DATA_LINESIZE=64 " \
  493. "-DL2_SIZE=524288 -DL2_LINESIZE=64 " \
  494. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 " \
  495. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3"
  496. #define LIBNAME "atom"
  497. #define CORENAME "ATOM"
  498. #endif
  499. #ifdef FORCE_ATHLON
  500. #define FORCE
  501. #define FORCE_INTEL
  502. #define ARCHITECTURE "X86"
  503. #define SUBARCHITECTURE "ATHLON"
  504. #define ARCHCONFIG "-DATHLON " \
  505. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 " \
  506. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 " \
  507. "-DDTB_DEFAULT_ENTRIES=32 -DDTB_SIZE=4096 -DHAVE_3DNOW " \
  508. "-DHAVE_3DNOWEX -DHAVE_MMX -DHAVE_SSE "
  509. #define LIBNAME "athlon"
  510. #define CORENAME "ATHLON"
  511. #endif
  512. #ifdef FORCE_OPTERON
  513. #define FORCE
  514. #define FORCE_INTEL
  515. #define ARCHITECTURE "X86"
  516. #define SUBARCHITECTURE "OPTERON"
  517. #define ARCHCONFIG "-DOPTERON " \
  518. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 " \
  519. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 " \
  520. "-DDTB_DEFAULT_ENTRIES=32 -DDTB_SIZE=4096 -DHAVE_3DNOW " \
  521. "-DHAVE_3DNOWEX -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 "
  522. #define LIBNAME "opteron"
  523. #define CORENAME "OPTERON"
  524. #endif
  525. #ifdef FORCE_OPTERON_SSE3
  526. #define FORCE
  527. #define FORCE_INTEL
  528. #define ARCHITECTURE "X86"
  529. #define SUBARCHITECTURE "OPTERON"
  530. #define ARCHCONFIG "-DOPTERON " \
  531. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 " \
  532. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 " \
  533. "-DDTB_DEFAULT_ENTRIES=32 -DDTB_SIZE=4096 -DHAVE_3DNOW " \
  534. "-DHAVE_3DNOWEX -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3"
  535. #define LIBNAME "opteron"
  536. #define CORENAME "OPTERON"
  537. #endif
  538. #if defined(FORCE_BARCELONA) || defined(FORCE_SHANGHAI) || defined(FORCE_ISTANBUL)
  539. #define FORCE
  540. #define FORCE_INTEL
  541. #define ARCHITECTURE "X86"
  542. #define SUBARCHITECTURE "BARCELONA"
  543. #define ARCHCONFIG "-DBARCELONA " \
  544. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 " \
  545. "-DL2_SIZE=524288 -DL2_LINESIZE=64 -DL3_SIZE=2097152 " \
  546. "-DDTB_DEFAULT_ENTRIES=48 -DDTB_SIZE=4096 " \
  547. "-DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 " \
  548. "-DHAVE_SSE4A -DHAVE_MISALIGNSSE -DHAVE_128BITFPU -DHAVE_FASTMOVU"
  549. #define LIBNAME "barcelona"
  550. #define CORENAME "BARCELONA"
  551. #endif
  552. #if defined(FORCE_BOBCAT)
  553. #define FORCE
  554. #define FORCE_INTEL
  555. #define ARCHITECTURE "X86"
  556. #define SUBARCHITECTURE "BOBCAT"
  557. #define ARCHCONFIG "-DBOBCAT " \
  558. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  559. "-DL2_SIZE=524288 -DL2_LINESIZE=64 " \
  560. "-DDTB_DEFAULT_ENTRIES=40 -DDTB_SIZE=4096 " \
  561. "-DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 " \
  562. "-DHAVE_SSE4A -DHAVE_MISALIGNSSE -DHAVE_CFLUSH -DHAVE_CMOV"
  563. #define LIBNAME "bobcat"
  564. #define CORENAME "BOBCAT"
  565. #endif
  566. #if defined (FORCE_BULLDOZER)
  567. #define FORCE
  568. #define FORCE_INTEL
  569. #define ARCHITECTURE "X86"
  570. #define SUBARCHITECTURE "BULLDOZER"
  571. #define ARCHCONFIG "-DBULLDOZER " \
  572. "-DL1_DATA_SIZE=49152 -DL1_DATA_LINESIZE=64 " \
  573. "-DL2_SIZE=1024000 -DL2_LINESIZE=64 -DL3_SIZE=16777216 " \
  574. "-DDTB_DEFAULT_ENTRIES=32 -DDTB_SIZE=4096 " \
  575. "-DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 " \
  576. "-DHAVE_SSE4A -DHAVE_MISALIGNSSE -DHAVE_128BITFPU -DHAVE_FASTMOVU " \
  577. "-DHAVE_AVX"
  578. #define LIBNAME "bulldozer"
  579. #define CORENAME "BULLDOZER"
  580. #endif
  581. #if defined (FORCE_PILEDRIVER)
  582. #define FORCE
  583. #define FORCE_INTEL
  584. #define ARCHITECTURE "X86"
  585. #define SUBARCHITECTURE "PILEDRIVER"
  586. #define ARCHCONFIG "-DPILEDRIVER " \
  587. "-DL1_DATA_SIZE=16384 -DL1_DATA_LINESIZE=64 " \
  588. "-DL2_SIZE=2097152 -DL2_LINESIZE=64 -DL3_SIZE=12582912 " \
  589. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  590. "-DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 " \
  591. "-DHAVE_SSE4A -DHAVE_MISALIGNSSE -DHAVE_128BITFPU -DHAVE_FASTMOVU -DHAVE_CFLUSH " \
  592. "-DHAVE_AVX -DHAVE_FMA3"
  593. #define LIBNAME "piledriver"
  594. #define CORENAME "PILEDRIVER"
  595. #endif
  596. #if defined (FORCE_STEAMROLLER)
  597. #define FORCE
  598. #define FORCE_INTEL
  599. #define ARCHITECTURE "X86"
  600. #define SUBARCHITECTURE "STEAMROLLER"
  601. #define ARCHCONFIG "-DSTEAMROLLER " \
  602. "-DL1_DATA_SIZE=16384 -DL1_DATA_LINESIZE=64 " \
  603. "-DL2_SIZE=2097152 -DL2_LINESIZE=64 -DL3_SIZE=12582912 " \
  604. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  605. "-DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 " \
  606. "-DHAVE_SSE4A -DHAVE_MISALIGNSSE -DHAVE_128BITFPU -DHAVE_FASTMOVU -DHAVE_CFLUSH " \
  607. "-DHAVE_AVX -DHAVE_FMA3"
  608. #define LIBNAME "steamroller"
  609. #define CORENAME "STEAMROLLER"
  610. #endif
  611. #if defined (FORCE_EXCAVATOR)
  612. #define FORCE
  613. #define FORCE_INTEL
  614. #define ARCHITECTURE "X86"
  615. #define SUBARCHITECTURE "EXCAVATOR"
  616. #define ARCHCONFIG "-DEXCAVATOR " \
  617. "-DL1_DATA_SIZE=16384 -DL1_DATA_LINESIZE=64 " \
  618. "-DL2_SIZE=2097152 -DL2_LINESIZE=64 -DL3_SIZE=12582912 " \
  619. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  620. "-DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 " \
  621. "-DHAVE_SSE4A -DHAVE_MISALIGNSSE -DHAVE_128BITFPU -DHAVE_FASTMOVU -DHAVE_CFLUSH " \
  622. "-DHAVE_AVX -DHAVE_FMA3"
  623. #define LIBNAME "excavator"
  624. #define CORENAME "EXCAVATOR"
  625. #endif
  626. #if defined (FORCE_ZEN)
  627. #define FORCE
  628. #define FORCE_INTEL
  629. #define ARCHITECTURE "X86"
  630. #ifdef NO_AVX2
  631. #ifdef NO_AVX
  632. #define SUBARCHITECTURE "NEHALEM"
  633. #define ARCHCONFIG "-DNEHALEM " \
  634. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  635. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  636. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  637. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2"
  638. #define LIBNAME "nehalem"
  639. #define CORENAME "NEHALEM"
  640. #else
  641. #define SUBARCHITECTURE "SANDYBRIDGE"
  642. #define ARCHCONFIG "-DSANDYBRIDGE " \
  643. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  644. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  645. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  646. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 -DHAVE_AVX"
  647. #define LIBNAME "sandybridge"
  648. #define CORENAME "SANDYBRIDGE"
  649. #endif
  650. #else
  651. #define SUBARCHITECTURE "ZEN"
  652. #define ARCHCONFIG "-DZEN " \
  653. "-DL1_CODE_SIZE=32768 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=8 " \
  654. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL2_CODE_ASSOCIATIVE=8 " \
  655. "-DL2_SIZE=524288 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=8 " \
  656. "-DL3_SIZE=16777216 -DL3_LINESIZE=64 -DL3_ASSOCIATIVE=8 " \
  657. "-DITB_DEFAULT_ENTRIES=64 -DITB_SIZE=4096 " \
  658. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  659. "-DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 " \
  660. "-DHAVE_SSE4A -DHAVE_MISALIGNSSE -DHAVE_128BITFPU -DHAVE_FASTMOVU -DHAVE_CFLUSH " \
  661. "-DHAVE_AVX -DHAVE_AVX2 -DHAVE_FMA3 -DFMA3"
  662. #define LIBNAME "zen"
  663. #define CORENAME "ZEN"
  664. #endif
  665. #endif
  666. #ifdef FORCE_SSE_GENERIC
  667. #define FORCE
  668. #define FORCE_INTEL
  669. #define ARCHITECTURE "X86"
  670. #define SUBARCHITECTURE "GENERIC"
  671. #define ARCHCONFIG "-DGENERIC " \
  672. "-DL1_DATA_SIZE=16384 -DL1_DATA_LINESIZE=64 " \
  673. "-DL2_SIZE=524288 -DL2_LINESIZE=64 " \
  674. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 " \
  675. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2"
  676. #define LIBNAME "generic"
  677. #define CORENAME "GENERIC"
  678. #endif
  679. #ifdef FORCE_VIAC3
  680. #define FORCE
  681. #define FORCE_INTEL
  682. #define ARCHITECTURE "X86"
  683. #define SUBARCHITECTURE "VIAC3"
  684. #define ARCHCONFIG "-DVIAC3 " \
  685. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  686. "-DL2_SIZE=65536 -DL2_LINESIZE=32 " \
  687. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 " \
  688. "-DHAVE_MMX -DHAVE_SSE "
  689. #define LIBNAME "viac3"
  690. #define CORENAME "VIAC3"
  691. #endif
  692. #ifdef FORCE_NANO
  693. #define FORCE
  694. #define FORCE_INTEL
  695. #define ARCHITECTURE "X86"
  696. #define SUBARCHITECTURE "NANO"
  697. #define ARCHCONFIG "-DNANO " \
  698. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 " \
  699. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 " \
  700. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 " \
  701. "-DHAVE_CMOV -DHAVE_MMX -DHAVE_SSE -DHAVE_SSE2 -DHAVE_SSE3 -DHAVE_SSSE3"
  702. #define LIBNAME "nano"
  703. #define CORENAME "NANO"
  704. #endif
  705. #ifdef FORCE_POWER3
  706. #define FORCE
  707. #define ARCHITECTURE "POWER"
  708. #define SUBARCHITECTURE "POWER3"
  709. #define SUBDIRNAME "power"
  710. #define ARCHCONFIG "-DPOWER3 " \
  711. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=128 " \
  712. "-DL2_SIZE=2097152 -DL2_LINESIZE=128 " \
  713. "-DDTB_DEFAULT_ENTRIES=256 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  714. #define LIBNAME "power3"
  715. #define CORENAME "POWER3"
  716. #endif
  717. #ifdef FORCE_POWER4
  718. #define FORCE
  719. #define ARCHITECTURE "POWER"
  720. #define SUBARCHITECTURE "POWER4"
  721. #define SUBDIRNAME "power"
  722. #define ARCHCONFIG "-DPOWER4 " \
  723. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=128 " \
  724. "-DL2_SIZE=1509949 -DL2_LINESIZE=128 " \
  725. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=6 "
  726. #define LIBNAME "power4"
  727. #define CORENAME "POWER4"
  728. #endif
  729. #ifdef FORCE_POWER5
  730. #define FORCE
  731. #define ARCHITECTURE "POWER"
  732. #define SUBARCHITECTURE "POWER5"
  733. #define SUBDIRNAME "power"
  734. #define ARCHCONFIG "-DPOWER5 " \
  735. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=128 " \
  736. "-DL2_SIZE=1509949 -DL2_LINESIZE=128 " \
  737. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=6 "
  738. #define LIBNAME "power5"
  739. #define CORENAME "POWER5"
  740. #endif
  741. #if defined(FORCE_POWER6) || defined(FORCE_POWER7)
  742. #define FORCE
  743. #define ARCHITECTURE "POWER"
  744. #define SUBARCHITECTURE "POWER6"
  745. #define SUBDIRNAME "power"
  746. #define ARCHCONFIG "-DPOWER6 " \
  747. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=128 " \
  748. "-DL2_SIZE=4194304 -DL2_LINESIZE=128 " \
  749. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  750. #define LIBNAME "power6"
  751. #define CORENAME "POWER6"
  752. #endif
  753. #if defined(FORCE_POWER8)
  754. #define FORCE
  755. #define ARCHITECTURE "POWER"
  756. #define SUBARCHITECTURE "POWER8"
  757. #define SUBDIRNAME "power"
  758. #define ARCHCONFIG "-DPOWER8 " \
  759. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=128 " \
  760. "-DL2_SIZE=4194304 -DL2_LINESIZE=128 " \
  761. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  762. #define LIBNAME "power8"
  763. #define CORENAME "POWER8"
  764. #endif
  765. #if defined(FORCE_POWER9)
  766. #define FORCE
  767. #define ARCHITECTURE "POWER"
  768. #define SUBARCHITECTURE "POWER9"
  769. #define SUBDIRNAME "power"
  770. #define ARCHCONFIG "-DPOWER9 " \
  771. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=128 " \
  772. "-DL2_SIZE=4194304 -DL2_LINESIZE=128 " \
  773. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  774. #define LIBNAME "power9"
  775. #define CORENAME "POWER9"
  776. #endif
  777. #if defined(FORCE_POWER10)
  778. #define FORCE
  779. #define ARCHITECTURE "POWER"
  780. #define SUBARCHITECTURE "POWER10"
  781. #define SUBDIRNAME "power"
  782. #define ARCHCONFIG "-DPOWER10 " \
  783. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=128 " \
  784. "-DL2_SIZE=4194304 -DL2_LINESIZE=128 " \
  785. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  786. #define LIBNAME "power10"
  787. #define CORENAME "POWER10"
  788. #endif
  789. #ifdef FORCE_PPCG4
  790. #define FORCE
  791. #define ARCHITECTURE "POWER"
  792. #define SUBARCHITECTURE "PPCG4"
  793. #define SUBDIRNAME "power"
  794. #define ARCHCONFIG "-DPPCG4 " \
  795. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  796. "-DL2_SIZE=262144 -DL2_LINESIZE=32 " \
  797. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  798. #define LIBNAME "ppcg4"
  799. #define CORENAME "PPCG4"
  800. #endif
  801. #ifdef FORCE_PPC970
  802. #define FORCE
  803. #define ARCHITECTURE "POWER"
  804. #define SUBARCHITECTURE "PPC970"
  805. #define SUBDIRNAME "power"
  806. #define ARCHCONFIG "-DPPC970 " \
  807. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=128 " \
  808. "-DL2_SIZE=512488 -DL2_LINESIZE=128 " \
  809. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  810. #define LIBNAME "ppc970"
  811. #define CORENAME "PPC970"
  812. #endif
  813. #ifdef FORCE_PPC970MP
  814. #define FORCE
  815. #define ARCHITECTURE "POWER"
  816. #define SUBARCHITECTURE "PPC970"
  817. #define SUBDIRNAME "power"
  818. #define ARCHCONFIG "-DPPC970 " \
  819. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=128 " \
  820. "-DL2_SIZE=1024976 -DL2_LINESIZE=128 " \
  821. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  822. #define LIBNAME "ppc970mp"
  823. #define CORENAME "PPC970"
  824. #endif
  825. #ifdef FORCE_PPC440
  826. #define FORCE
  827. #define ARCHITECTURE "POWER"
  828. #define SUBARCHITECTURE "PPC440"
  829. #define SUBDIRNAME "power"
  830. #define ARCHCONFIG "-DPPC440 " \
  831. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  832. "-DL2_SIZE=16384 -DL2_LINESIZE=128 " \
  833. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=16 "
  834. #define LIBNAME "ppc440"
  835. #define CORENAME "PPC440"
  836. #endif
  837. #ifdef FORCE_PPC440FP2
  838. #define FORCE
  839. #define ARCHITECTURE "POWER"
  840. #define SUBARCHITECTURE "PPC440FP2"
  841. #define SUBDIRNAME "power"
  842. #define ARCHCONFIG "-DPPC440FP2 " \
  843. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  844. "-DL2_SIZE=16384 -DL2_LINESIZE=128 " \
  845. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=16 "
  846. #define LIBNAME "ppc440FP2"
  847. #define CORENAME "PPC440FP2"
  848. #endif
  849. #ifdef FORCE_CELL
  850. #define FORCE
  851. #define ARCHITECTURE "POWER"
  852. #define SUBARCHITECTURE "CELL"
  853. #define SUBDIRNAME "power"
  854. #define ARCHCONFIG "-DCELL " \
  855. "-DL1_DATA_SIZE=262144 -DL1_DATA_LINESIZE=128 " \
  856. "-DL2_SIZE=512488 -DL2_LINESIZE=128 " \
  857. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  858. #define LIBNAME "cell"
  859. #define CORENAME "CELL"
  860. #endif
  861. #ifdef FORCE_SICORTEX
  862. #define FORCE
  863. #define ARCHITECTURE "MIPS"
  864. #define SUBARCHITECTURE "SICORTEX"
  865. #define SUBDIRNAME "mips"
  866. #define ARCHCONFIG "-DSICORTEX " \
  867. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  868. "-DL2_SIZE=512488 -DL2_LINESIZE=32 " \
  869. "-DDTB_DEFAULT_ENTRIES=32 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  870. #define LIBNAME "mips"
  871. #define CORENAME "sicortex"
  872. #endif
  873. #if defined FORCE_LOONGSON3R3 || defined FORCE_LOONGSON3A || defined FORCE_LOONGSON3B
  874. #define FORCE
  875. #define ARCHITECTURE "MIPS"
  876. #define SUBARCHITECTURE "LOONGSON3R3"
  877. #define SUBDIRNAME "mips64"
  878. #define ARCHCONFIG "-DLOONGSON3R3 " \
  879. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  880. "-DL2_SIZE=512488 -DL2_LINESIZE=32 " \
  881. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 "
  882. #define LIBNAME "loongson3r3"
  883. #define CORENAME "LOONGSON3R3"
  884. #else
  885. #endif
  886. #ifdef FORCE_LOONGSON3R4
  887. #define FORCE
  888. #define ARCHITECTURE "MIPS"
  889. #define SUBARCHITECTURE "LOONGSON3R4"
  890. #define SUBDIRNAME "mips64"
  891. #define ARCHCONFIG "-DLOONGSON3R4 " \
  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. #define LIBNAME "loongson3r4"
  896. #define CORENAME "LOONGSON3R4"
  897. #else
  898. #endif
  899. #ifdef FORCE_LOONGSON3R5
  900. #define FORCE
  901. #define ARCHITECTURE "LOONGARCH"
  902. #define SUBARCHITECTURE "LOONGSON3R5"
  903. #define SUBDIRNAME "loongarch64"
  904. #define ARCHCONFIG "-DLOONGSON3R5 " \
  905. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 " \
  906. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 " \
  907. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=16 "
  908. #define LIBNAME "loongson3r5"
  909. #define CORENAME "LOONGSON3R5"
  910. #else
  911. #endif
  912. #ifdef FORCE_I6400
  913. #define FORCE
  914. #define ARCHITECTURE "MIPS"
  915. #define SUBARCHITECTURE "I6400"
  916. #define SUBDIRNAME "mips64"
  917. #define ARCHCONFIG "-DI6400 " \
  918. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  919. "-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
  920. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  921. #define LIBNAME "i6400"
  922. #define CORENAME "I6400"
  923. #else
  924. #endif
  925. #ifdef FORCE_P6600
  926. #define FORCE
  927. #define ARCHITECTURE "MIPS"
  928. #define SUBARCHITECTURE "P6600"
  929. #define SUBDIRNAME "mips64"
  930. #define ARCHCONFIG "-DP6600 " \
  931. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  932. "-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
  933. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  934. #define LIBNAME "p6600"
  935. #define CORENAME "P6600"
  936. #else
  937. #endif
  938. #ifdef FORCE_P5600
  939. #define FORCE
  940. #define ARCHITECTURE "MIPS"
  941. #define SUBARCHITECTURE "P5600"
  942. #define SUBDIRNAME "mips"
  943. #define ARCHCONFIG "-DP5600 " \
  944. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  945. "-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
  946. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 -DNO_MSA"
  947. #define LIBNAME "p5600"
  948. #define CORENAME "P5600"
  949. #else
  950. #endif
  951. #ifdef FORCE_MIPS1004K
  952. #define FORCE
  953. #define ARCHITECTURE "MIPS"
  954. #define SUBARCHITECTURE "MIPS1004K"
  955. #define SUBDIRNAME "mips"
  956. #define ARCHCONFIG "-DMIPS1004K " \
  957. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  958. "-DL2_SIZE=262144 -DL2_LINESIZE=32 " \
  959. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 -DNO_MSA"
  960. #define LIBNAME "mips1004K"
  961. #define CORENAME "MIPS1004K"
  962. #else
  963. #endif
  964. #ifdef FORCE_MIPS24K
  965. #define FORCE
  966. #define ARCHITECTURE "MIPS"
  967. #define SUBARCHITECTURE "MIPS24K"
  968. #define SUBDIRNAME "mips"
  969. #define ARCHCONFIG "-DMIPS24K " \
  970. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  971. "-DL2_SIZE=32768 -DL2_LINESIZE=32 " \
  972. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 -DNO_MSA"
  973. #define LIBNAME "mips24K"
  974. #define CORENAME "MIPS24K"
  975. #else
  976. #endif
  977. #ifdef FORCE_I6500
  978. #define FORCE
  979. #define ARCHITECTURE "MIPS"
  980. #define SUBARCHITECTURE "I6500"
  981. #define SUBDIRNAME "mips64"
  982. #define ARCHCONFIG "-DI6500 " \
  983. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  984. "-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
  985. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  986. #define LIBNAME "i6500"
  987. #define CORENAME "I6500"
  988. #else
  989. #endif
  990. #ifdef FORCE_ITANIUM2
  991. #define FORCE
  992. #define ARCHITECTURE "IA64"
  993. #define SUBARCHITECTURE "ITANIUM2"
  994. #define SUBDIRNAME "ia64"
  995. #define ARCHCONFIG "-DITANIUM2 " \
  996. "-DL1_DATA_SIZE=262144 -DL1_DATA_LINESIZE=128 " \
  997. "-DL2_SIZE=1572864 -DL2_LINESIZE=128 -DDTB_SIZE=16384 -DDTB_DEFAULT_ENTRIES=128 "
  998. #define LIBNAME "itanium2"
  999. #define CORENAME "itanium2"
  1000. #endif
  1001. #ifdef FORCE_SPARC
  1002. #define FORCE
  1003. #define ARCHITECTURE "SPARC"
  1004. #define SUBARCHITECTURE "SPARC"
  1005. #define SUBDIRNAME "sparc"
  1006. #define ARCHCONFIG "-DSPARC -DV9 " \
  1007. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 " \
  1008. "-DL2_SIZE=1572864 -DL2_LINESIZE=64 -DDTB_SIZE=8192 -DDTB_DEFAULT_ENTRIES=64 "
  1009. #define LIBNAME "sparc"
  1010. #define CORENAME "sparc"
  1011. #endif
  1012. #ifdef FORCE_SPARCV7
  1013. #define FORCE
  1014. #define ARCHITECTURE "SPARC"
  1015. #define SUBARCHITECTURE "SPARC"
  1016. #define SUBDIRNAME "sparc"
  1017. #define ARCHCONFIG "-DSPARC -DV7 " \
  1018. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 " \
  1019. "-DL2_SIZE=1572864 -DL2_LINESIZE=64 -DDTB_SIZE=8192 -DDTB_DEFAULT_ENTRIES=64 "
  1020. #define LIBNAME "sparcv7"
  1021. #define CORENAME "sparcv7"
  1022. #endif
  1023. #ifdef FORCE_GENERIC
  1024. #define FORCE
  1025. #define ARCHITECTURE "GENERIC"
  1026. #define SUBARCHITECTURE "GENERIC"
  1027. #define SUBDIRNAME "generic"
  1028. #define ARCHCONFIG "-DGENERIC " \
  1029. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=128 " \
  1030. "-DL2_SIZE=512488 -DL2_LINESIZE=128 " \
  1031. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  1032. #define LIBNAME "generic"
  1033. #define CORENAME "generic"
  1034. #endif
  1035. #ifdef FORCE_ARMV7
  1036. #define FORCE
  1037. #define ARCHITECTURE "ARM"
  1038. #define SUBARCHITECTURE "ARMV7"
  1039. #define SUBDIRNAME "arm"
  1040. #define ARCHCONFIG "-DARMV7 " \
  1041. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  1042. "-DL2_SIZE=512488 -DL2_LINESIZE=32 " \
  1043. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 " \
  1044. "-DHAVE_VFPV3 -DHAVE_VFP"
  1045. #define LIBNAME "armv7"
  1046. #define CORENAME "ARMV7"
  1047. #else
  1048. #endif
  1049. #ifdef FORCE_CORTEXA9
  1050. #define FORCE
  1051. #define ARCHITECTURE "ARM"
  1052. #define SUBARCHITECTURE "CORTEXA9"
  1053. #define SUBDIRNAME "arm"
  1054. #define ARCHCONFIG "-DCORTEXA9 -DARMV7 " \
  1055. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  1056. "-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
  1057. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 " \
  1058. "-DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON"
  1059. #define LIBNAME "cortexa9"
  1060. #define CORENAME "CORTEXA9"
  1061. #else
  1062. #endif
  1063. #ifdef FORCE_RISCV64_GENERIC
  1064. #define FORCE
  1065. #define ARCHITECTURE "RISCV64"
  1066. #define SUBARCHITECTURE "RISCV64_GENERIC"
  1067. #define SUBDIRNAME "riscv64"
  1068. #define ARCHCONFIG "-DRISCV64_GENERIC " \
  1069. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  1070. "-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
  1071. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 "
  1072. #define LIBNAME "riscv64_generic"
  1073. #define CORENAME "RISCV64_GENERIC"
  1074. #else
  1075. #endif
  1076. #ifdef FORCE_CORTEXA15
  1077. #define FORCE
  1078. #define ARCHITECTURE "ARM"
  1079. #define SUBARCHITECTURE "CORTEXA15"
  1080. #define SUBDIRNAME "arm"
  1081. #define ARCHCONFIG "-DCORTEXA15 -DARMV7 " \
  1082. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  1083. "-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
  1084. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 " \
  1085. "-DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON"
  1086. #define LIBNAME "cortexa15"
  1087. #define CORENAME "CORTEXA15"
  1088. #else
  1089. #endif
  1090. #ifdef FORCE_ARMV6
  1091. #define FORCE
  1092. #define ARCHITECTURE "ARM"
  1093. #define SUBARCHITECTURE "ARMV6"
  1094. #define SUBDIRNAME "arm"
  1095. #define ARCHCONFIG "-DARMV6 " \
  1096. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  1097. "-DL2_SIZE=512488 -DL2_LINESIZE=32 " \
  1098. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 " \
  1099. "-DHAVE_VFP"
  1100. #define LIBNAME "armv6"
  1101. #define CORENAME "ARMV6"
  1102. #else
  1103. #endif
  1104. #ifdef FORCE_ARMV5
  1105. #define FORCE
  1106. #define ARCHITECTURE "ARM"
  1107. #define SUBARCHITECTURE "ARMV5"
  1108. #define SUBDIRNAME "arm"
  1109. #define ARCHCONFIG "-DARMV5 " \
  1110. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=32 " \
  1111. "-DL2_SIZE=512488 -DL2_LINESIZE=32 " \
  1112. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 "
  1113. #define LIBNAME "armv5"
  1114. #define CORENAME "ARMV5"
  1115. #else
  1116. #endif
  1117. #ifdef FORCE_ARMV8SVE
  1118. #define FORCE
  1119. #define ARCHITECTURE "ARM64"
  1120. #define SUBARCHITECTURE "ARMV8SVE"
  1121. #define SUBDIRNAME "arm64"
  1122. #define ARCHCONFIG "-DARMV8SVE " \
  1123. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  1124. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  1125. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=32 " \
  1126. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DHAVE_SVE -DARMV8"
  1127. #define LIBNAME "armv8sve"
  1128. #define CORENAME "ARMV8SVE"
  1129. #endif
  1130. #ifdef FORCE_ARMV8
  1131. #define FORCE
  1132. #define ARCHITECTURE "ARM64"
  1133. #define SUBARCHITECTURE "ARMV8"
  1134. #define SUBDIRNAME "arm64"
  1135. #define ARCHCONFIG "-DARMV8 " \
  1136. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  1137. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  1138. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=32 " \
  1139. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1140. #define LIBNAME "armv8"
  1141. #define CORENAME "ARMV8"
  1142. #endif
  1143. #ifdef FORCE_CORTEXA53
  1144. #define FORCE
  1145. #define ARCHITECTURE "ARM64"
  1146. #define SUBARCHITECTURE "CORTEXA53"
  1147. #define SUBDIRNAME "arm64"
  1148. #define ARCHCONFIG "-DCORTEXA53 " \
  1149. "-DL1_CODE_SIZE=32768 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=3 " \
  1150. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=2 " \
  1151. "-DL2_SIZE=262144 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
  1152. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1153. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1154. #define LIBNAME "cortexa53"
  1155. #define CORENAME "CORTEXA53"
  1156. #endif
  1157. #ifdef FORCE_CORTEXA57
  1158. #define FORCE
  1159. #define ARCHITECTURE "ARM64"
  1160. #define SUBARCHITECTURE "CORTEXA57"
  1161. #define SUBDIRNAME "arm64"
  1162. #define ARCHCONFIG "-DCORTEXA57 " \
  1163. "-DL1_CODE_SIZE=49152 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=3 " \
  1164. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=2 " \
  1165. "-DL2_SIZE=2097152 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
  1166. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1167. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1168. #define LIBNAME "cortexa57"
  1169. #define CORENAME "CORTEXA57"
  1170. #endif
  1171. #ifdef FORCE_CORTEXA72
  1172. #define FORCE
  1173. #define ARCHITECTURE "ARM64"
  1174. #define SUBARCHITECTURE "CORTEXA72"
  1175. #define SUBDIRNAME "arm64"
  1176. #define ARCHCONFIG "-DCORTEXA72 " \
  1177. "-DL1_CODE_SIZE=49152 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=3 " \
  1178. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=2 " \
  1179. "-DL2_SIZE=2097152 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
  1180. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1181. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1182. #define LIBNAME "cortexa72"
  1183. #define CORENAME "CORTEXA72"
  1184. #endif
  1185. #ifdef FORCE_CORTEXA73
  1186. #define FORCE
  1187. #define ARCHITECTURE "ARM64"
  1188. #define SUBARCHITECTURE "CORTEXA73"
  1189. #define SUBDIRNAME "arm64"
  1190. #define ARCHCONFIG "-DCORTEXA73 " \
  1191. "-DL1_CODE_SIZE=49152 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=3 " \
  1192. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=2 " \
  1193. "-DL2_SIZE=2097152 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
  1194. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1195. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1196. #define LIBNAME "cortexa73"
  1197. #define CORENAME "CORTEXA73"
  1198. #endif
  1199. #ifdef FORCE_CORTEXX1
  1200. #define FORCE
  1201. #define ARCHITECTURE "ARM64"
  1202. #define SUBARCHITECTURE "CORTEXX1"
  1203. #define SUBDIRNAME "arm64"
  1204. #define ARCHCONFIG "-DCORTEXX1 " \
  1205. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  1206. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  1207. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=32 " \
  1208. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1209. #define LIBNAME "cortexx1"
  1210. #define CORENAME "CORTEXX1"
  1211. #endif
  1212. #ifdef FORCE_CORTEXX2
  1213. #define FORCE
  1214. #define ARCHITECTURE "ARM64"
  1215. #define SUBARCHITECTURE "CORTEXX2"
  1216. #define SUBDIRNAME "arm64"
  1217. #define ARCHCONFIG "-DCORTEXX2 " \
  1218. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  1219. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  1220. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=32 " \
  1221. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DHAVE_SVE -DARMV8 -DARMV9"
  1222. #define LIBNAME "cortexx2"
  1223. #define CORENAME "CORTEXX2"
  1224. #endif
  1225. #ifdef FORCE_CORTEXA510
  1226. #define FORCE
  1227. #define ARCHITECTURE "ARM64"
  1228. #define SUBARCHITECTURE "CORTEXA510"
  1229. #define SUBDIRNAME "arm64"
  1230. #define ARCHCONFIG "-DCORTEXA510 " \
  1231. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  1232. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  1233. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=32 " \
  1234. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DHAVE_SVE -DARMV8 -DARMV9"
  1235. #define LIBNAME "cortexa510"
  1236. #define CORENAME "CORTEXA510"
  1237. #endif
  1238. #ifdef FORCE_CORTEXA710
  1239. #define FORCE
  1240. #define ARCHITECTURE "ARM64"
  1241. #define SUBARCHITECTURE "CORTEXA710"
  1242. #define SUBDIRNAME "arm64"
  1243. #define ARCHCONFIG "-DCORTEXA710 " \
  1244. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  1245. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  1246. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=32 " \
  1247. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DHAVE_SVE -DARMV8 -DARMV9"
  1248. #define LIBNAME "cortexa710"
  1249. #define CORENAME "CORTEXA710"
  1250. #endif
  1251. #ifdef FORCE_NEOVERSEN1
  1252. #define FORCE
  1253. #define ARCHITECTURE "ARM64"
  1254. #define SUBARCHITECTURE "NEOVERSEN1"
  1255. #define SUBDIRNAME "arm64"
  1256. #define ARCHCONFIG "-DNEOVERSEN1 " \
  1257. "-DL1_CODE_SIZE=65536 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=4 " \
  1258. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=4 " \
  1259. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
  1260. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1261. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8 " \
  1262. "-march=armv8.2-a -mtune=neoverse-n1"
  1263. #define LIBNAME "neoversen1"
  1264. #define CORENAME "NEOVERSEN1"
  1265. #endif
  1266. #ifdef FORCE_NEOVERSEV1
  1267. #define FORCE
  1268. #define ARCHITECTURE "ARM64"
  1269. #define SUBARCHITECTURE "NEOVERSEV1"
  1270. #define SUBDIRNAME "arm64"
  1271. #define ARCHCONFIG "-DNEOVERSEV1 " \
  1272. "-DL1_CODE_SIZE=65536 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=4 " \
  1273. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=4 " \
  1274. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
  1275. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1276. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DHAVE_SVE -DARMV8 " \
  1277. "-march=armv8.4-a -mtune=neoverse-v1"
  1278. #define LIBNAME "neoversev1"
  1279. #define CORENAME "NEOVERSEV1"
  1280. #endif
  1281. #ifdef FORCE_NEOVERSEN2
  1282. #define FORCE
  1283. #define ARCHITECTURE "ARM64"
  1284. #define SUBARCHITECTURE "NEOVERSEN2"
  1285. #define SUBDIRNAME "arm64"
  1286. #define ARCHCONFIG "-DNEOVERSEN2 " \
  1287. "-DL1_CODE_SIZE=65536 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=4 " \
  1288. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=4 " \
  1289. "-DL2_SIZE=1048576 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
  1290. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1291. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DHAVE_SVE -DARMV8 " \
  1292. "-march=armv8.5-a -mtune=neoverse-n2"
  1293. #define LIBNAME "neoversen2"
  1294. #define CORENAME "NEOVERSEN2"
  1295. #endif
  1296. #ifdef FORCE_CORTEXA55
  1297. #define FORCE
  1298. #define ARCHITECTURE "ARM64"
  1299. #define SUBARCHITECTURE "CORTEXA55"
  1300. #define SUBDIRNAME "arm64"
  1301. #define ARCHCONFIG "-DCORTEXA55 " \
  1302. "-DL1_CODE_SIZE=16384 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=3 " \
  1303. "-DL1_DATA_SIZE=16384 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=2 " \
  1304. "-DL2_SIZE=65536 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
  1305. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1306. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1307. #define LIBNAME "cortexa55"
  1308. #define CORENAME "CORTEXA55"
  1309. #endif
  1310. #ifdef FORCE_FALKOR
  1311. #define FORCE
  1312. #define ARCHITECTURE "ARM64"
  1313. #define SUBARCHITECTURE "FALKOR"
  1314. #define SUBDIRNAME "arm64"
  1315. #define ARCHCONFIG "-DFALKOR " \
  1316. "-DL1_CODE_SIZE=49152 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=3 " \
  1317. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=2 " \
  1318. "-DL2_SIZE=2097152 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=16 " \
  1319. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1320. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1321. #define LIBNAME "falkor"
  1322. #define CORENAME "FALKOR"
  1323. #endif
  1324. #ifdef FORCE_THUNDERX
  1325. #define FORCE
  1326. #define ARCHITECTURE "ARM64"
  1327. #define SUBARCHITECTURE "THUNDERX"
  1328. #define SUBDIRNAME "arm64"
  1329. #define ARCHCONFIG "-DTHUNDERX " \
  1330. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=128 " \
  1331. "-DL2_SIZE=16777216 -DL2_LINESIZE=128 -DL2_ASSOCIATIVE=16 " \
  1332. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1333. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1334. #define LIBNAME "thunderx"
  1335. #define CORENAME "THUNDERX"
  1336. #endif
  1337. #ifdef FORCE_THUNDERX2T99
  1338. #define ARMV8
  1339. #define FORCE
  1340. #define ARCHITECTURE "ARM64"
  1341. #define SUBARCHITECTURE "THUNDERX2T99"
  1342. #define SUBDIRNAME "arm64"
  1343. #define ARCHCONFIG "-DTHUNDERX2T99 " \
  1344. "-DL1_CODE_SIZE=32768 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=8 " \
  1345. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=8 " \
  1346. "-DL2_SIZE=262144 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=8 " \
  1347. "-DL3_SIZE=33554432 -DL3_LINESIZE=64 -DL3_ASSOCIATIVE=32 " \
  1348. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1349. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1350. #define LIBNAME "thunderx2t99"
  1351. #define CORENAME "THUNDERX2T99"
  1352. #endif
  1353. #ifdef FORCE_TSV110
  1354. #define FORCE
  1355. #define ARCHITECTURE "ARM64"
  1356. #define SUBARCHITECTURE "TSV110"
  1357. #define SUBDIRNAME "arm64"
  1358. #define ARCHCONFIG "-DTSV110 " \
  1359. "-DL1_CODE_SIZE=65536 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=4 " \
  1360. "-DL1_DATA_SIZE=65536 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=4 " \
  1361. "-DL2_SIZE=524288 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=8 " \
  1362. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1363. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1364. #define LIBNAME "tsv110"
  1365. #define CORENAME "TSV110"
  1366. #endif
  1367. #ifdef FORCE_EMAG8180
  1368. #define ARMV8
  1369. #define FORCE
  1370. #define ARCHITECTURE "ARM64"
  1371. #define SUBARCHITECTURE "EMAG8180"
  1372. #define SUBDIRNAME "arm64"
  1373. #define ARCHCONFIG "-DEMAG8180 " \
  1374. "-DL1_CODE_SIZE=32768 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=8 " \
  1375. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=8 " \
  1376. "-DL2_SIZE=262144 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=8 " \
  1377. "-DL3_SIZE=33554432 -DL3_LINESIZE=64 -DL3_ASSOCIATIVE=32 " \
  1378. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1379. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1380. #define LIBNAME "emag8180"
  1381. #define CORENAME "EMAG8180"
  1382. #endif
  1383. #ifdef FORCE_THUNDERX3T110
  1384. #define ARMV8
  1385. #define FORCE
  1386. #define ARCHITECTURE "ARM64"
  1387. #define SUBARCHITECTURE "THUNDERX3T110"
  1388. #define SUBDIRNAME "arm64"
  1389. #define ARCHCONFIG "-DTHUNDERX3T110 " \
  1390. "-DL1_CODE_SIZE=65536 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=8 " \
  1391. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=8 " \
  1392. "-DL2_SIZE=524288 -DL2_LINESIZE=64 -DL2_ASSOCIATIVE=8 " \
  1393. "-DL3_SIZE=94371840 -DL3_LINESIZE=64 -DL3_ASSOCIATIVE=32 " \
  1394. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1395. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1396. #define LIBNAME "thunderx3t110"
  1397. #define CORENAME "THUNDERX3T110"
  1398. #endif
  1399. #ifdef FORCE_VORTEX
  1400. #define FORCE
  1401. #define ARCHITECTURE "ARM64"
  1402. #define SUBARCHITECTURE "VORTEX"
  1403. #define SUBDIRNAME "arm64"
  1404. #define ARCHCONFIG "-DVORTEX " \
  1405. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 " \
  1406. "-DL2_SIZE=262144 -DL2_LINESIZE=64 " \
  1407. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=32 " \
  1408. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1409. #define LIBNAME "vortex"
  1410. #define CORENAME "VORTEX"
  1411. #endif
  1412. #ifdef FORCE_A64FX
  1413. #define ARMV8
  1414. #define FORCE
  1415. #define ARCHITECTURE "ARM64"
  1416. #define SUBARCHITECTURE "A64FX"
  1417. #define SUBDIRNAME "arm64"
  1418. #define ARCHCONFIG "-DA64FX " \
  1419. "-DL1_CODE_SIZE=65536 -DL1_CODE_LINESIZE=256 -DL1_CODE_ASSOCIATIVE=8 " \
  1420. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=256 -DL1_DATA_ASSOCIATIVE=8 " \
  1421. "-DL2_SIZE=8388608 -DL2_LINESIZE=256 -DL2_ASSOCIATIVE=8 " \
  1422. "-DL3_SIZE=0 -DL3_LINESIZE=0 -DL3_ASSOCIATIVE=0 " \
  1423. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1424. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DHAVE_SVE -DARMV8"
  1425. #define LIBNAME "a64fx"
  1426. #define CORENAME "A64FX"
  1427. #endif
  1428. #ifdef FORCE_FT2000
  1429. #define ARMV8
  1430. #define FORCE
  1431. #define ARCHITECTURE "ARM64"
  1432. #define SUBARCHITECTURE "FT2000"
  1433. #define SUBDIRNAME "arm64"
  1434. #define ARCHCONFIG "-DFT2000 " \
  1435. "-DL1_CODE_SIZE=32768 -DL1_CODE_LINESIZE=64 -DL1_CODE_ASSOCIATIVE=8 " \
  1436. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=64 -DL1_DATA_ASSOCIATIVE=8 " \
  1437. "-DL2_SIZE=33554426-DL2_LINESIZE=64 -DL2_ASSOCIATIVE=8 " \
  1438. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 " \
  1439. "-DHAVE_VFPV4 -DHAVE_VFPV3 -DHAVE_VFP -DHAVE_NEON -DARMV8"
  1440. #define LIBNAME "ft2000"
  1441. #define CORENAME "FT2000"
  1442. #endif
  1443. #ifdef FORCE_ZARCH_GENERIC
  1444. #define FORCE
  1445. #define ARCHITECTURE "ZARCH"
  1446. #define SUBARCHITECTURE "ZARCH_GENERIC"
  1447. #define ARCHCONFIG "-DZARCH_GENERIC " \
  1448. "-DDTB_DEFAULT_ENTRIES=64"
  1449. #define LIBNAME "zarch_generic"
  1450. #define CORENAME "ZARCH_GENERIC"
  1451. #endif
  1452. #ifdef FORCE_Z13
  1453. #define FORCE
  1454. #define ARCHITECTURE "ZARCH"
  1455. #define SUBARCHITECTURE "Z13"
  1456. #define ARCHCONFIG "-DZ13 " \
  1457. "-DDTB_DEFAULT_ENTRIES=64"
  1458. #define LIBNAME "z13"
  1459. #define CORENAME "Z13"
  1460. #endif
  1461. #ifdef FORCE_Z14
  1462. #define FORCE
  1463. #define ARCHITECTURE "ZARCH"
  1464. #define SUBARCHITECTURE "Z14"
  1465. #define ARCHCONFIG "-DZ14 " \
  1466. "-DDTB_DEFAULT_ENTRIES=64"
  1467. #define LIBNAME "z14"
  1468. #define CORENAME "Z14"
  1469. #endif
  1470. #ifdef FORCE_C910V
  1471. #define FORCE
  1472. #define ARCHITECTURE "RISCV64"
  1473. #ifdef NO_RV64GV
  1474. #define SUBARCHITECTURE "RISCV64_GENERIC"
  1475. #define SUBDIRNAME "riscv64"
  1476. #define ARCHCONFIG "-DRISCV64_GENERIC " \
  1477. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  1478. "-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
  1479. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 "
  1480. #define LIBNAME "riscv64_generic"
  1481. #define CORENAME "RISCV64_GENERIC"
  1482. #else
  1483. #define SUBARCHITECTURE "C910V"
  1484. #define SUBDIRNAME "riscv64"
  1485. #define ARCHCONFIG "-DC910V " \
  1486. "-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
  1487. "-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
  1488. "-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 "
  1489. #define LIBNAME "c910v"
  1490. #define CORENAME "C910V"
  1491. #endif
  1492. #else
  1493. #endif
  1494. #if defined(FORCE_E2K) || defined(__e2k__)
  1495. #define FORCE
  1496. #define ARCHITECTURE "E2K"
  1497. #define ARCHCONFIG "-DGENERIC " \
  1498. "-DL1_DATA_SIZE=16384 -DL1_DATA_LINESIZE=64 " \
  1499. "-DL2_SIZE=524288 -DL2_LINESIZE=64 " \
  1500. "-DDTB_DEFAULT_ENTRIES=64 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=8 "
  1501. #define LIBNAME "generic"
  1502. #define CORENAME "generic"
  1503. #endif
  1504. #ifndef FORCE
  1505. #ifdef USER_TARGET
  1506. #error "The TARGET specified on the command line or in Makefile.rule is not supported. Please choose a target from TargetList.txt"
  1507. #endif
  1508. #if defined(__powerpc__) || defined(__powerpc) || defined(powerpc) || \
  1509. defined(__PPC__) || defined(PPC) || defined(_POWER) || defined(__POWERPC__)
  1510. #ifndef POWER
  1511. #define POWER
  1512. #endif
  1513. #define OPENBLAS_SUPPORTED
  1514. #endif
  1515. #if defined(__zarch__) || defined(__s390x__)
  1516. #define ZARCH
  1517. #include "cpuid_zarch.c"
  1518. #define OPENBLAS_SUPPORTED
  1519. #endif
  1520. #ifdef INTEL_AMD
  1521. #include "cpuid_x86.c"
  1522. #define OPENBLAS_SUPPORTED
  1523. #endif
  1524. #ifdef __ia64__
  1525. #include "cpuid_ia64.c"
  1526. #define OPENBLAS_SUPPORTED
  1527. #endif
  1528. #ifdef __alpha
  1529. #include "cpuid_alpha.c"
  1530. #define OPENBLAS_SUPPORTED
  1531. #endif
  1532. #ifdef POWER
  1533. #include "cpuid_power.c"
  1534. #define OPENBLAS_SUPPORTED
  1535. #endif
  1536. #ifdef sparc
  1537. #include "cpuid_sparc.c"
  1538. #define OPENBLAS_SUPPORTED
  1539. #endif
  1540. #ifdef __mips__
  1541. #ifdef __mips64
  1542. #include "cpuid_mips64.c"
  1543. #else
  1544. #include "cpuid_mips.c"
  1545. #endif
  1546. #define OPENBLAS_SUPPORTED
  1547. #endif
  1548. #ifdef __loongarch64
  1549. #include "cpuid_loongarch64.c"
  1550. #define OPENBLAS_SUPPORTED
  1551. #endif
  1552. #ifdef __riscv
  1553. #include "cpuid_riscv64.c"
  1554. #define OPENBLAS_SUPPORTED
  1555. #endif
  1556. #ifdef __arm__
  1557. #include "cpuid_arm.c"
  1558. #define OPENBLAS_SUPPORTED
  1559. #endif
  1560. #ifdef __aarch64__
  1561. #include "cpuid_arm64.c"
  1562. #define OPENBLAS_SUPPORTED
  1563. #endif
  1564. #ifndef OPENBLAS_SUPPORTED
  1565. #error "This arch/CPU is not supported by OpenBLAS."
  1566. #endif
  1567. #else
  1568. #endif
  1569. static int get_num_cores(void) {
  1570. int count;
  1571. #ifdef OS_WINDOWS
  1572. SYSTEM_INFO sysinfo;
  1573. #elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__APPLE__)
  1574. int m[2];
  1575. size_t len;
  1576. #endif
  1577. #if defined(linux) || defined(__sun__)
  1578. //returns the number of processors which are currently online
  1579. count = sysconf(_SC_NPROCESSORS_CONF);
  1580. if (count <= 0) count = 2;
  1581. return count;
  1582. #elif defined(OS_WINDOWS)
  1583. GetSystemInfo(&sysinfo);
  1584. return sysinfo.dwNumberOfProcessors;
  1585. #elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__APPLE__)
  1586. m[0] = CTL_HW;
  1587. m[1] = HW_NCPU;
  1588. len = sizeof(int);
  1589. sysctl(m, 2, &count, &len, NULL, 0);
  1590. if (count <= 0) count = 2;
  1591. return count;
  1592. #elif defined(AIX)
  1593. //returns the number of processors which are currently online
  1594. count = sysconf(_SC_NPROCESSORS_ONLN);
  1595. if (count <= 0) count = 2;
  1596. #else
  1597. return 2;
  1598. #endif
  1599. }
  1600. int main(int argc, char *argv[]){
  1601. #ifdef FORCE
  1602. char buffer[8192], *p, *q;
  1603. int length;
  1604. #endif
  1605. if (argc == 1) return 0;
  1606. switch (argv[1][0]) {
  1607. case '0' : /* for Makefile */
  1608. #ifdef FORCE
  1609. printf("CORE=%s\n", CORENAME);
  1610. #else
  1611. #if defined(INTEL_AMD) || defined(POWER) || defined(__mips__) || defined(__arm__) || defined(__aarch64__) || defined(ZARCH) || defined(sparc) || defined(__loongarch__) || defined(__riscv)
  1612. printf("CORE=%s\n", get_corename());
  1613. #endif
  1614. #endif
  1615. #ifdef FORCE
  1616. printf("LIBCORE=%s\n", LIBNAME);
  1617. #else
  1618. printf("LIBCORE=");
  1619. get_libname();
  1620. printf("\n");
  1621. #endif
  1622. printf("NUM_CORES=%d\n", get_num_cores());
  1623. #if defined(__arm__)
  1624. #if !defined(FORCE)
  1625. fprintf(stderr,"get features!\n");
  1626. get_features();
  1627. #else
  1628. fprintf(stderr,"split archconfig!\n");
  1629. sprintf(buffer, "%s", ARCHCONFIG);
  1630. p = &buffer[0];
  1631. while (*p) {
  1632. if ((*p == '-') && (*(p + 1) == 'D')) {
  1633. p += 2;
  1634. if (*p != 'H') {
  1635. while( (*p != ' ') && (*p != '-') && (*p != '\0') && (*p != '\n')) {p++; }
  1636. if (*p == '-') continue;
  1637. }
  1638. while ((*p != ' ') && (*p != '\0')) {
  1639. if (*p == '=') {
  1640. printf("=");
  1641. p ++;
  1642. while ((*p != ' ') && (*p != '\0')) {
  1643. printf("%c", *p);
  1644. p ++;
  1645. }
  1646. } else {
  1647. printf("%c", *p);
  1648. p ++;
  1649. if ((*p == ' ') || (*p =='\0')) printf("=1\n");
  1650. }
  1651. }
  1652. } else p ++;
  1653. }
  1654. #endif
  1655. #endif
  1656. #ifdef INTEL_AMD
  1657. #ifndef FORCE
  1658. get_sse();
  1659. #else
  1660. sprintf(buffer, "%s", ARCHCONFIG);
  1661. p = &buffer[0];
  1662. while (*p) {
  1663. if ((*p == '-') && (*(p + 1) == 'D')) {
  1664. p += 2;
  1665. while ((*p != ' ') && (*p != '\0')) {
  1666. if (*p == '=') {
  1667. printf("=");
  1668. p ++;
  1669. while ((*p != ' ') && (*p != '\0')) {
  1670. printf("%c", *p);
  1671. p ++;
  1672. }
  1673. } else {
  1674. printf("%c", *p);
  1675. p ++;
  1676. if ((*p == ' ') || (*p =='\0')) printf("=1");
  1677. }
  1678. }
  1679. printf("\n");
  1680. } else p ++;
  1681. }
  1682. #endif
  1683. #endif
  1684. #if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
  1685. printf("__BYTE_ORDER__=__ORDER_BIG_ENDIAN__\n");
  1686. #elif defined(__BIG_ENDIAN__) && __BIG_ENDIAN__ > 0
  1687. printf("__BYTE_ORDER__=__ORDER_BIG_ENDIAN__\n");
  1688. #endif
  1689. #if defined(_CALL_ELF) && (_CALL_ELF == 2)
  1690. printf("ELF_VERSION=2\n");
  1691. #endif
  1692. #ifdef MAKE_NB_JOBS
  1693. #if MAKE_NB_JOBS > 0
  1694. printf("MAKE += -j %d\n", MAKE_NB_JOBS);
  1695. #else
  1696. // Let make use parent -j argument or -j1 if there
  1697. // is no make parent
  1698. #endif
  1699. #elif NO_PARALLEL_MAKE==1
  1700. printf("MAKE += -j 1\n");
  1701. #else
  1702. printf("MAKE += -j %d\n", get_num_cores());
  1703. #endif
  1704. break;
  1705. case '1' : /* For config.h */
  1706. #ifdef FORCE
  1707. sprintf(buffer, "%s -DCORE_%s\n", ARCHCONFIG, CORENAME);
  1708. p = &buffer[0];
  1709. while (*p) {
  1710. if ((*p == '-') && (*(p + 1) == 'D')) {
  1711. p += 2;
  1712. printf("#define ");
  1713. while ((*p != ' ') && (*p != '\0')) {
  1714. if (*p == '=') {
  1715. printf(" ");
  1716. p ++;
  1717. while ((*p != ' ') && (*p != '\0')) {
  1718. printf("%c", *p);
  1719. p ++;
  1720. }
  1721. } else {
  1722. if (*p != '\n')
  1723. printf("%c", *p);
  1724. p ++;
  1725. }
  1726. }
  1727. printf("\n");
  1728. } else p ++;
  1729. }
  1730. #else
  1731. get_cpuconfig();
  1732. #endif
  1733. #ifdef FORCE
  1734. printf("#define CHAR_CORENAME \"%s\"\n", CORENAME);
  1735. #else
  1736. #if defined(INTEL_AMD) || defined(POWER) || defined(__mips__) || defined(__arm__) || defined(__aarch64__) || defined(ZARCH) || defined(sparc) || defined(__loongarch__) || defined(__riscv)
  1737. printf("#define CHAR_CORENAME \"%s\"\n", get_corename());
  1738. #endif
  1739. #endif
  1740. break;
  1741. case '2' : /* SMP */
  1742. if (get_num_cores() > 1) printf("SMP=1\n");
  1743. break;
  1744. }
  1745. fflush(stdout);
  1746. return 0;
  1747. }