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