Elaborate on some comments in generated source files.
Recipe names are fairly obscure, so the more context we can give when using them the better.
This commit is contained in:
@@ -152,7 +152,7 @@ def gen_isa(isa, fmt):
|
|||||||
fmt.line('let bits = encoding.bits();')
|
fmt.line('let bits = encoding.bits();')
|
||||||
with fmt.indented('match func.encodings[inst].recipe() {', '}'):
|
with fmt.indented('match func.encodings[inst].recipe() {', '}'):
|
||||||
for i, recipe in enumerate(isa.all_recipes):
|
for i, recipe in enumerate(isa.all_recipes):
|
||||||
fmt.comment(recipe.name)
|
fmt.comment('Recipe {}'.format(recipe.name))
|
||||||
with fmt.indented('{} => {{'.format(i), '}'):
|
with fmt.indented('{} => {{'.format(i), '}'):
|
||||||
gen_recipe(recipe, fmt)
|
gen_recipe(recipe, fmt)
|
||||||
fmt.line('_ => {},')
|
fmt.line('_ => {},')
|
||||||
|
|||||||
@@ -756,7 +756,7 @@ def emit_recipe_constraints(isa, fmt):
|
|||||||
'static RECIPE_CONSTRAINTS: [RecipeConstraints; {}] = ['
|
'static RECIPE_CONSTRAINTS: [RecipeConstraints; {}] = ['
|
||||||
.format(len(isa.all_recipes)), '];'):
|
.format(len(isa.all_recipes)), '];'):
|
||||||
for r in isa.all_recipes:
|
for r in isa.all_recipes:
|
||||||
fmt.comment(r.name)
|
fmt.comment('Constraints for recipe {}:'.format(r.name))
|
||||||
tied_i2o, tied_o2i = r.ties()
|
tied_i2o, tied_o2i = r.ties()
|
||||||
fixed_ins, fixed_outs = r.fixed_ops()
|
fixed_ins, fixed_outs = r.fixed_ops()
|
||||||
with fmt.indented('RecipeConstraints {', '},'):
|
with fmt.indented('RecipeConstraints {', '},'):
|
||||||
@@ -830,7 +830,7 @@ def emit_recipe_sizing(isa, fmt):
|
|||||||
'static RECIPE_SIZING: [RecipeSizing; {}] = ['
|
'static RECIPE_SIZING: [RecipeSizing; {}] = ['
|
||||||
.format(len(isa.all_recipes)), '];'):
|
.format(len(isa.all_recipes)), '];'):
|
||||||
for r in isa.all_recipes:
|
for r in isa.all_recipes:
|
||||||
fmt.comment(r.name)
|
fmt.comment('Code size information for recipe {}:'.format(r.name))
|
||||||
with fmt.indented('RecipeSizing {', '},'):
|
with fmt.indented('RecipeSizing {', '},'):
|
||||||
fmt.format('bytes: {},', r.size)
|
fmt.format('bytes: {},', r.size)
|
||||||
if r.branch_range:
|
if r.branch_range:
|
||||||
|
|||||||
Reference in New Issue
Block a user