Skip to content

Commit

Permalink
Remove left duplex code from rebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rot127 committed Jul 21, 2022
1 parent 86d640f commit 4cd3a40
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions InstructionTemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def __init__(self, llvm_instruction):
self.llvm_new_operand_index: bool = None
self.is_predicated: bool = False
self.is_pred_new: bool = False
self.is_pred_false: bool = False # Duplex can have both, true and false predicates.
self.is_pred_false: bool = False
self.is_pred_true: bool = False

# Special
Expand Down Expand Up @@ -329,17 +329,9 @@ def get_template_in_c(self) -> str:
code += ".il_ops = {"
getter: str
meta: [str]
if self.is_duplex:
for getter, meta in zip(
(self.low_instr.il_ops["getter_rzil"] + self.high_instr.il_ops["getter_rzil"]),
(self.low_instr.il_ops["meta"] + self.high_instr.il_ops["meta"]),
):
code += f"{{{getter}, {'|'.join(meta)}}},\n"
members_to_set -= 1
else:
for getter, meta in zip(self.il_ops["getter_rzil"], self.il_ops["meta"]):
code += f"{{{getter}, {'|'.join(meta)}}},\n"
members_to_set -= 1
for getter, meta in zip(self.il_ops["getter_rzil"], self.il_ops["meta"]):
code += f"{{{getter}, {'|'.join(meta)}}},\n"
members_to_set -= 1
if members_to_set < 1:
log("Can not set more than two IL operations. Please add more members to HexILInsn.", LogLevel.ERROR)
code += "{(HexILOpGetter) NULL, HEX_IL_INSN_ATTR_INVALID},\n" * members_to_set
Expand Down

0 comments on commit 4cd3a40

Please sign in to comment.