diff options
| author | Rusty Wagner <rusty.wagner@gmail.com> | 2024-03-05 19:50:13 -0500 |
|---|---|---|
| committer | Rusty Wagner <rusty.wagner@gmail.com> | 2024-03-05 20:34:34 -0500 |
| commit | e093c21ed880ac3eb72119be15093ee04f8ce299 (patch) | |
| tree | 9f720ebdc0ae415734b1199ed341668c69710a94 /arch/x86/code_generator/patch.diff | |
| parent | 0609276712622908254065546102381466033141 (diff) | |
Move architecture modules into the API repo
Diffstat (limited to 'arch/x86/code_generator/patch.diff')
| -rw-r--r-- | arch/x86/code_generator/patch.diff | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/arch/x86/code_generator/patch.diff b/arch/x86/code_generator/patch.diff new file mode 100644 index 00000000..1b22e5b6 --- /dev/null +++ b/arch/x86/code_generator/patch.diff @@ -0,0 +1,43 @@ +diff --git a/pysrc/generator.py b/pysrc/generator.py +index f2fcd93..fff7e6b 100755 +--- a/pysrc/generator.py ++++ b/pysrc/generator.py +@@ -6342,6 +6342,38 @@ def main(): + agi.close_output_files() + agi.dump_generated_files() + ++ generated_iforms = set() ++ with open('iform-type-dump.txt', 'w') as f: ++ for generator in agi.generator_list: ++ ii = generator.parser_output.instructions[0] ++ if not field_check(ii,'iclass'): ++ continue ++ for ii in generator.parser_output.instructions: ++ ++ if ii.iform_enum in generated_iforms: ++ continue ++ else: ++ generated_iforms.add(ii.iform_enum) ++ ++ f.write('INTRINSIC_XED_IFORM_' + ii.iform_enum) ++ f.write('\n') ++ s = str(ii.ipattern_input) ++ for field in s.split(' '): ++ if field.startswith('VL'): ++ f.write(field + '\n') ++ ++ for operand in ii.operands: ++ # if operand.xtype != None and operand.xtype != 'INVALID': ++ if operand.xtype != None: ++ width_hint = '' ++ if operand.oc2 != None: ++ width_hint = str(operand.oc2) ++ elif operand.lookupfn_name != None: ++ width_hint = str(operand.lookupfn_name) ++ if width_hint != '': ++ f.write('\t' + str(operand.xtype) + '\t' + operand.rw + '\t' + width_hint + '\n') ++ f.write('\n') ++ + ################################################ + + if __name__ == '__main__': |
