Skip to content

Commit

Permalink
Preprocess short code a second time due to ned14/pcpp#71
Browse files Browse the repository at this point in the history
  • Loading branch information
Rot127 committed Jul 7, 2022
1 parent 47cdb8e commit 95ad14b
Show file tree
Hide file tree
Showing 3 changed files with 2,295 additions and 130 deletions.
5 changes: 4 additions & 1 deletion Preprocessor/Hexagon/PreprocessorHexagon.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,12 @@ def preprocess_shortcode(self):
f.write('\n')
with open(self.shortcode_path) as g:
f.writelines(g.readlines())
argv = ['script_name', combined_path, '-o', self.out_dir + '/Preprocessor/shortcode_resolved.h']
argv = ['script_name', combined_path, '-o', self.out_dir + '/Preprocessor/shortcode_resolved_tmp.h']
print('* Resolve macros of shortcode with pcpp...')
pcpp.pcmd.CmdPreprocessor(argv)
print('* Do it again due to https://github.com/ned14/pcpp/issues/71')
argv = ['script_name', self.out_dir + '/patched_macros.h', self.out_dir + '/Preprocessor/shortcode_resolved_tmp.h', '-o', self.out_dir + '/Preprocessor/shortcode_resolved.h']
pcpp.pcmd.CmdPreprocessor(argv)

def load_insn_behavior(self):
print('* Load instruction/behavior pairs.')
Expand Down
Loading

0 comments on commit 95ad14b

Please sign in to comment.