// Define GOMIPS64_value from gomips64.
asmArgs = append(asmArgs, "-D", "GOMIPS64_"+gomips64)
}
+ if goarch == "ppc64" || goarch == "ppc64le" {
+ // We treat each powerpc version as a superset of functionality.
+ switch goppc64 {
+ case "power10":
+ asmArgs = append(asmArgs, "-D", "GOPPC64_power10")
+ fallthrough
+ case "power9":
+ asmArgs = append(asmArgs, "-D", "GOPPC64_power9")
+ fallthrough
+ default: // This should always be power8.
+ asmArgs = append(asmArgs, "-D", "GOPPC64_power8")
+ }
+ }
goasmh := pathf("%s/go_asm.h", workdir)
if IsRuntimePackagePath(pkg) {
asmArgs = append(asmArgs, "-compiling-runtime")
args = append(args, "-D", "GOMIPS64_"+cfg.GOMIPS64)
}
+ if cfg.Goarch == "ppc64" || cfg.Goarch == "ppc64le" {
+ // Define GOPPC64_power8..N from cfg.PPC64.
+ // We treat each powerpc version as a superset of functionality.
+ switch cfg.GOPPC64 {
+ case "power10":
+ args = append(args, "-D", "GOPPC64_power10")
+ fallthrough
+ case "power9":
+ args = append(args, "-D", "GOPPC64_power9")
+ fallthrough
+ default: // This should always be power8.
+ args = append(args, "-D", "GOPPC64_power8")
+ }
+ }
+
return args
}