Represent type sets with ranges.

Allow limits on the smallest and largest integer type in the set, the
highest and lowest number of lanes etc.
This commit is contained in:
Jakob Stoklund Olesen
2016-09-27 13:31:31 -07:00
parent b06668aa8a
commit d45b011fa2
4 changed files with 240 additions and 93 deletions

View File

@@ -344,15 +344,7 @@ def gen_type_constraints(fmt, instrs):
.format(len(type_sets.table)), '];'):
for ts in type_sets.table:
with fmt.indented('ValueTypeSet {', '},'):
if ts.base:
fmt.line('base: {},'.format(ts.base.rust_name()))
else:
fmt.line('base: types::VOID,')
for field in ts._fields:
if field == 'base':
continue
fmt.line('{}: {},'.format(
field, str(getattr(ts, field)).lower()))
ts.emit_fields(fmt)
fmt.comment('Table of operand constraint sequences.')
with fmt.indented(