OLD | NEW |
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import os | 6 import os |
7 Import('env') | 7 Import('env') |
8 | 8 |
9 # Android compiler cannot compile NDK C++ headers with these. | 9 # Android compiler cannot compile NDK C++ headers with these. |
10 if env.Bit('linux') and not env.Bit('android'): | 10 if env.Bit('linux') and not env.Bit('android'): |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 "simd_dp_2scalar", | 79 "simd_dp_2scalar", |
80 "simd_dp_2shift", | 80 "simd_dp_2shift", |
81 "simd_dp_2misc", | 81 "simd_dp_2misc", |
82 "simd_dp_1imm", | 82 "simd_dp_1imm", |
83 "advanced_simd_element_or_structure_load_store_instructions", | 83 "advanced_simd_element_or_structure_load_store_instructions", |
84 ] | 84 ] |
85 | 85 |
86 # The list of tables in armv7.table that should use the automatically generated, | 86 # The list of tables in armv7.table that should use the automatically generated, |
87 # actual decoders. This list is used to allow us to incrementally change over | 87 # actual decoders. This list is used to allow us to incrementally change over |
88 # tables, as they pass the appropriate tests. | 88 # tables, as they pass the appropriate tests. |
89 AUTO_GEN_TABLES = ["ARMv7", | 89 ACTUAL_GEN_TABLES = ["ARMv7", |
90 "data_processing_and_miscellaneous_instructions", | 90 "data_processing_and_miscellaneous_instructions", |
91 "data_processing_register", | 91 "data_processing_register", |
92 "data_processing_register_shifted_register", | 92 "data_processing_register_shifted_register", |
93 "data_processing_immediate", | 93 "data_processing_immediate", |
94 "multiply_and_multiply_accumulate", | 94 "multiply_and_multiply_accumulate", |
95 "saturating_addition_and_subtraction", | 95 "saturating_addition_and_subtraction", |
96 "halfword_multiply_and_multiply_accumulate", | 96 "halfword_multiply_and_multiply_accumulate", |
97 ] | 97 ] |
| 98 |
| 99 # The list of tables in armv7.table that should test the automatically |
| 100 # generated baseline decoders. This list is used to allow us to incrementally |
| 101 # switch tables over to using automatically generated baselines, as they |
| 102 # pass the appropriate tests. |
| 103 BASELINE_TEST_TABLES = ["data_processing_register"] |
98 | 104 |
99 # The separators to use for splitting up automatically generated actual | 105 # The separators to use for splitting up automatically generated actual |
100 # classes. | 106 # classes. |
101 AUTO_ACTUAL_SEPARATORS = ['VABD'] | 107 AUTO_ACTUAL_SEPARATORS = ['VABD'] |
102 AUTO_ACTUAL_H_FORMAT = 'arm32_decode_actuals_%s.h' | 108 AUTO_ACTUAL_H_FORMAT = 'arm32_decode_actuals_%s.h' |
103 AUTO_ACTUAL_CC_FORMAT = 'arm32_decode_actuals_%s.cc' | 109 AUTO_ACTUAL_CC_FORMAT = 'arm32_decode_actuals_%s.cc' |
104 | 110 |
105 # The separators to use for splitting up automatically generated baseline | 111 # The separators to use for splitting up automatically generated baseline |
106 # classes. | 112 # classes. |
107 AUTO_BASELINE_SEPARATORS = ['SMM', 'VLD'] | 113 AUTO_BASELINE_SEPARATORS = ['SMM', 'VLD'] |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 if generate: | 176 if generate: |
171 gen_env.AlwaysBuild(gen_env.Alias('valgen', GEN_LIST)) | 177 gen_env.AlwaysBuild(gen_env.Alias('valgen', GEN_LIST)) |
172 gen_env.AlwaysBuild( | 178 gen_env.AlwaysBuild( |
173 gen_env.Alias('valclean', action=[Delete(x) for x in GEN_LIST])) | 179 gen_env.Alias('valclean', action=[Delete(x) for x in GEN_LIST])) |
174 | 180 |
175 def _generate_source(filename, table=None): | 181 def _generate_source(filename, table=None): |
176 if not generate: return # i.e. don't add source dependency. | 182 if not generate: return # i.e. don't add source dependency. |
177 cl_args = GEN_CL_ARGS | 183 cl_args = GEN_CL_ARGS |
178 if table: | 184 if table: |
179 cl_args += ' --table=' + table | 185 cl_args += ' --table=' + table |
180 for tbl in AUTO_GEN_TABLES: | 186 for tbl in ACTUAL_GEN_TABLES: |
181 cl_args += ' --auto-actual=' + tbl | 187 cl_args += ' --auto-actual=' + tbl |
| 188 for tbl in BASELINE_TEST_TABLES: |
| 189 cl_args += ' --test-base=' + tbl |
182 for sep in AUTO_ACTUAL_SEPARATORS: | 190 for sep in AUTO_ACTUAL_SEPARATORS: |
183 cl_args += ' --auto-actual-sep=' + sep | 191 cl_args += ' --auto-actual-sep=' + sep |
184 for sep in AUTO_BASELINE_SEPARATORS: | 192 for sep in AUTO_BASELINE_SEPARATORS: |
185 cl_args += ' --auto-baseline-sep=' + sep | 193 cl_args += ' --auto-baseline-sep=' + sep |
186 env.Command(target=_gen_file(filename), | 194 env.Command(target=_gen_file(filename), |
187 source=['armv7.table', | 195 source=['armv7.table', |
188 'generate_decoder.py', | 196 'generate_decoder.py', |
189 'dgen_core.py', | 197 'dgen_core.py', |
190 'dgen_input.py', | 198 'dgen_input.py', |
191 'dgen_opt.py', | 199 'dgen_opt.py', |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 stderr_golden = untrusted_env.File('testdata/empty_file')) | 297 stderr_golden = untrusted_env.File('testdata/empty_file')) |
290 untrusted_env.AddNodeToTestSuite(node, ['small_tests', 'validator_tests'], | 298 untrusted_env.AddNodeToTestSuite(node, ['small_tests', 'validator_tests'], |
291 "run_arm_" + test, | 299 "run_arm_" + test, |
292 # TODO(jfb) Remove this, see issue #3217. | 300 # TODO(jfb) Remove this, see issue #3217. |
293 is_broken=untrusted_env.Bit('windows')) | 301 is_broken=untrusted_env.Bit('windows')) |
294 | 302 |
295 gtest_env.ComponentLibrary('decoder_test_tools', | 303 gtest_env.ComponentLibrary('decoder_test_tools', |
296 ['decoder_tester.cc', | 304 ['decoder_tester.cc', |
297 'inst_classes_testers.cc', | 305 'inst_classes_testers.cc', |
298 'actual_vs_baseline.cc', | 306 'actual_vs_baseline.cc', |
| 307 'baseline_vs_baseline.cc', |
299 'named_class_decoder.cc', | 308 'named_class_decoder.cc', |
300 _gen_dir('arm32_decode_named.cc')] + | 309 _gen_dir('arm32_decode_named.cc')] + |
301 _gen_dirs(GenerateBaselineFiles( | 310 _gen_dirs(GenerateBaselineFiles( |
302 AUTO_BASELINE_CC_FORMAT))) | 311 AUTO_BASELINE_CC_FORMAT))) |
303 | 312 |
304 | 313 |
305 gtest_env.ComponentLibrary('arm_validator_tester', | 314 gtest_env.ComponentLibrary('arm_validator_tester', |
306 ['validator_tests.cc']) | 315 ['validator_tests.cc']) |
307 | 316 |
308 # Do NOT name this program 'validator_tests' because this is the same name as | 317 # Do NOT name this program 'validator_tests' because this is the same name as |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 EXTRA_LIBS=['decoder_test_tools', 'arm_validator_core']) | 365 EXTRA_LIBS=['decoder_test_tools', 'arm_validator_core']) |
357 | 366 |
358 decoder_test_node = gtest_env.CommandTest( | 367 decoder_test_node = gtest_env.CommandTest( |
359 'arm32_decode_' + tbl + 'tests.out', | 368 'arm32_decode_' + tbl + 'tests.out', |
360 command=[decoder_tests_exe], | 369 command=[decoder_tests_exe], |
361 scale_timeout=1000) | 370 scale_timeout=1000) |
362 | 371 |
363 gtest_env.AddNodeToTestSuite(decoder_test_node, | 372 gtest_env.AddNodeToTestSuite(decoder_test_node, |
364 ['huge_tests', 'arm_decoder_tests'], | 373 ['huge_tests', 'arm_decoder_tests'], |
365 'run_arm32_decode_' + tbl + '_tests') | 374 'run_arm32_decode_' + tbl + '_tests') |
OLD | NEW |