Implement AVX2 flags for GCC and MSC
This commit is contained in:
parent
d61b995683
commit
d34021bcc9
@ -864,6 +864,7 @@
|
||||
allowed = {
|
||||
"Default",
|
||||
"AVX",
|
||||
"AVX2",
|
||||
"SSE",
|
||||
"SSE2",
|
||||
}
|
||||
|
@ -69,6 +69,7 @@
|
||||
},
|
||||
vectorextensions = {
|
||||
AVX = "-mavx",
|
||||
AVX2 = "-mavx2",
|
||||
SSE = "-msse",
|
||||
SSE2 = "-msse2",
|
||||
},
|
||||
|
@ -54,8 +54,9 @@
|
||||
},
|
||||
vectorextensions = {
|
||||
AVX = "/arch:AVX",
|
||||
SSE = "/arch:sse",
|
||||
SSE2 = "/arch:sse2",
|
||||
AVX2 = "/arch:AVX2",
|
||||
SSE = "/arch:SSE",
|
||||
SSE2 = "/arch:SSE2",
|
||||
},
|
||||
warnings = {
|
||||
Extra = "/W4",
|
||||
|
@ -123,6 +123,18 @@
|
||||
test.contains({ "-msse2" }, gcc.getcflags(cfg))
|
||||
end
|
||||
|
||||
function suite.cflags_onAVX()
|
||||
vectorextensions "AVX"
|
||||
prepare()
|
||||
test.contains({ "-mavx" }, gcc.getcflags(cfg))
|
||||
end
|
||||
|
||||
function suite.cflags_onAVX()
|
||||
vectorextensions "AVX2"
|
||||
prepare()
|
||||
test.contains({ "-mavx2" }, gcc.getcflags(cfg))
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Check the defines and undefines.
|
||||
|
@ -167,13 +167,25 @@
|
||||
function suite.cflags_onSSE()
|
||||
vectorextensions "SSE"
|
||||
prepare()
|
||||
test.contains("/arch:sse", msc.getcflags(cfg))
|
||||
test.contains("/arch:SSE", msc.getcflags(cfg))
|
||||
end
|
||||
|
||||
function suite.cflags_onSSE2()
|
||||
vectorextensions "SSE2"
|
||||
prepare()
|
||||
test.contains("/arch:sse2", msc.getcflags(cfg))
|
||||
test.contains("/arch:SSE2", msc.getcflags(cfg))
|
||||
end
|
||||
|
||||
function suite.cflags_onAVX()
|
||||
vectorextensions "AVX"
|
||||
prepare()
|
||||
test.contains("/arch:AVX", msc.getcflags(cfg))
|
||||
end
|
||||
|
||||
function suite.cflags_onAVX2()
|
||||
vectorextensions "AVX2"
|
||||
prepare()
|
||||
test.contains("/arch:AVX2", msc.getcflags(cfg))
|
||||
end
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user