diff options
| author | ruki <[email protected]> | 2023-07-26 23:02:44 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-07-26 23:02:44 +0800 |
| commit | 2ced205fec82c50143fe0fbbbfdb31d52e7aeebe (patch) | |
| tree | fe1723a4ef01aaf871cc832576c64400dd8e2934 /xmake/modules/core/tools/gcc.lua | |
| parent | db47073a5ec27a85073d67c03e38c7bd55598598 (diff) | |
| parent | 1bf614da70028c2f1316d0ec6e22cd39dd8540aa (diff) | |
Merge pull request #4012 from xmake-io/avx512
add avx512 for vectorext
Diffstat (limited to 'xmake/modules/core/tools/gcc.lua')
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index 60f6ac805..b45c04119 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -164,17 +164,21 @@ function nf_optimize(self, level) end -- make the vector extension flag +-- @see https://github.com/xmake-io/xmake/issues/1613 function nf_vectorext(self, extension) local maps = { - mmx = "-mmmx" - , sse = "-msse" - , sse2 = "-msse2" - , sse3 = "-msse3" - , ssse3 = "-mssse3" - , avx = "-mavx" - , avx2 = "-mavx2" - , fma = "-mfma" - , neon = "-mfpu=neon" + mmx = "-mmmx" + , sse = "-msse" + , sse2 = "-msse2" + , sse3 = "-msse3" + , ssse3 = "-mssse3" + , ["sse4.2"] = "-msse4.2" + , avx = "-mavx" + , avx2 = "-mavx2" + , avx512 = {"-mavx512f", "-mavx512dq", "-mavx512bw", "-mavx512vl"} + , fma = "-mfma" + , neon = "-mfpu=neon" + , all = "-march=native" } return maps[extension] end |
