decodetree: Prefix extract function names with decode_function

This makes it easier to name Formats within multiple decode files.

Backports commit 71ecf79bf40db20237a3cfc01cc407cc4cad8817 from qemu
This commit is contained in:
Richard Henderson 2019-03-13 11:20:24 -04:00 committed by Lioncash
parent 1f57e9bedc
commit fcb49bb6f6
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -446,7 +446,8 @@ class Format(General):
"""Class representing an instruction format""" """Class representing an instruction format"""
def extract_name(self): def extract_name(self):
return 'extract_' + self.name global decode_function
return decode_function + '_extract_' + self.name
def output_extract(self): def output_extract(self):
output('static void ', self.extract_name(), '(', output('static void ', self.extract_name(), '(',