OLD | NEW |
1 #!/usr/bin/env python2 | 1 #!/usr/bin/env python2 |
2 | 2 |
3 import argparse | 3 import argparse |
4 import os | 4 import os |
5 import subprocess | 5 import subprocess |
6 import sys | 6 import sys |
7 import tempfile | 7 import tempfile |
8 | 8 |
9 import targets | 9 import targets |
10 from utils import shellcmd | 10 from utils import shellcmd |
(...skipping 11 matching lines...) Expand all Loading... |
22 the test functions with a variety of interesting inputs and compares their | 22 the test functions with a variety of interesting inputs and compares their |
23 results. | 23 results. |
24 | 24 |
25 """ | 25 """ |
26 # arch_map maps a Subzero target string to TargetInfo (e.g., triple). | 26 # arch_map maps a Subzero target string to TargetInfo (e.g., triple). |
27 arch_map = { 'x8632': targets.X8632Target, | 27 arch_map = { 'x8632': targets.X8632Target, |
28 'x8664': targets.X8664Target, | 28 'x8664': targets.X8664Target, |
29 'arm32': targets.ARM32Target } | 29 'arm32': targets.ARM32Target } |
30 arch_sz_flags = { 'x8632': [], | 30 arch_sz_flags = { 'x8632': [], |
31 'x8664': [], | 31 'x8664': [], |
32 # TODO(jvoung): remove skip-unimplemented when implemented | 32 # TODO(jvoung): remove skip-unimplemented when |
33 'arm32': ['--skip-unimplemented'] | 33 # implemented. |
| 34 # For ARM, test a large stack offset as well, until we |
| 35 # are more confident. +/- 4095 is the limit, so test |
| 36 # somewhere near that boundary. |
| 37 'arm32': ['--skip-unimplemented', |
| 38 '--test-stack-extra', '4084'] |
34 } | 39 } |
35 arch_llc_flags_extra = { | 40 arch_llc_flags_extra = { |
36 # Use sse2 instructions regardless of input -mattr | 41 # Use sse2 instructions regardless of input -mattr |
37 # argument to avoid differences in (undefined) behavior of | 42 # argument to avoid differences in (undefined) behavior of |
38 # converting NaN to int. | 43 # converting NaN to int. |
39 'x8632': ['-mattr=sse2'], | 44 'x8632': ['-mattr=sse2'], |
40 'x8664': ['-mattr=sse2'], | 45 'x8664': ['-mattr=sse2'], |
41 'arm32': [], | 46 'arm32': [], |
42 } | 47 } |
43 desc = 'Build a cross-test that compares Subzero and llc translation.' | 48 desc = 'Build a cross-test that compares Subzero and llc translation.' |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 if args.sandbox else | 187 if args.sandbox else |
183 ['-g', '-target=' + triple, | 188 ['-g', '-target=' + triple, |
184 '-lm', '-lpthread', | 189 '-lm', '-lpthread', |
185 '-Wl,--defsym=__Sz_AbsoluteZero=0'] + | 190 '-Wl,--defsym=__Sz_AbsoluteZero=0'] + |
186 target_info.cross_headers) | 191 target_info.cross_headers) |
187 shellcmd([compiler, args.driver] + objs + | 192 shellcmd([compiler, args.driver] + objs + |
188 ['-o', os.path.join(args.dir, args.output)] + sb_native_args) | 193 ['-o', os.path.join(args.dir, args.output)] + sb_native_args) |
189 | 194 |
190 if __name__ == '__main__': | 195 if __name__ == '__main__': |
191 main() | 196 main() |
OLD | NEW |