Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Unified Diff: src/base/cpu.cc

Issue 866843003: Contribution of PowerPC port (continuation of 422063005) - AIX Common1 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address second set of comments Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/base/atomicops.h ('k') | src/base/logging.h » ('j') | src/serialize.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/base/cpu.cc
diff --git a/src/base/cpu.cc b/src/base/cpu.cc
index fa212e0e045b572078f9782cbbc49020d00f4cb7..84cd231f611f206f17d5fed7fddda7942b83e20a 100644
--- a/src/base/cpu.cc
+++ b/src/base/cpu.cc
@@ -19,6 +19,12 @@
#if V8_OS_LINUX && V8_HOST_ARCH_PPC
#include <elf.h>
#endif
+#if V8_OS_AIX
+#include <sys/systemcfg.h> // _system_configuration
+#ifndef POWER_8
+#define POWER_8 0x10000
+#endif
+#endif
#if V8_OS_POSIX
#include <unistd.h> // sysconf()
#endif
@@ -654,7 +660,22 @@ CPU::CPU()
}
}
-#endif // V8_OS_LINUX
+#elif V8_OS_AIX
+ switch (_system_configuration.implementation) {
+ case POWER_8:
+ part_ = PPC_POWER8;
+ break;
+ case POWER_7:
+ part_ = PPC_POWER7;
+ break;
+ case POWER_6:
+ part_ = PPC_POWER6;
+ break;
+ case POWER_5:
+ part_ = PPC_POWER5;
+ break;
+ }
+#endif // V8_OS_AIX
#endif // !USE_SIMULATOR
#endif // V8_HOST_ARCH_PPC
}
« no previous file with comments | « src/base/atomicops.h ('k') | src/base/logging.h » ('j') | src/serialize.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698