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

Side by Side Diff: src/flag-definitions.h

Issue 2223433002: [arm] Simplify run-time CPU selection. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
OLDNEW
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
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) || \
Michael Achenbach 2016/08/12 10:16:37 Why is only the first case checking for ARM_TEST_N
129 (defined(CAN_USE_ARMV8_INSTRUCTIONS) && \
130 defined(CAN_USE_ARMV7_INSTRUCTIONS) && \
131 defined(CAN_USE_SUDIV) && \
132 defined(CAN_USE_NEON) && \
133 defined(CAN_USE_VFP3_INSTRUCTIONS))
134 # define ARM_ARCH_DEFAULT "armv8"
135 #elif defined(CAN_USE_ARMV7_INSTRUCTIONS) && \
136 defined(CAN_USE_SUDIV) && \
137 defined(CAN_USE_NEON) && \
138 defined(CAN_USE_VFP3_INSTRUCTIONS)
139 # define ARM_ARCH_DEFAULT "armv7+sudiv"
140 #elif defined(CAN_USE_ARMV7_INSTRUCTIONS) && \
141 defined(CAN_USE_NEON) && \
142 defined(CAN_USE_VFP3_INSTRUCTIONS)
143 # define ARM_ARCH_DEFAULT "armv7"
124 #else 144 #else
125 #define ENABLE_VFP3_DEFAULT false 145 # define ARM_ARCH_DEFAULT "armv6"
Michael Achenbach 2016/08/12 10:16:37 Suggestion: Maybe better raise an error for incorr
126 #endif 146 #endif
127 #if (defined CAN_USE_ARMV7_INSTRUCTIONS) || !(defined ARM_TEST_NO_FEATURE_PROBE) 147
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 148 #ifdef V8_OS_WIN
148 # define ENABLE_LOG_COLOUR false 149 # define ENABLE_LOG_COLOUR false
149 #else 150 #else
150 # define ENABLE_LOG_COLOUR true 151 # define ENABLE_LOG_COLOUR true
151 #endif 152 #endif
152 153
153 #define DEFINE_BOOL(nam, def, cmt) FLAG(BOOL, bool, nam, def, cmt) 154 #define DEFINE_BOOL(nam, def, cmt) FLAG(BOOL, bool, nam, def, cmt)
154 #define DEFINE_BOOL_READONLY(nam, def, cmt) \ 155 #define DEFINE_BOOL_READONLY(nam, def, cmt) \
155 FLAG_READONLY(BOOL, bool, nam, def, cmt) 156 FLAG_READONLY(BOOL, bool, nam, def, cmt)
156 #define DEFINE_MAYBE_BOOL(nam, cmt) \ 157 #define DEFINE_MAYBE_BOOL(nam, cmt) \
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 "enable use of SSE4.1 instructions if available") 552 "enable use of SSE4.1 instructions if available")
552 DEFINE_BOOL(enable_sahf, true, 553 DEFINE_BOOL(enable_sahf, true,
553 "enable use of SAHF instruction if available (X64 only)") 554 "enable use of SAHF instruction if available (X64 only)")
554 DEFINE_BOOL(enable_avx, true, "enable use of AVX instructions if available") 555 DEFINE_BOOL(enable_avx, true, "enable use of AVX instructions if available")
555 DEFINE_BOOL(enable_fma3, true, "enable use of FMA3 instructions if available") 556 DEFINE_BOOL(enable_fma3, true, "enable use of FMA3 instructions if available")
556 DEFINE_BOOL(enable_bmi1, true, "enable use of BMI1 instructions if available") 557 DEFINE_BOOL(enable_bmi1, true, "enable use of BMI1 instructions if available")
557 DEFINE_BOOL(enable_bmi2, true, "enable use of BMI2 instructions if available") 558 DEFINE_BOOL(enable_bmi2, true, "enable use of BMI2 instructions if available")
558 DEFINE_BOOL(enable_lzcnt, true, "enable use of LZCNT instruction if available") 559 DEFINE_BOOL(enable_lzcnt, true, "enable use of LZCNT instruction if available")
559 DEFINE_BOOL(enable_popcnt, true, 560 DEFINE_BOOL(enable_popcnt, true,
560 "enable use of POPCNT instruction if available") 561 "enable use of POPCNT instruction if available")
561 DEFINE_BOOL(enable_vfp3, ENABLE_VFP3_DEFAULT, 562 DEFINE_STRING(arm_arch, ARM_ARCH_DEFAULT,
Michael Achenbach 2016/08/05 13:17:12 If we pass this flag, will d8 fail or just warn?
Michael Achenbach 2016/08/12 10:16:37 Clarification: Warning is desired so that we can m
562 "enable use of VFP3 instructions if available") 563 "generate instructions for the selected ARM architecture if "
563 DEFINE_BOOL(enable_armv7, ENABLE_ARMV7_DEFAULT, 564 "available: armv6, armv7, armv7+sudiv or armv8")
564 "enable use of ARMv7 instructions if available (ARM only)")
565 DEFINE_BOOL(enable_armv8, ENABLE_ARMV8_DEFAULT,
566 "enable use of ARMv8 instructions if available (ARM 32-bit only)")
567 DEFINE_BOOL(enable_neon, ENABLE_NEON_DEFAULT,
568 "enable use of NEON instructions if available (ARM only)")
569 DEFINE_BOOL(enable_sudiv, true,
570 "enable use of SDIV and UDIV instructions if available (ARM only)")
571 DEFINE_BOOL(enable_movw_movt, false, 565 DEFINE_BOOL(enable_movw_movt, false,
572 "enable loading 32-bit constant by means of movw/movt " 566 "prefer to load 32-bit constants using movw/movt instruction pairs "
573 "instruction pairs (ARM only)") 567 "(ARM only)")
574 DEFINE_BOOL(enable_32dregs, ENABLE_32DREGS_DEFAULT,
575 "enable use of d16-d31 registers on ARM - this requires VFP3")
576 DEFINE_BOOL(enable_vldr_imm, false, 568 DEFINE_BOOL(enable_vldr_imm, false,
577 "enable use of constant pools for double immediate (ARM only)") 569 "enable use of constant pools for double immediate (ARM only)")
578 DEFINE_BOOL(force_long_branches, false, 570 DEFINE_BOOL(force_long_branches, false,
579 "force all emitted branches to be in long mode (MIPS/PPC only)") 571 "force all emitted branches to be in long mode (MIPS/PPC only)")
580 DEFINE_STRING(mcpu, "auto", "enable optimization for specific cpu") 572 DEFINE_STRING(mcpu, "auto", "enable optimization for specific cpu")
581 573
582 // regexp-macro-assembler-*.cc 574 // regexp-macro-assembler-*.cc
583 DEFINE_BOOL(enable_regexp_unaligned_accesses, true, 575 DEFINE_BOOL(enable_regexp_unaligned_accesses, true,
584 "enable unaligned accesses for the regexp engine") 576 "enable unaligned accesses for the regexp engine")
585 577
586 DEFINE_IMPLICATION(enable_armv8, enable_vfp3)
587 DEFINE_IMPLICATION(enable_armv8, enable_neon)
588 DEFINE_IMPLICATION(enable_armv8, enable_32dregs)
589 DEFINE_IMPLICATION(enable_armv8, enable_sudiv)
590
591 // bootstrapper.cc 578 // bootstrapper.cc
592 DEFINE_STRING(expose_natives_as, NULL, "expose natives in global object") 579 DEFINE_STRING(expose_natives_as, NULL, "expose natives in global object")
593 DEFINE_STRING(expose_debug_as, NULL, "expose debug in global object") 580 DEFINE_STRING(expose_debug_as, NULL, "expose debug in global object")
594 DEFINE_BOOL(expose_free_buffer, false, "expose freeBuffer extension") 581 DEFINE_BOOL(expose_free_buffer, false, "expose freeBuffer extension")
595 DEFINE_BOOL(expose_gc, false, "expose gc extension") 582 DEFINE_BOOL(expose_gc, false, "expose gc extension")
596 DEFINE_STRING(expose_gc_as, NULL, 583 DEFINE_STRING(expose_gc_as, NULL,
597 "expose gc extension under the specified name") 584 "expose gc extension under the specified name")
598 DEFINE_IMPLICATION(expose_gc_as, expose_gc) 585 DEFINE_IMPLICATION(expose_gc_as, expose_gc)
599 DEFINE_BOOL(expose_externalize_string, false, 586 DEFINE_BOOL(expose_externalize_string, false,
600 "expose externalize string extension") 587 "expose externalize string extension")
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 #undef DEFINE_ALIAS_FLOAT 1196 #undef DEFINE_ALIAS_FLOAT
1210 #undef DEFINE_ALIAS_ARGS 1197 #undef DEFINE_ALIAS_ARGS
1211 1198
1212 #undef FLAG_MODE_DECLARE 1199 #undef FLAG_MODE_DECLARE
1213 #undef FLAG_MODE_DEFINE 1200 #undef FLAG_MODE_DEFINE
1214 #undef FLAG_MODE_DEFINE_DEFAULTS 1201 #undef FLAG_MODE_DEFINE_DEFAULTS
1215 #undef FLAG_MODE_META 1202 #undef FLAG_MODE_META
1216 #undef FLAG_MODE_DEFINE_IMPLICATIONS 1203 #undef FLAG_MODE_DEFINE_IMPLICATIONS
1217 1204
1218 #undef COMMA 1205 #undef COMMA
OLDNEW
« src/arm/assembler-arm.cc ('K') | « src/base/build_config.h ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698