nemanjai created this revision. nemanjai added reviewers: hfinkel, wschmidt, kbarton, amehsan, seurer, cycheng. nemanjai added a subscriber: cfe-commits. nemanjai set the repository for this revision to rL LLVM.
This patch simply adds support for the new CPU in anticipation of Power9. There isn't really any functionality added so there are no associated test cases at this time. Repository: rL LLVM http://reviews.llvm.org/D19684 Files: lib/Basic/Targets.cpp lib/Driver/Tools.cpp
Index: lib/Driver/Tools.cpp =================================================================== --- lib/Driver/Tools.cpp +++ lib/Driver/Tools.cpp @@ -1479,14 +1479,16 @@ .Case("power6x", "pwr6x") .Case("power7", "pwr7") .Case("power8", "pwr8") + .Case("power9", "pwr9") .Case("pwr3", "pwr3") .Case("pwr4", "pwr4") .Case("pwr5", "pwr5") .Case("pwr5x", "pwr5x") .Case("pwr6", "pwr6") .Case("pwr6x", "pwr6x") .Case("pwr7", "pwr7") .Case("pwr8", "pwr8") + .Case("pwr9", "pwr9") .Case("powerpc", "ppc") .Case("powerpc64", "ppc64") .Case("powerpc64le", "ppc64le") Index: lib/Basic/Targets.cpp =================================================================== --- lib/Basic/Targets.cpp +++ lib/Basic/Targets.cpp @@ -837,8 +837,9 @@ ArchDefinePwr6x = 1 << 10, ArchDefinePwr7 = 1 << 11, ArchDefinePwr8 = 1 << 12, - ArchDefineA2 = 1 << 13, - ArchDefineA2q = 1 << 14 + ArchDefinePwr9 = 1 << 13, + ArchDefineA2 = 1 << 14, + ArchDefineA2q = 1 << 15 } ArchDefineTypes; // Note: GCC recognizes the following additional cpus: @@ -887,6 +888,8 @@ .Case("pwr7", true) .Case("power8", true) .Case("pwr8", true) + .Case("power9", true) + .Case("pwr9", true) .Case("powerpc", true) .Case("ppc", true) .Case("powerpc64", true) @@ -1179,6 +1182,10 @@ .Case("pwr8", ArchDefineName | ArchDefinePwr7 | ArchDefinePwr6x | ArchDefinePwr6 | ArchDefinePwr5x | ArchDefinePwr5 | ArchDefinePwr4 | ArchDefinePpcgr | ArchDefinePpcsq) + .Case("pwr9", ArchDefineName | ArchDefinePwr8 | ArchDefinePwr7 + | ArchDefinePwr6x | ArchDefinePwr6 | ArchDefinePwr5x + | ArchDefinePwr5 | ArchDefinePwr4 | ArchDefinePpcgr + | ArchDefinePpcsq) .Case("power3", ArchDefinePpcgr) .Case("power4", ArchDefinePwr4 | ArchDefinePpcgr | ArchDefinePpcsq) .Case("power5", ArchDefinePwr5 | ArchDefinePwr4 | ArchDefinePpcgr @@ -1196,6 +1203,10 @@ .Case("power8", ArchDefinePwr8 | ArchDefinePwr7 | ArchDefinePwr6x | ArchDefinePwr6 | ArchDefinePwr5x | ArchDefinePwr5 | ArchDefinePwr4 | ArchDefinePpcgr | ArchDefinePpcsq) + .Case("power9", ArchDefinePwr9 | ArchDefinePwr8 | ArchDefinePwr7 + | ArchDefinePwr6x | ArchDefinePwr6 | ArchDefinePwr5x + | ArchDefinePwr5 | ArchDefinePwr4 | ArchDefinePpcgr + | ArchDefinePpcsq) .Default(ArchDefineNone); if (defs & ArchDefineName) @@ -1224,6 +1235,8 @@ Builder.defineMacro("_ARCH_PWR7"); if (defs & ArchDefinePwr8) Builder.defineMacro("_ARCH_PWR8"); + if (defs & ArchDefinePwr9) + Builder.defineMacro("_ARCH_PWR9"); if (defs & ArchDefineA2) Builder.defineMacro("_ARCH_A2"); if (defs & ArchDefineA2q) { @@ -1314,35 +1327,42 @@ .Case("pwr6", true) .Case("pwr7", true) .Case("pwr8", true) + .Case("pwr9", true) .Case("ppc64", true) .Case("ppc64le", true) .Default(false); Features["qpx"] = (CPU == "a2q"); Features["crypto"] = llvm::StringSwitch<bool>(CPU) .Case("ppc64le", true) + .Case("pwr9", true) .Case("pwr8", true) .Default(false); Features["power8-vector"] = llvm::StringSwitch<bool>(CPU) .Case("ppc64le", true) + .Case("pwr9", true) .Case("pwr8", true) .Default(false); Features["bpermd"] = llvm::StringSwitch<bool>(CPU) .Case("ppc64le", true) + .Case("pwr9", true) .Case("pwr8", true) .Case("pwr7", true) .Default(false); Features["extdiv"] = llvm::StringSwitch<bool>(CPU) .Case("ppc64le", true) + .Case("pwr9", true) .Case("pwr8", true) .Case("pwr7", true) .Default(false); Features["direct-move"] = llvm::StringSwitch<bool>(CPU) .Case("ppc64le", true) + .Case("pwr9", true) .Case("pwr8", true) .Default(false); Features["vsx"] = llvm::StringSwitch<bool>(CPU) .Case("ppc64le", true) + .Case("pwr9", true) .Case("pwr8", true) .Case("pwr7", true) .Default(false);
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits