diff options
author | Michael Pavone <pavone@retrodev.com> | 2018-10-04 19:12:56 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2018-10-04 19:12:56 -0700 |
commit | 1dab348088655d41be46a1fa33f0e28c0695f86e (patch) | |
tree | 56a6bc25f57245591aba72e81086573cc23a00e1 /cpu_dsl.py | |
parent | 701c5fddc2d25d8d370995ac7fec6762b6aeaed4 (diff) |
Add the ability for a CPU definition to reference arbitrary C includes and use it to add a placeholder definition of svp_read_16
Diffstat (limited to 'cpu_dsl.py')
-rwxr-xr-x | cpu_dsl.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -893,6 +893,7 @@ class Program: self.extra_tables = info.get('extra_tables', []) self.context_type = self.prefix + 'context' self.body = info.get('body', [None])[0] + self.includes = info.get('include', []) self.flags = flags self.lastDst = None self.scopes = [] @@ -930,6 +931,8 @@ class Program: def build(self, otype): body = [] pieces = [] + for include in self.includes: + body.append('#include "{0}"\n'.format(include)) for table in self.instructions: opmap = [None] * (1 << self.opsize) bodymap = {} |