summaryrefslogtreecommitdiff
path: root/tools/tcgdisasm.py
diff options
context:
space:
mode:
authorAndrew Martinek <andrewrmartinek@gmail.com>2020-12-20 17:31:00 -0500
committerAndrew Martinek <andrewrmartinek@gmail.com>2020-12-20 17:31:00 -0500
commite8ec8efa902ea56cf17bdcd908067247d13ee28d (patch)
treeba708ba6b0e0125148de6de2c48713d0b64d70de /tools/tcgdisasm.py
parent5930b53dd28705197ebfc1a905ea3175552ba39a (diff)
parent9fab715759ddf919b0c4bb9a01095c4c225fcac0 (diff)
Merge in master (and update some macros)
Diffstat (limited to 'tools/tcgdisasm.py')
-rw-r--r--tools/tcgdisasm.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/tools/tcgdisasm.py b/tools/tcgdisasm.py
index 579d577..a887b1e 100644
--- a/tools/tcgdisasm.py
+++ b/tools/tcgdisasm.py
@@ -763,16 +763,17 @@ class Disassembler(object):
# handle the special flag macros
found_flag_macro = False
- for flag_macro in flag_macros:
- if flag_macro[0] == target_offset:
- found_flag_macro = True
- current_flag_macro = flag_macro
- event_flag = "EVENT_FLAG_" + format(opcode_arg_3, "02X")
- opcode_output_str = flag_macro[1].format(event_flag)
-
- # we need to skip a byte since this macro takes one extra
- opcode_nargs+=1
- break
+ if opcode_byte == 0xcd:
+ for flag_macro in flag_macros:
+ if flag_macro[0] == target_offset:
+ found_flag_macro = True
+ current_flag_macro = flag_macro
+ event_flag = "EVENT_FLAG_" + format(opcode_arg_3, "02X")
+ opcode_output_str = flag_macro[1].format(event_flag)
+
+ # we need to skip a byte since this macro takes one extra
+ opcode_nargs+=1
+ break
if not found_flag_macro and opcode_byte in call_commands + absolute_jumps: