mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-22 19:10:57 +00:00
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:
parent
36a718c062
commit
4d49c004e4
|
@ -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
Loading…
Reference in a new issue