| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file defines all of the flags. It is separated into different section, | 5 // This file defines all of the flags. It is separated into different section, |
| 6 // for Debug, Release, Logging and Profiling, etc. To add a new flag, find the | 6 // for Debug, Release, Logging and Profiling, etc. To add a new flag, find the |
| 7 // correct section, and use one of the DEFINE_ macros, without a trailing ';'. | 7 // correct section, and use one of the DEFINE_ macros, without a trailing ';'. |
| 8 // | 8 // |
| 9 // This include does not have a guard, because it is a template-style include, | 9 // This include does not have a guard, because it is a template-style include, |
| 10 // which can be included multiple times in different modes. It expects to have | 10 // which can be included multiple times in different modes. It expects to have |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 bool has_value; | 112 bool has_value; |
| 113 bool value; | 113 bool value; |
| 114 }; | 114 }; |
| 115 #endif | 115 #endif |
| 116 | 116 |
| 117 #ifdef DEBUG | 117 #ifdef DEBUG |
| 118 #define DEBUG_BOOL true | 118 #define DEBUG_BOOL true |
| 119 #else | 119 #else |
| 120 #define DEBUG_BOOL false | 120 #define DEBUG_BOOL false |
| 121 #endif | 121 #endif |
| 122 #if (defined CAN_USE_VFP3_INSTRUCTIONS) || !(defined ARM_TEST_NO_FEATURE_PROBE) | 122 |
| 123 #define ENABLE_VFP3_DEFAULT true | 123 // Supported ARM configurations are: |
| 124 // "armv6": ARMv6 + VFPv2 |
| 125 // "armv7": ARMv7 + VFPv3-D32 + NEON |
| 126 // "armv7+sudiv": ARMv7 + VFPv4-D32 + NEON + SUDIV |
| 127 // "armv8": ARMv8 (including all of the above) |
| 128 #if !defined(ARM_TEST_NO_FEATURE_PROBE) || \ |
| 129 (defined(CAN_USE_ARMV8_INSTRUCTIONS) && \ |
| 130 defined(CAN_USE_ARMV7_INSTRUCTIONS) && defined(CAN_USE_SUDIV) && \ |
| 131 defined(CAN_USE_NEON) && defined(CAN_USE_VFP3_INSTRUCTIONS)) |
| 132 #define ARM_ARCH_DEFAULT "armv8" |
| 133 #elif defined(CAN_USE_ARMV7_INSTRUCTIONS) && defined(CAN_USE_SUDIV) && \ |
| 134 defined(CAN_USE_NEON) && defined(CAN_USE_VFP3_INSTRUCTIONS) |
| 135 #define ARM_ARCH_DEFAULT "armv7+sudiv" |
| 136 #elif defined(CAN_USE_ARMV7_INSTRUCTIONS) && defined(CAN_USE_NEON) && \ |
| 137 defined(CAN_USE_VFP3_INSTRUCTIONS) |
| 138 #define ARM_ARCH_DEFAULT "armv7" |
| 124 #else | 139 #else |
| 125 #define ENABLE_VFP3_DEFAULT false | 140 #define ARM_ARCH_DEFAULT "armv6" |
| 126 #endif | 141 #endif |
| 127 #if (defined CAN_USE_ARMV7_INSTRUCTIONS) || !(defined ARM_TEST_NO_FEATURE_PROBE) | 142 |
| 128 #define ENABLE_ARMV7_DEFAULT true | |
| 129 #else | |
| 130 #define ENABLE_ARMV7_DEFAULT false | |
| 131 #endif | |
| 132 #if (defined CAN_USE_ARMV8_INSTRUCTIONS) || !(defined ARM_TEST_NO_FEATURE_PROBE) | |
| 133 #define ENABLE_ARMV8_DEFAULT true | |
| 134 #else | |
| 135 #define ENABLE_ARMV8_DEFAULT false | |
| 136 #endif | |
| 137 #if (defined CAN_USE_VFP32DREGS) || !(defined ARM_TEST_NO_FEATURE_PROBE) | |
| 138 #define ENABLE_32DREGS_DEFAULT true | |
| 139 #else | |
| 140 #define ENABLE_32DREGS_DEFAULT false | |
| 141 #endif | |
| 142 #if (defined CAN_USE_NEON) || !(defined ARM_TEST_NO_FEATURE_PROBE) | |
| 143 # define ENABLE_NEON_DEFAULT true | |
| 144 #else | |
| 145 # define ENABLE_NEON_DEFAULT false | |
| 146 #endif | |
| 147 #ifdef V8_OS_WIN | 143 #ifdef V8_OS_WIN |
| 148 # define ENABLE_LOG_COLOUR false | 144 # define ENABLE_LOG_COLOUR false |
| 149 #else | 145 #else |
| 150 # define ENABLE_LOG_COLOUR true | 146 # define ENABLE_LOG_COLOUR true |
| 151 #endif | 147 #endif |
| 152 | 148 |
| 153 #define DEFINE_BOOL(nam, def, cmt) FLAG(BOOL, bool, nam, def, cmt) | 149 #define DEFINE_BOOL(nam, def, cmt) FLAG(BOOL, bool, nam, def, cmt) |
| 154 #define DEFINE_BOOL_READONLY(nam, def, cmt) \ | 150 #define DEFINE_BOOL_READONLY(nam, def, cmt) \ |
| 155 FLAG_READONLY(BOOL, bool, nam, def, cmt) | 151 FLAG_READONLY(BOOL, bool, nam, def, cmt) |
| 156 #define DEFINE_MAYBE_BOOL(nam, cmt) \ | 152 #define DEFINE_MAYBE_BOOL(nam, cmt) \ |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 "enable use of SSE4.1 instructions if available") | 550 "enable use of SSE4.1 instructions if available") |
| 555 DEFINE_BOOL(enable_sahf, true, | 551 DEFINE_BOOL(enable_sahf, true, |
| 556 "enable use of SAHF instruction if available (X64 only)") | 552 "enable use of SAHF instruction if available (X64 only)") |
| 557 DEFINE_BOOL(enable_avx, true, "enable use of AVX instructions if available") | 553 DEFINE_BOOL(enable_avx, true, "enable use of AVX instructions if available") |
| 558 DEFINE_BOOL(enable_fma3, true, "enable use of FMA3 instructions if available") | 554 DEFINE_BOOL(enable_fma3, true, "enable use of FMA3 instructions if available") |
| 559 DEFINE_BOOL(enable_bmi1, true, "enable use of BMI1 instructions if available") | 555 DEFINE_BOOL(enable_bmi1, true, "enable use of BMI1 instructions if available") |
| 560 DEFINE_BOOL(enable_bmi2, true, "enable use of BMI2 instructions if available") | 556 DEFINE_BOOL(enable_bmi2, true, "enable use of BMI2 instructions if available") |
| 561 DEFINE_BOOL(enable_lzcnt, true, "enable use of LZCNT instruction if available") | 557 DEFINE_BOOL(enable_lzcnt, true, "enable use of LZCNT instruction if available") |
| 562 DEFINE_BOOL(enable_popcnt, true, | 558 DEFINE_BOOL(enable_popcnt, true, |
| 563 "enable use of POPCNT instruction if available") | 559 "enable use of POPCNT instruction if available") |
| 564 DEFINE_BOOL(enable_vfp3, ENABLE_VFP3_DEFAULT, | 560 DEFINE_STRING(arm_arch, ARM_ARCH_DEFAULT, |
| 565 "enable use of VFP3 instructions if available") | 561 "generate instructions for the selected ARM architecture if " |
| 566 DEFINE_BOOL(enable_armv7, ENABLE_ARMV7_DEFAULT, | 562 "available: armv6, armv7, armv7+sudiv or armv8") |
| 567 "enable use of ARMv7 instructions if available (ARM only)") | |
| 568 DEFINE_BOOL(enable_armv8, ENABLE_ARMV8_DEFAULT, | |
| 569 "enable use of ARMv8 instructions if available (ARM 32-bit only)") | |
| 570 DEFINE_BOOL(enable_neon, ENABLE_NEON_DEFAULT, | |
| 571 "enable use of NEON instructions if available (ARM only)") | |
| 572 DEFINE_BOOL(enable_sudiv, true, | |
| 573 "enable use of SDIV and UDIV instructions if available (ARM only)") | |
| 574 DEFINE_BOOL(enable_movw_movt, false, | 563 DEFINE_BOOL(enable_movw_movt, false, |
| 575 "enable loading 32-bit constant by means of movw/movt " | 564 "prefer to load 32-bit constants using movw/movt instruction pairs " |
| 576 "instruction pairs (ARM only)") | 565 "(ARM only)") |
| 577 DEFINE_BOOL(enable_32dregs, ENABLE_32DREGS_DEFAULT, | |
| 578 "enable use of d16-d31 registers on ARM - this requires VFP3") | |
| 579 DEFINE_BOOL(enable_vldr_imm, false, | 566 DEFINE_BOOL(enable_vldr_imm, false, |
| 580 "enable use of constant pools for double immediate (ARM only)") | 567 "enable use of constant pools for double immediate (ARM only)") |
| 581 DEFINE_BOOL(force_long_branches, false, | 568 DEFINE_BOOL(force_long_branches, false, |
| 582 "force all emitted branches to be in long mode (MIPS/PPC only)") | 569 "force all emitted branches to be in long mode (MIPS/PPC only)") |
| 583 DEFINE_STRING(mcpu, "auto", "enable optimization for specific cpu") | 570 DEFINE_STRING(mcpu, "auto", "enable optimization for specific cpu") |
| 584 | 571 |
| 572 // Deprecated ARM flags (replaced by arm_arch). |
| 573 DEFINE_MAYBE_BOOL(enable_armv7, "deprecated (use --arm_arch instead)") |
| 574 DEFINE_MAYBE_BOOL(enable_vfp3, "deprecated (use --arm_arch instead)") |
| 575 DEFINE_MAYBE_BOOL(enable_32dregs, "deprecated (use --arm_arch instead)") |
| 576 DEFINE_MAYBE_BOOL(enable_neon, "deprecated (use --arm_arch instead)") |
| 577 DEFINE_MAYBE_BOOL(enable_sudiv, "deprecated (use --arm_arch instead)") |
| 578 DEFINE_MAYBE_BOOL(enable_armv8, "deprecated (use --arm_arch instead)") |
| 579 |
| 585 // regexp-macro-assembler-*.cc | 580 // regexp-macro-assembler-*.cc |
| 586 DEFINE_BOOL(enable_regexp_unaligned_accesses, true, | 581 DEFINE_BOOL(enable_regexp_unaligned_accesses, true, |
| 587 "enable unaligned accesses for the regexp engine") | 582 "enable unaligned accesses for the regexp engine") |
| 588 | 583 |
| 589 DEFINE_IMPLICATION(enable_armv8, enable_vfp3) | |
| 590 DEFINE_IMPLICATION(enable_armv8, enable_neon) | |
| 591 DEFINE_IMPLICATION(enable_armv8, enable_32dregs) | |
| 592 DEFINE_IMPLICATION(enable_armv8, enable_sudiv) | |
| 593 | |
| 594 // bootstrapper.cc | 584 // bootstrapper.cc |
| 595 DEFINE_STRING(expose_natives_as, NULL, "expose natives in global object") | 585 DEFINE_STRING(expose_natives_as, NULL, "expose natives in global object") |
| 596 DEFINE_STRING(expose_debug_as, NULL, "expose debug in global object") | 586 DEFINE_STRING(expose_debug_as, NULL, "expose debug in global object") |
| 597 DEFINE_BOOL(expose_free_buffer, false, "expose freeBuffer extension") | 587 DEFINE_BOOL(expose_free_buffer, false, "expose freeBuffer extension") |
| 598 DEFINE_BOOL(expose_gc, false, "expose gc extension") | 588 DEFINE_BOOL(expose_gc, false, "expose gc extension") |
| 599 DEFINE_STRING(expose_gc_as, NULL, | 589 DEFINE_STRING(expose_gc_as, NULL, |
| 600 "expose gc extension under the specified name") | 590 "expose gc extension under the specified name") |
| 601 DEFINE_IMPLICATION(expose_gc_as, expose_gc) | 591 DEFINE_IMPLICATION(expose_gc_as, expose_gc) |
| 602 DEFINE_BOOL(expose_externalize_string, false, | 592 DEFINE_BOOL(expose_externalize_string, false, |
| 603 "expose externalize string extension") | 593 "expose externalize string extension") |
| (...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1213 #undef DEFINE_ALIAS_FLOAT | 1203 #undef DEFINE_ALIAS_FLOAT |
| 1214 #undef DEFINE_ALIAS_ARGS | 1204 #undef DEFINE_ALIAS_ARGS |
| 1215 | 1205 |
| 1216 #undef FLAG_MODE_DECLARE | 1206 #undef FLAG_MODE_DECLARE |
| 1217 #undef FLAG_MODE_DEFINE | 1207 #undef FLAG_MODE_DEFINE |
| 1218 #undef FLAG_MODE_DEFINE_DEFAULTS | 1208 #undef FLAG_MODE_DEFINE_DEFAULTS |
| 1219 #undef FLAG_MODE_META | 1209 #undef FLAG_MODE_META |
| 1220 #undef FLAG_MODE_DEFINE_IMPLICATIONS | 1210 #undef FLAG_MODE_DEFINE_IMPLICATIONS |
| 1221 | 1211 |
| 1222 #undef COMMA | 1212 #undef COMMA |
| OLD | NEW |