mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-02-25 09:26:53 +00:00
decodetree: Produce clean output for an empty input file
This is interesting for bisection, where an output file is plumbed, but does not yet have patterns. Backports commit 82bfac1c06cadeb5c7252734dc695d951185916c from qemu
This commit is contained in:
parent
190ee1657b
commit
e18e116ce5
|
@ -1185,15 +1185,15 @@ def main():
|
|||
'(DisasContext *ctx, ', insntype, ' insn)\n{\n')
|
||||
|
||||
i4 = str_indent(4)
|
||||
output(i4, 'union {\n')
|
||||
for n in sorted(arguments.keys()):
|
||||
f = arguments[n]
|
||||
output(i4, i4, f.struct_name(), ' f_', f.name, ';\n')
|
||||
output(i4, '} u;\n\n')
|
||||
if len(allpatterns) != 0:
|
||||
output(i4, 'union {\n')
|
||||
for n in sorted(arguments.keys()):
|
||||
f = arguments[n]
|
||||
output(i4, i4, f.struct_name(), ' f_', f.name, ';\n')
|
||||
output(i4, '} u;\n\n')
|
||||
t.output_code(4, False, 0, 0)
|
||||
|
||||
t.output_code(4, False, 0, 0)
|
||||
output(i4, 'return false;\n')
|
||||
|
||||
output('}\n')
|
||||
|
||||
if output_file:
|
||||
|
|
Loading…
Reference in a new issue