decodetree: Remove insn argument from trans_* expanders

This allows trans_* expanders to be shared between decoders
for 32 and 16-bit insns, by not tying the expander to the
size of the insn that produced it.

This change requires adjusting the two existing users to match.

Backports commit 3a7be5546506be62d5c6c4b804119cedf9e367d6 from qemu
This commit is contained in:
Richard Henderson 2018-11-11 08:20:26 -05:00 committed by Lioncash
parent 36a718c062
commit 4d49c004e4
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
2 changed files with 246 additions and 266 deletions

View file

@ -466,8 +466,7 @@ class Pattern(General):
output('typedef ', self.base.base.struct_name(),
' arg_', self.name, ';\n')
output(translate_scope, 'bool ', translate_prefix, '_', self.name,
'(DisasContext *ctx, arg_', self.name,
' *a, ', insntype, ' insn);\n')
'(DisasContext *ctx, arg_', self.name, ' *a);\n')
def output_code(self, i, extracted, outerbits, outermask):
global translate_prefix
@ -479,7 +478,7 @@ class Pattern(General):
for n, f in self.fields.items():
output(ind, 'u.f_', arg, '.', n, ' = ', f.str_extract(), ';\n')
output(ind, 'return ', translate_prefix, '_', self.name,
'(ctx, &u.f_', arg, ', insn);\n')
'(ctx, &u.f_', arg, ');\n')
# end Pattern

File diff suppressed because it is too large Load diff