Skip to content

Commit

Permalink
Add support for x86-64 microarchitecture levels (#31)
Browse files Browse the repository at this point in the history
Introduced definitions for the x86-64 microarchitecture levels:

- x86-64-v2 (basically an alias to nehalem with generic tuning)
- x86-64-v3 (alias to haswell with generic tuning)
- x86-64-v4 (alias to skylake_avx512 with generic tuning)

Added compiler flags also for gcc < 11.1 and clang < 12.0.
  • Loading branch information
pikacic authored May 20, 2021
1 parent a2b7f57 commit de43aab
Showing 1 changed file with 166 additions and 6 deletions.
172 changes: 166 additions & 6 deletions cpu/microarchitectures.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,166 @@
]
}
},
"x86_64_v2": {
"from": ["x86_64"],
"vendor": "generic",
"features": [
"cx16",
"lahf_lm",
"mmx",
"sse",
"sse2",
"ssse3",
"sse4_1",
"sse4_2",
"popcnt"
],
"compilers": {
"gcc": [
{
"versions": "11.1:",
"name": "x86-64-v2",
"flags": "-march={name} -mtune=generic"
},
{
"versions": "4.6:11.0",
"name": "x86-64",
"flags": "-march={name} -mtune=generic -mcx16 -msahf -mpopcnt -msse3 -msse4.1 -msse4.2 -mssse3"
}
],
"clang": [
{
"versions": "12.0:",
"name": "x86-64-v2",
"flags": "-march={name} -mtune=generic"
},
{
"versions": "3.9:11.1",
"name": "x86-64",
"flags": "-march={name} -mtune=generic -mcx16 -msahf -mpopcnt -msse3 -msse4.1 -msse4.2 -mssse3"
}
]
}
},
"x86_64_v3": {
"from": ["x86_64_v2"],
"vendor": "generic",
"features": [
"cx16",
"lahf_lm",
"mmx",
"sse",
"sse2",
"ssse3",
"sse4_1",
"sse4_2",
"popcnt",
"avx",
"avx2",
"bmi1",
"bmi2",
"f16c",
"fma",
"abm",
"movbe",
"xsave"
],
"compilers": {
"gcc": [
{
"versions": "11.1:",
"name": "x86-64-v3",
"flags": "-march={name} -mtune=generic"
},
{
"versions": "4.8:11.0",
"name": "x86-64",
"flags": "-march={name} -mtune=generic -mcx16 -msahf -mpopcnt -msse3 -msse4.1 -msse4.2 -mssse3 -mavx -mavx2 -mbmi -mbmi2 -mf16c -mfma -mlzcnt -mmovbe -mxsave"
}
],
"clang": [
{
"versions": "12.0:",
"name": "x86-64-v3",
"flags": "-march={name} -mtune=generic"
},
{
"versions": "3.9:11.1",
"name": "x86-64",
"flags": "-march={name} -mtune=generic -mcx16 -msahf -mpopcnt -msse3 -msse4.1 -msse4.2 -mssse3 -mavx -mavx2 -mbmi -mbmi2 -mf16c -mfma -mlzcnt -mmovbe -mxsave"
}
],
"apple-clang": [
{
"versions": "8.0:",
"name": "x86-64",
"flags": "-march={name} -mtune=generic -mcx16 -msahf -mpopcnt -msse3 -msse4.1 -msse4.2 -mssse3 -mavx -mavx2 -mbmi -mbmi2 -mf16c -mfma -mlzcnt -mmovbe -mxsave"
}
]
}
},
"x86_64_v4": {
"from": ["x86_64_v3"],
"vendor": "generic",
"features": [
"cx16",
"lahf_lm",
"mmx",
"sse",
"sse2",
"ssse3",
"sse4_1",
"sse4_2",
"popcnt",
"avx",
"avx2",
"bmi1",
"bmi2",
"f16c",
"fma",
"abm",
"movbe",
"xsave",
"avx512f",
"avx512bw",
"avx512cd",
"avx512dq",
"avx512vl"
],
"compilers": {
"gcc": [
{
"versions": "11.1:",
"name": "x86-64-v4",
"flags": "-march={name} -mtune=generic"
},
{
"versions": "6.0:11.0",
"name": "x86-64",
"flags": "-march={name} -mtune=generic -mcx16 -msahf -mpopcnt -msse3 -msse4.1 -msse4.2 -mssse3 -mavx -mavx2 -mbmi -mbmi2 -mf16c -mfma -mlzcnt -mmovbe -mxsave -mavx512f -mavx512bw -mavx512cd -mavx512dq -mavx512vl"
}
],
"clang": [
{
"versions": "12.0:",
"name": "x86-64-v4",
"flags": "-march={name} -mtune=generic"
},
{
"versions": "3.9:11.1",
"name": "x86-64",
"flags": "-march={name} -mtune=generic -mcx16 -msahf -mpopcnt -msse3 -msse4.1 -msse4.2 -mssse3 -mavx -mavx2 -mbmi -mbmi2 -mf16c -mfma -mlzcnt -mmovbe -mxsave -mavx512f -mavx512bw -mavx512cd -mavx512dq -mavx512vl"
}
],
"apple-clang": [
{
"versions": "8.0:",
"name": "x86-64",
"flags": "-march={name} -mtune=generic -mcx16 -msahf -mpopcnt -msse3 -msse4.1 -msse4.2 -mssse3 -mavx -mavx2 -mbmi -mbmi2 -mf16c -mfma -mlzcnt -mmovbe -mxsave -mavx512f -mavx512bw -mavx512cd -mavx512dq -mavx512vl"
}
]
}
},
"nocona": {
"from": ["x86_64"],
"vendor": "GenuineIntel",
Expand Down Expand Up @@ -177,7 +337,7 @@
}
},
"nehalem": {
"from": ["core2"],
"from": ["core2", "x86_64_v2"],
"vendor": "GenuineIntel",
"features": [
"mmx",
Expand Down Expand Up @@ -394,7 +554,7 @@
}
},
"haswell": {
"from": ["ivybridge"],
"from": ["ivybridge", "x86_64_v3"],
"vendor": "GenuineIntel",
"features": [
"mmx",
Expand Down Expand Up @@ -642,7 +802,7 @@
}
},
"skylake_avx512": {
"from": ["skylake"],
"from": ["skylake", "x86_64_v4"],
"vendor": "GenuineIntel",
"features": [
"mmx",
Expand Down Expand Up @@ -986,7 +1146,7 @@
}
},
"bulldozer": {
"from": ["x86_64"],
"from": ["x86_64_v2"],
"vendor": "AuthenticAMD",
"features": [
"mmx",
Expand Down Expand Up @@ -1145,7 +1305,7 @@
}
},
"excavator": {
"from": ["steamroller"],
"from": ["steamroller", "x86_64_v3"],
"vendor": "AuthenticAMD",
"features": [
"mmx",
Expand Down Expand Up @@ -1204,7 +1364,7 @@
}
},
"zen": {
"from": ["x86_64"],
"from": ["x86_64_v3"],
"vendor": "AuthenticAMD",
"features": [
"bmi1",
Expand Down

0 comments on commit de43aab

Please sign in to comment.