Lines Matching +full:gen +full:- +full:mapping
2 # -*- coding: utf-8 -*-
10 # http://www.apache.org/licenses/LICENSE-2.0
17 """Helper tool to generate cross-compiled syscall and constant tables to JSON.
19 This script takes the LLVM IR of libconstants.gen.c and libsyscalls.gen.c and
21 architecture-neutral (at least for this case).
30 _STRING_CONSTANT_RE = re.compile(r'(@[a-zA-Z0-9.]+) = .*c"([^"\\]+)\\00".*')
37 # For arm-v7a. What we are interested in are the @.str.x and the very last
39 _TABLE_ENTRY_CONTENTS = re.compile(r'.*?(null|@[a-zA-Z0-9.]+).* (-?\d+)')
41 # When testing clang-r458909, we found a new constant_entry pattern:
43 # For the same constant, current clang-r458507 generates:
47 # This is for a char* constant defined in linux-x86/libconstants.gen.c:
59 HELP_EPILOG = """Generate LLVM IR: clang -S -emit-llvm libconstants.gen.c libsyscalls.gen.c
88 # This is the end-of-table marker.
102 parser.add_argument('--output',
119 # Populate the top-level fields.
124 # constants can only output numeric values. Use a hardcoded mapping instead.