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 szbuild import LinkNonsfi | 10 from szbuild import LinkNonsfi |
(...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 | 32 # For ARM, test a large stack offset as well. +/- 4095 is |
33 # implemented. | 33 # the limit, so test somewhere near that boundary. |
34 # For ARM, test a large stack offset as well, until we | 34 'arm32': ['--test-stack-extra', '4084'] |
35 # are more confident. +/- 4095 is the limit, so test | |
36 # somewhere near that boundary. | |
37 'arm32': ['--skip-unimplemented', | |
38 '--test-stack-extra', '4084'] | |
39 } | 35 } |
40 arch_llc_flags_extra = { | 36 arch_llc_flags_extra = { |
41 # Use sse2 instructions regardless of input -mattr | 37 # Use sse2 instructions regardless of input -mattr |
42 # argument to avoid differences in (undefined) behavior of | 38 # argument to avoid differences in (undefined) behavior of |
43 # converting NaN to int. | 39 # converting NaN to int. |
44 'x8632': ['-mattr=sse2'], | 40 'x8632': ['-mattr=sse2'], |
45 'x8664': ['-mattr=sse2'], | 41 'x8664': ['-mattr=sse2'], |
46 'arm32': [], | 42 'arm32': [], |
47 } | 43 } |
48 desc = 'Build a cross-test that compares Subzero and llc translation.' | 44 desc = 'Build a cross-test that compares Subzero and llc translation.' |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 objs.append(obj_llc) | 259 objs.append(obj_llc) |
264 if args.nonsfi: | 260 if args.nonsfi: |
265 LinkNonsfi(objs, os.path.join(args.dir, args.output), args.target) | 261 LinkNonsfi(objs, os.path.join(args.dir, args.output), args.target) |
266 elif args.sandbox: | 262 elif args.sandbox: |
267 LinkSandbox(objs, os.path.join(args.dir, args.output), args.target) | 263 LinkSandbox(objs, os.path.join(args.dir, args.output), args.target) |
268 else: | 264 else: |
269 LinkNative(objs, os.path.join(args.dir, args.output), args.target) | 265 LinkNative(objs, os.path.join(args.dir, args.output), args.target) |
270 | 266 |
271 if __name__ == '__main__': | 267 if __name__ == '__main__': |
272 main() | 268 main() |
OLD | NEW |