mirror of
https://github.com/bitdefender/bddisasm.git
synced 2025-01-03 03:40:54 +00:00
Add copyright info when auto-generating files.
This commit is contained in:
parent
b109990ba2
commit
4596dbda51
@ -1,3 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Bitdefender
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#include "include/nd_crt.h"
|
||||
#include "../inc/bddisasm.h"
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Bitdefender
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was auto-generated by generate_tables.py from defs.dat. DO NOT MODIFY!
|
||||
//
|
||||
|
@ -1,3 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Bitdefender
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#ifndef MNEMONICS_H
|
||||
#define MNEMONICS_H
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Bitdefender
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#ifndef TABLE_EVEX_H
|
||||
#define TABLE_EVEX_H
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Bitdefender
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#ifndef TABLE_ROOT_H
|
||||
#define TABLE_ROOT_H
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Bitdefender
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#ifndef TABLE_VEX_H
|
||||
#define TABLE_VEX_H
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Bitdefender
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#ifndef TABLE_XOP_H
|
||||
#define TABLE_XOP_H
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Bitdefender
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was auto-generated by generate_tables.py from defs.dat. DO NOT MODIFY!
|
||||
//
|
||||
|
@ -1,3 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2020 Bitdefender
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#ifndef CPUID_FLAGS_H
|
||||
#define CPUID_FLAGS_H
|
||||
|
||||
|
@ -10,6 +10,16 @@ import copy
|
||||
import glob
|
||||
import disasmlib
|
||||
|
||||
header = '''/*
|
||||
* Copyright (c) 2020 Bitdefender
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was auto-generated by generate_tables.py. DO NOT MODIFY!
|
||||
//
|
||||
|
||||
'''
|
||||
|
||||
flags = {
|
||||
'MODRM' : 'ND_FLAG_MODRM',
|
||||
@ -1011,6 +1021,7 @@ def generate_translations2(instructions):
|
||||
#dump_hash_tree2(hash_st)
|
||||
print('Writing the table_root.h file...')
|
||||
f = open(r'../bddisasm/include/table_root.h', 'wt')
|
||||
f.write(header)
|
||||
f.write("#ifndef TABLE_ROOT_H\n")
|
||||
f.write("#define TABLE_ROOT_H\n\n")
|
||||
dump_translation_tree_c(hash_st, 'gRootTable', f)
|
||||
@ -1020,6 +1031,7 @@ def generate_translations2(instructions):
|
||||
#dump_hash_tree2(hash_vex)
|
||||
print('Writing the table_vex.h file...')
|
||||
f = open(r'../bddisasm/include/table_vex.h', 'wt')
|
||||
f.write(header)
|
||||
f.write("#ifndef TABLE_VEX_H\n")
|
||||
f.write("#define TABLE_VEX_H\n\n")
|
||||
dump_translation_tree_c(hash_vex, 'gVexTable', f)
|
||||
@ -1029,6 +1041,7 @@ def generate_translations2(instructions):
|
||||
#dump_hash_tree2(hash_xop)
|
||||
print('Writing the table_xop.h file...')
|
||||
f = open(r'../bddisasm/include/table_xop.h', 'wt')
|
||||
f.write(header)
|
||||
f.write("#ifndef TABLE_XOP_H\n")
|
||||
f.write("#define TABLE_XOP_H\n\n")
|
||||
dump_translation_tree_c(hash_xop, 'gXopTable', f)
|
||||
@ -1038,6 +1051,7 @@ def generate_translations2(instructions):
|
||||
#dump_hash_tree2(hash_evex)
|
||||
print('Writing the table_evex.h file...')
|
||||
f = open(r'../bddisasm/include/table_evex.h', 'wt')
|
||||
f.write(header)
|
||||
f.write("#ifndef TABLE_EVEX_H\n")
|
||||
f.write("#define TABLE_EVEX_H\n\n")
|
||||
dump_translation_tree_c(hash_evex, 'gEvexTable', f)
|
||||
@ -1078,6 +1092,7 @@ def generate_constants2(instructions):
|
||||
|
||||
def dump_mnemonics(mnemonics, prefixes, fname):
|
||||
f = open(fname, 'wt')
|
||||
f.write(header)
|
||||
f.write('#ifndef MNEMONICS_H\n')
|
||||
f.write('#define MNEMONICS_H\n')
|
||||
f.write('\n')
|
||||
@ -1113,9 +1128,7 @@ def dump_mnemonics(mnemonics, prefixes, fname):
|
||||
|
||||
def dump_constants(constants, prefixes, constants_sets, constants_types, fname):
|
||||
f = open(fname, 'wt')
|
||||
f.write('//\n')
|
||||
f.write('// This file was auto-generated by generate_tables.py from defs.dat. DO NOT MODIFY!\n')
|
||||
f.write('//\n\n')
|
||||
f.write(header)
|
||||
f.write('#ifndef CONSTANTS_H\n')
|
||||
f.write('#define CONSTANTS_H\n\n')
|
||||
f.write('\n')
|
||||
@ -1161,9 +1174,7 @@ def dump_tree(translations, level = 0):
|
||||
|
||||
def generate_master_table(instructions, fname):
|
||||
f = open(fname, 'wt')
|
||||
f.write('//\n')
|
||||
f.write('// This file was auto-generated by generate_tables.py from defs.dat. DO NOT MODIFY!\n')
|
||||
f.write('//\n\n')
|
||||
f.write(header)
|
||||
f.write('#ifndef INSTRUCTIONS_H\n')
|
||||
f.write('#define INSTRUCTIONS_H\n')
|
||||
f.write('\n')
|
||||
@ -1242,6 +1253,7 @@ def dump_translation_tree_c(t, hname, f):
|
||||
|
||||
def generate_features(features, fname):
|
||||
f = open(fname, 'wt')
|
||||
f.write(header)
|
||||
f.write('#ifndef CPUID_FLAGS_H\n')
|
||||
f.write('#define CPUID_FLAGS_H\n')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user