Commit d567f413 authored by Wez's avatar Wez Committed by Commit Bot

Disable querying of CPU info under ARM64.

There are currently no decisions based on the CPU implementor, variant
or part values for ARM64, and the code to fetch those values was not
compatible with Fuchsia/ARM64.

Bug: chromium:772031
Change-Id: I2305fc7a97d8c0a24bb0ad115447665976e5814a
Reviewed-on: https://chromium-review.googlesource.com/706642Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Reviewed-by: 's avatarRodolph Perfetta <rodolph.perfetta@arm.com>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48472}
parent 15609882
......@@ -75,8 +75,7 @@ static V8_INLINE void __cpuid(int cpu_info[4], int info_type) {
#endif // !V8_LIBC_MSVCRT
#elif V8_HOST_ARCH_ARM || V8_HOST_ARCH_ARM64 \
|| V8_HOST_ARCH_MIPS || V8_HOST_ARCH_MIPS64
#elif V8_HOST_ARCH_ARM || V8_HOST_ARCH_MIPS || V8_HOST_ARCH_MIPS64
#if V8_OS_LINUX
......@@ -176,7 +175,7 @@ int __detect_mips_arch_revision(void) {
// Fall-back to the least common denominator which is mips32 revision 1.
return result ? 1 : 6;
}
#endif
#endif // V8_HOST_ARCH_MIPS
// Extract the information exposed by the kernel via /proc/cpuinfo.
class CPUInfo final {
......@@ -270,8 +269,6 @@ class CPUInfo final {
size_t datalen_;
};
#if V8_HOST_ARCH_ARM || V8_HOST_ARCH_MIPS || V8_HOST_ARCH_MIPS64
// Checks that a space-separated list of items contains one given 'item'.
static bool HasListItem(const char* list, const char* item) {
ssize_t item_len = strlen(item);
......@@ -296,11 +293,9 @@ static bool HasListItem(const char* list, const char* item) {
return false;
}
#endif // V8_HOST_ARCH_ARM || V8_HOST_ARCH_MIPS || V8_HOST_ARCH_MIPS64
#endif // V8_OS_LINUX
#endif // V8_HOST_ARCH_IA32 || V8_HOST_ARCH_X64
#endif // V8_HOST_ARCH_ARM || V8_HOST_ARCH_MIPS || V8_HOST_ARCH_MIPS64
CPU::CPU()
: stepping_(0),
......@@ -606,40 +601,7 @@ CPU::CPU()
#endif
#elif V8_HOST_ARCH_ARM64
CPUInfo cpu_info;
// Extract implementor from the "CPU implementer" field.
char* implementer = cpu_info.ExtractField("CPU implementer");
if (implementer != NULL) {
char* end;
implementer_ = static_cast<int>(strtol(implementer, &end, 0));
if (end == implementer) {
implementer_ = 0;
}
delete[] implementer;
}
char* variant = cpu_info.ExtractField("CPU variant");
if (variant != NULL) {
char* end;
variant_ = static_cast<int>(strtol(variant, &end, 0));
if (end == variant) {
variant_ = -1;
}
delete[] variant;
}
// Extract part number from the "CPU part" field.
char* part = cpu_info.ExtractField("CPU part");
if (part != NULL) {
char* end;
part_ = static_cast<int>(strtol(part, &end, 0));
if (end == part) {
part_ = 0;
}
delete[] part;
}
// Implementer, variant and part are currently unused under ARM64.
#elif V8_HOST_ARCH_PPC
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment