Commit 8ef8f58b authored by sigurds@chromium.org's avatar sigurds@chromium.org

Add ARMv8 detection in CpuFeatures.

R=rodolph.perfetta@arm.com, ulan@chromium.org

Review URL: https://codereview.chromium.org/678313002

Cr-Commit-Position: refs/heads/master@{#24949}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24949 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b4799b8d
...@@ -109,6 +109,9 @@ void CpuFeatures::ProbeImpl(bool cross_compile) { ...@@ -109,6 +109,9 @@ void CpuFeatures::ProbeImpl(bool cross_compile) {
if (cpu.architecture() >= 7) { if (cpu.architecture() >= 7) {
if (FLAG_enable_armv7) supported_ |= 1u << ARMv7; if (FLAG_enable_armv7) supported_ |= 1u << ARMv7;
if (FLAG_enable_armv8 && cpu.architecture() >= 8) {
supported_ |= 1u << ARMv8;
}
if (FLAG_enable_unaligned_accesses) supported_ |= 1u << UNALIGNED_ACCESSES; if (FLAG_enable_unaligned_accesses) supported_ |= 1u << UNALIGNED_ACCESSES;
// Use movw/movt for QUALCOMM ARMv7 cores. // Use movw/movt for QUALCOMM ARMv7 cores.
if (FLAG_enable_movw_movt && cpu.implementer() == base::CPU::QUALCOMM) { if (FLAG_enable_movw_movt && cpu.implementer() == base::CPU::QUALCOMM) {
......
...@@ -114,6 +114,11 @@ struct MaybeBoolFlag { ...@@ -114,6 +114,11 @@ struct MaybeBoolFlag {
#else #else
#define ENABLE_ARMV7_DEFAULT false #define ENABLE_ARMV7_DEFAULT false
#endif #endif
#if (defined CAN_USE_ARMV8_INSTRUCTIONS) || !(defined ARM_TEST_NO_FEATURE_PROBE)
#define ENABLE_ARMV8_DEFAULT true
#else
#define ENABLE_ARMV8_DEFAULT false
#endif
#if (defined CAN_USE_VFP32DREGS) || !(defined ARM_TEST_NO_FEATURE_PROBE) #if (defined CAN_USE_VFP32DREGS) || !(defined ARM_TEST_NO_FEATURE_PROBE)
#define ENABLE_32DREGS_DEFAULT true #define ENABLE_32DREGS_DEFAULT true
#else #else
...@@ -402,6 +407,8 @@ DEFINE_BOOL(enable_vfp3, ENABLE_VFP3_DEFAULT, ...@@ -402,6 +407,8 @@ DEFINE_BOOL(enable_vfp3, ENABLE_VFP3_DEFAULT,
"enable use of VFP3 instructions if available") "enable use of VFP3 instructions if available")
DEFINE_BOOL(enable_armv7, ENABLE_ARMV7_DEFAULT, DEFINE_BOOL(enable_armv7, ENABLE_ARMV7_DEFAULT,
"enable use of ARMv7 instructions if available (ARM only)") "enable use of ARMv7 instructions if available (ARM only)")
DEFINE_BOOL(enable_armv8, ENABLE_ARMV8_DEFAULT,
"enable use of ARMv8 instructions if available (ARM 32-bit only)")
DEFINE_BOOL(enable_neon, ENABLE_NEON_DEFAULT, DEFINE_BOOL(enable_neon, ENABLE_NEON_DEFAULT,
"enable use of NEON instructions if available (ARM only)") "enable use of NEON instructions if available (ARM only)")
DEFINE_BOOL(enable_sudiv, true, DEFINE_BOOL(enable_sudiv, true,
......
...@@ -609,28 +609,29 @@ struct AccessorDescriptor { ...@@ -609,28 +609,29 @@ struct AccessorDescriptor {
// CPU feature flags. // CPU feature flags.
enum CpuFeature { enum CpuFeature {
// x86 // x86
SSE4_1, SSE4_1,
SSE3, SSE3,
SAHF, SAHF,
// ARM // ARM
VFP3, VFP3,
ARMv7, ARMv7,
SUDIV, ARMv8,
MLS, SUDIV,
UNALIGNED_ACCESSES, MLS,
MOVW_MOVT_IMMEDIATE_LOADS, UNALIGNED_ACCESSES,
VFP32DREGS, MOVW_MOVT_IMMEDIATE_LOADS,
NEON, VFP32DREGS,
// MIPS, MIPS64 NEON,
FPU, // MIPS, MIPS64
FP64FPU, FPU,
MIPSr1, FP64FPU,
MIPSr2, MIPSr1,
MIPSr6, MIPSr2,
// ARM64 MIPSr6,
ALWAYS_ALIGN_CSP, // ARM64
NUMBER_OF_CPU_FEATURES ALWAYS_ALIGN_CSP,
NUMBER_OF_CPU_FEATURES
}; };
......
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